Compare commits

...

45 commits

Author SHA1 Message Date
Tim Visée
b6d7c6983a
Merge pull request #183 from defiling9046/patch-1
Update README.md
2025-09-18 09:45:10 +02:00
defiling9046
88bffdb79e
Update README.md
I thought it meant Arch Linux until i clicked on it so I changed the wording (arch to architecture). Sorry if I'm nitpicking.
2025-09-12 20:33:06 +01:00
timvisee
f5b606fca0
Remove and invalidate snapcraft credentials 2025-02-04 22:28:19 +01:00
timvisee
60b3df030e
Use new SNAPCRAFT_STORE_CREDENTIALS variable 2025-02-04 21:36:09 +01:00
timvisee
0b32f4f71b
Bump version to 0.2.76 2025-02-04 21:00:28 +01:00
Tim Visée
754735d2db
Merge pull request #151 from lnee94/patch-1
Update README.md
2025-02-04 20:56:44 +01:00
Tim Visée
92ed3eca9d
Update snap connect command 2025-02-04 20:56:21 +01:00
Tim Visée
a7143bb1ee Merge branch 'linux-libssl3' into 'master'
Upgrade to OpenSSL 3.x

See merge request timvisee/ffsend!43
2025-02-04 19:51:26 +00:00
Christian Sarre
0e7884d13a Update OpenSSL to version 3.0.15. 2025-02-01 22:24:08 +02:00
Christian Sarre
c87845770d Update OpenSSL to 3.0.14. 2025-02-01 22:24:08 +02:00
Christian Sarre
2c9d60d5c1 Change image to "rust:slim-bookworm" - continuation for previous commit. 2025-02-01 22:24:08 +02:00
Christian Sarre
27439fb72f Possible fix for "missing" OpenSSL libraries. 2025-02-01 22:24:08 +02:00
Tim Visée
07f3ff8777
Merge pull request #176 from Kramtoske/master
fix segmentation fault
2025-01-28 23:09:11 +01:00
Eitautas
1da996783f
fix segmentation fault 2025-01-28 10:54:20 +02:00
timvisee
238f1f54d7
Bump MSRV to 1.63.0 2023-08-20 17:48:39 +02:00
timvisee
5df8463b74
Bump dependencies 2023-08-20 17:37:36 +02:00
timvisee
8d8ad7fdb3
Revert "Upgrade to libssl3/openssl3."
This reverts commit 5fd2eac6eb.
2023-05-18 23:12:06 +02:00
timvisee
f06b639542
Merge branch 'sarrchri-linux-libssl3' into master
See https://github.com/timvisee/ffsend/pull/156
2023-05-18 23:00:57 +02:00
Christian Sarre
5fd2eac6eb Upgrade to libssl3/openssl3. 2023-04-12 13:59:56 +03:00
timvisee
e0821c751d
Merge branch 'alichtman-master' into master
See https://github.com/timvisee/ffsend/pull/154
2023-04-07 08:25:20 +02:00
Aaron Lichtman
3c1c2dc28c
Fix segfault
close  #153
2023-04-06 23:14:09 -07:00
lnee94
6fdc6ad85c
Update README.md 2023-02-25 16:18:38 -05:00
timvisee
13f9edd2ea
Bump MSRV to 1.60 2023-02-20 11:16:30 +01:00
timvisee
fd5b38f9ab
Update dependencies 2023-02-14 14:00:41 +01:00
timvisee
6661a58770
Revert "Use shorter passphrase words, make them less than 32-characters long"
This reverts commit fdf8ae9201.

This is reverted because the password length limit is now set much
higher, see: https://github.com/timvisee/send/pull/147
2023-02-14 13:59:44 +01:00
Tim Visée
b2b287e34f Merge branch 'prettytable-rs-features' into 'master'
Disable unused features in prettytable-rs crate

See merge request timvisee/ffsend!41
2022-11-14 17:49:35 +00:00
Jakub Jirutka
9b8dee12ea Disable unused features in prettytable-rs crate
ffsend doesn't use csv.
2022-10-09 21:57:19 +02:00
timvisee
a98c9d1ce4
Merge branch 'kianmeng-fix-typos' into master
See https://github.com/timvisee/ffsend/pull/144
2022-10-05 16:07:03 +02:00
Kian-Meng Ang
f77f9f116a Fix typos
Found via `codespell -S *.svg -L crate,ser`
2022-10-05 21:52:50 +08:00
timvisee
afb004680b
Update dependencies 2022-08-18 16:51:01 +02:00
timvisee
6edc0b1eac
Merge branch 'master' of gitlab.com:timvisee/ffsend 2022-07-04 18:38:44 +02:00
timvisee
7c94f265e2
Update Send link in README, point to repository instead 2022-07-04 18:38:35 +02:00
Tim Visée
d33c03cd2c Merge branch 'nautilus-script' into 'master'
Add script for Nautilus

See merge request timvisee/ffsend!39
2022-06-27 13:22:36 +00:00
getzze
ecc6bcf736 add script for Nautilus 2022-06-27 13:46:50 +01:00
timvisee
3e9a4d67f2
Bump version to 0.2.76 2022-06-20 10:09:01 +02:00
timvisee
ea87a778b3
Update dependencies 2022-06-20 10:08:45 +02:00
timvisee
91cf01ec75
Fix Snapcraft CI release, use new authentication method 2022-06-20 10:04:37 +02:00
timvisee
7598063e36
Bump version to 0.2.75 2022-06-19 02:01:33 +02:00
timvisee
6672891490
Update dependencies 2022-06-19 02:01:12 +02:00
timvisee
8139e3be01
Bump MSRV to 1.56.1 2022-06-19 01:42:32 +02:00
timvisee
ac9f56945b
Update dependencies 2022-06-19 01:41:03 +02:00
timvisee
b42225be76
Update dependencies 2022-06-07 10:29:32 +02:00
dependabot[bot]
1a5ec2de79
Bump regex from 1.5.4 to 1.5.5
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 21:18:06 +00:00
timvisee
216772361a
Remove deprecated badges from Cargo.toml 2021-10-15 12:36:05 +02:00
timvisee
55c243a007
Update dependencies 2021-10-14 22:52:02 +02:00
11 changed files with 917 additions and 906 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
target/ target/
**/*.rs.bk **/*.rs.bk
.idea/ .idea/
snapcraft.login

View file

@ -5,7 +5,7 @@
# - export a build artifact from the new job # - export a build artifact from the new job
# - manually upload artifact to GitHub in the 'github-release' job # - manually upload artifact to GitHub in the 'github-release' job
image: "rust:slim" image: "rust:slim-bookworm"
stages: stages:
- check - check
@ -64,10 +64,10 @@ check-nightly:
<<: *check-base <<: *check-base
variables: variables:
RUST_VERSION: nightly RUST_VERSION: nightly
check-old: check-msrv:
<<: *check-base <<: *check-base
variables: variables:
RUST_VERSION: "1.46.0" RUST_VERSION: "1.63.0"
# Build using Rust stable # Build using Rust stable
build-x86_64-linux-gnu: build-x86_64-linux-gnu:
@ -95,9 +95,9 @@ build-x86_64-linux-musl:
# Build OpenSSL statically # Build OpenSSL statically
- apt-get install -y build-essential wget musl-tools - apt-get install -y build-essential wget musl-tools
- wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1k.tar.gz - wget https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz
- tar xzvf openssl-1.1.1k.tar.gz - tar xzvf openssl-3.0.15.tar.gz
- cd openssl-1.1.1k - cd openssl-3.0.15
- ./config no-async -fPIC --openssldir=/usr/local/ssl --prefix=/usr/local - ./config no-async -fPIC --openssldir=/usr/local/ssl --prefix=/usr/local
- make - make
- make install - make install
@ -105,7 +105,7 @@ build-x86_64-linux-musl:
# Statically build ffsend # Statically build ffsend
- export OPENSSL_STATIC=1 - export OPENSSL_STATIC=1
- export OPENSSL_LIB_DIR=/usr/local/lib - export OPENSSL_LIB_DIR=/usr/local/lib64
- export OPENSSL_INCLUDE_DIR=/usr/local/include - export OPENSSL_INCLUDE_DIR=/usr/local/include
- cargo build --target=$RUST_TARGET --release --verbose - cargo build --target=$RUST_TARGET --release --verbose
@ -187,8 +187,7 @@ release-snap:
# Publish snap package # Publish snap package
- echo "Publishing snap package..." - echo "Publishing snap package..."
- echo "$SNAPCRAFT_LOGIN" | base64 -d > snapcraft.login - snapcraft whoami
- snapcraft login --with snapcraft.login
- snapcraft push --release=stable ffsend_*_amd64.snap - snapcraft push --release=stable ffsend_*_amd64.snap
artifacts: artifacts:
name: ffsend-snap-x86_64 name: ffsend-snap-x86_64

1699
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
[package] [package]
name = "ffsend" name = "ffsend"
version = "0.2.74" version = "0.2.77"
rust-version = "1.63.0"
authors = ["Tim Visee <3a4fb3964f@sinenomine.email>"] authors = ["Tim Visee <3a4fb3964f@sinenomine.email>"]
license = "GPL-3.0" license = "GPL-3.0"
readme = "README.md" readme = "README.md"
@ -49,24 +50,12 @@ license-file = ["LICENSE", "3"]
depends = "$auto, libssl1.1, ca-certificates, xclip" depends = "$auto, libssl1.1, ca-certificates, xclip"
maintainer-scripts = "pkg/deb" maintainer-scripts = "pkg/deb"
[badges]
gitlab = { repository = "timvisee/ffsend", branch = "master" }
[[bin]] [[bin]]
name = "ffsend" name = "ffsend"
path = "src/main.rs" path = "src/main.rs"
[features] [features]
default = [ default = ["archive", "clipboard", "crypto-ring", "history", "infer-command", "qrcode", "send3", "urlshorten"]
"archive",
"clipboard",
"crypto-ring",
"history",
"infer-command",
"qrcode",
"send3",
"urlshorten",
]
# Compile with file archiving support # Compile with file archiving support
archive = ["tar"] archive = ["tar"]
@ -122,10 +111,10 @@ open = "2"
openssl-probe = "0.1" openssl-probe = "0.1"
pathdiff = "0.2" pathdiff = "0.2"
pbr = "1" pbr = "1"
prettytable-rs = "0.8" prettytable-rs = { version = "0.10.0", default-features = false }
qr2term = { version = "0.2", optional = true } qr2term = { version = "0.2", optional = true }
rand = "0.8" rand = "0.8"
regex = "1.3" regex = "1.5"
rpassword = "5" rpassword = "5"
serde = "1" serde = "1"
serde_derive = "1" serde_derive = "1"
@ -133,7 +122,7 @@ tar = { version = "0.4", optional = true }
tempfile = "3" tempfile = "3"
toml = "0.5" toml = "0.5"
urlshortener = { version = "3", optional = true } urlshortener = { version = "3", optional = true }
version-compare = "0.0.13" version-compare = "0.1"
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))'.dependencies] [target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))'.dependencies]
which = { version = "4.0", optional = true } which = { version = "4.0", optional = true }

View file

@ -36,7 +36,7 @@ Find out more about security [here](#security).
- [Features](#features) - [Features](#features)
- [Usage](#usage) - [Usage](#usage)
- [Requirements](#requirements) - [Requirements](#requirements)
- [Install](#install) ([Linux](#linux-all-distributions), [macOS](#macos), [Windows](#windows), [FreeBSD](#freebsd), [Android](#android), [_Other OS/arch_](#other-os-or-architecture)) - [Install](#install) ([Linux](#linux-all-distributions), [macOS](#macos), [Windows](#windows), [FreeBSD](#freebsd), [Android](#android), [_Other OS/architecture_](#other-os-or-architecture))
- [Build](#build) - [Build](#build)
- [Configuration and environment](#configuration-and-environment) - [Configuration and environment](#configuration-and-environment)
- [Security](#security) - [Security](#security)
@ -188,6 +188,7 @@ _Note: due to how `snap` is configured by default, you won't be able to use the
package from some contexts such as through SSH without manual modifications. If package from some contexts such as through SSH without manual modifications. If
you're experiencing problems, please refer to a different installation method you're experiencing problems, please refer to a different installation method
such as the [prebuilt binaries](#linux-prebuilt-binaries), or open an issue._ such as the [prebuilt binaries](#linux-prebuilt-binaries), or open an issue._
_Note: if you want to read/write to a flash drive run `snap connect ffsend:removable-media`
`ffsend`][snapcraft-ffsend] `ffsend`][snapcraft-ffsend]
@ -362,7 +363,7 @@ You can use `ffsend` from the command line in the same directory:
.\ffsend.exe --help .\ffsend.exe --help
``` ```
To make it globally invokable as `ffsend`, you must make the binary available in To make it globally invocable as `ffsend`, you must make the binary available in
your systems `PATH`. The easiest solution is to move it into `System32`: your systems `PATH`. The easiest solution is to move it into `System32`:
```cmd ```cmd
move .\ffsend.exe C:\Windows\System32\ffsend.exe move .\ffsend.exe C:\Windows\System32\ffsend.exe
@ -428,7 +429,7 @@ docker pull timvisee/ffsend
``` ```
On Linux or macOS you might define a alias in your shell configuration, to make On Linux or macOS you might define a alias in your shell configuration, to make
it invokable as `ffsend`: it invocable as `ffsend`:
```bash ```bash
alias ffsend='docker run --rm -it -v "$(pwd):/data" timvisee/ffsend' alias ffsend='docker run --rm -it -v "$(pwd):/data" timvisee/ffsend'
@ -444,7 +445,7 @@ before proceeding:
### Build requirements ### Build requirements
- Runtime [requirements](#requirements) - Runtime [requirements](#requirements)
- [`git`][git] - [`git`][git]
- [`rust`][rust] `v1.40` or higher (install using [`rustup`][rustup]) - [`rust`][rust] `v1.63` (MSRV) or higher (install using [`rustup`][rustup])
- [OpenSSL][openssl] or [LibreSSL][libressl] libraries/headers: - [OpenSSL][openssl] or [LibreSSL][libressl] libraries/headers:
- Linux: - Linux:
- Ubuntu, Debian and derivatives: `apt install build-essential cmake pkg-config libssl-dev` - Ubuntu, Debian and derivatives: `apt install build-essential cmake pkg-config libssl-dev`
@ -811,7 +812,7 @@ Check out the [LICENSE](LICENSE) file for more information.
[termux]: https://termux.com/ [termux]: https://termux.com/
[rust]: https://rust-lang.org/ [rust]: https://rust-lang.org/
[rustup]: https://rustup.rs/ [rustup]: https://rustup.rs/
[send]: https://send.vis.ee/ [send]: https://github.com/timvisee/send
[mozilla-send]: https://github.com/mozilla/send [mozilla-send]: https://github.com/mozilla/send
[timvisee-send]: https://github.com/timvisee/send [timvisee-send]: https://github.com/timvisee/send
[send-encryption]: https://github.com/timvisee/send/blob/master/docs/encryption.md [send-encryption]: https://github.com/timvisee/send/blob/master/docs/encryption.md

View file

@ -0,0 +1,6 @@
`firefox-send` is a script for Nautilus/Nemo/Caja (maybe it needs some adaptation for Caja) to send files directly from the file browser, using the contextual menu.
* Copy the `firefox-send` file to ~/.local/share/nautilus/scripts/firefox-send
* Modify the default options to your use case: host server, download number, retention time.
* Make the file executable (`chmod +x firefox-send`).
* Restart Nautilus/Nemo/Caja.

View file

@ -0,0 +1,46 @@
#!/bin/bash
#CONSTANTS
#FILEPATH=`echo $NAUTILUS_SCRIPT_SELECTED_URIS | sed 's@file://@@g'`
# Quote the paths
IFS=$'\n' read -d '' -r -a FILEPATH <<< "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
FFSEND_BIN='/usr/bin/ffsend'
FFSEND_BIN_OPTS="upload --open --copy"
ZENITY='/usr/bin/zenity '
ZENITY_PROGRESS_OPTIONS='--auto-close --auto-kill' #you can remove this if you like
#sanity checks
for sanity_check in $FFSEND_BIN "${FILEPATH[@]}"
do
ZENITY_ERROR_SANITY="There is an error, it involved $sanity_check.\n Probably binary or file missing"
if [ ! -e $sanity_check ]
then
#zenity --error --text="$(eval "echo \"$ZENITY_ERROR_SANITY\"")"
zenity --error --text="$ZENITY_ERROR_SANITY"
exit
fi
done
# Use the following flags automatically from now on
# -I: no interaction
# -f: force
# -y: yes
# -q: quiet
export FFSEND_NO_INTERACT=1 FFSEND_FORCE=1 FFSEND_YES=1 FFSEND_QUIET=1
export FFSEND_HOST=https://send.boblorange.net
export FFSEND_EXPIRY_TIME=604800
export FFSEND_DOWNLOAD_LIMIT=5
#check whether copying file or directory
if [ ! -f "${FILEPATH[@]}" ]; then
FFSEND_BIN_OPTS="$FFSEND_BIN_OPTS --archive"
fi
# Upload a file
#zenity --info --text="Ready to send: $FFSEND_BIN $FFSEND_BIN_OPTS ${FILEPATH[@]}"
$FFSEND_BIN $FFSEND_BIN_OPTS "${FILEPATH[@]}" | $($ZENITY --progress --text="sending $(basename $FILEPATH)" --pulsate $ZENITY_PROGRESS_OPTIONS)
#echo -e "$FILEPATH" | xargs -i $FFSEND_BIN $FFSEND_BIN_OPTS {} | $($ZENITY --progress --text="sending $(basename $FILEPATH)" --pulsate $ZENITY_PROGRESS_OPTIONS)
# Upload a file
#echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | xargs -i ffsend upload --open --copy {}

View file

@ -28,7 +28,7 @@ fi
mkdir -p "$DIR/ffsend-$VERSION" mkdir -p "$DIR/ffsend-$VERSION"
cp -- "$DIR/../ffsend" "$DIR/ffsend-$VERSION/ffsend" cp -- "$DIR/../ffsend" "$DIR/ffsend-$VERSION/ffsend"
# Create an application tarbal # Create an application tarball
cd -- "$DIR/.." cd -- "$DIR/.."
git archive --format tar.gz -o "$DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz" "$TRAVIS_TAG" git archive --format tar.gz -o "$DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz" "$TRAVIS_TAG"

View file

@ -1,11 +1,8 @@
use chbs::{config::BasicConfig, prelude::*, word::WordList}; use chbs;
use clap::Arg; use clap::Arg;
use super::{CmdArg, CmdArgFlag}; use super::{CmdArg, CmdArgFlag};
/// How many words the passphrase should consist of.
const PASSPHRASE_WORDS: usize = 5;
/// The passphrase generation argument. /// The passphrase generation argument.
pub struct ArgGenPassphrase {} pub struct ArgGenPassphrase {}
@ -13,10 +10,7 @@ impl ArgGenPassphrase {
/// Generate a cryptographically secure passphrase that is easily /// Generate a cryptographically secure passphrase that is easily
/// remembered using diceware. /// remembered using diceware.
pub fn gen_passphrase() -> String { pub fn gen_passphrase() -> String {
let mut config = BasicConfig::default(); chbs::passphrase()
config.words = PASSPHRASE_WORDS;
config.word_provider = WordList::builtin_eff_general_short().sampler();
config.to_scheme().generate()
} }
} }

View file

@ -61,7 +61,7 @@ impl<'a: 'b, 'b> Handler<'a> {
let app = App::new(crate_name!()) let app = App::new(crate_name!())
.version(crate_version!()) .version(crate_version!())
.author(crate_authors!()) .author(crate_authors!())
.about(APP_ABOUT.as_ref()) .about(APP_ABOUT.as_str())
.after_help("This application is not affiliated with Firefox or Mozilla.") .after_help("This application is not affiliated with Firefox or Mozilla.")
.global_setting(AppSettings::GlobalVersion) .global_setting(AppSettings::GlobalVersion)
.global_setting(AppSettings::VersionlessSubcommands) .global_setting(AppSettings::VersionlessSubcommands)

View file

@ -8,7 +8,7 @@ use ffsend_api::{
url::Url, url::Url,
}; };
use toml::{de::Error as DeError, ser::Error as SerError}; use toml::{de::Error as DeError, ser::Error as SerError};
use version_compare::{CompOp, VersionCompare}; use version_compare::Cmp;
use crate::util::{print_error, print_warning}; use crate::util::{print_error, print_warning};
@ -62,9 +62,9 @@ impl History {
// Get the version number from the file // Get the version number from the file
let version = history.version.as_ref().unwrap(); let version = history.version.as_ref().unwrap();
if let Ok(true) = VersionCompare::compare_to(version, VERSION_MIN, &CompOp::Lt) { if let Ok(true) = version_compare::compare_to(version, VERSION_MIN, Cmp::Lt) {
print_warning("history file version is too old, ignoring"); print_warning("history file version is too old, ignoring");
} else if let Ok(true) = VersionCompare::compare_to(version, VERSION_MAX, &CompOp::Gt) { } else if let Ok(true) = version_compare::compare_to(version, VERSION_MAX, Cmp::Gt) {
print_warning("history file has an unknown version, ignoring"); print_warning("history file has an unknown version, ignoring");
} }
} }