Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rage-mount: Add support for mounting an encrypted file #190

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 84 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion rage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ rust-embed = "5"
secrecy = "0.7"

# rage-mount dependencies
ctrlc = { version = "3.1.7", optional = true }
fuse_mt = { version = "0.5.1", optional = true }
libc = { version = "0.2", optional = true }
nix = { version = "0.18", optional = true }
tar = { version = "0.4", optional = true }
tempfile = { version = "3.2", optional = true }
time = { version = "0.1", optional = true }
zip = { version = "0.5.9", optional = true }

Expand All @@ -71,7 +74,7 @@ man = "0.3"

[features]
default = ["ssh"]
mount = ["fuse_mt", "libc", "tar", "time", "zip"]
mount = ["ctrlc", "fuse_mt", "libc", "nix", "tar", "tempfile", "time", "zip"]
ssh = ["age/ssh"]
unstable = ["age/unstable"]

Expand Down
7 changes: 6 additions & 1 deletion rage/examples/generate-docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn rage_mount_page() {
Flag::new()
.short("-t")
.long("--types")
.help("The type of the filesystem (one of \"tar\", \"zip\")."),
.help("The type of the filesystem (one of \"file\", \"tar\", \"zip\")."),
)
.option(
Opt::new("IDENTITY")
Expand All @@ -186,6 +186,11 @@ fn rage_mount_page() {
)
.arg(Arg::new("filename"))
.arg(Arg::new("mountpoint"))
.example(
Example::new()
.text("Mounting an encrypted file to a recipient")
.command("rage-mount -t file -i key.txt encrypted.txt.age decrypted.txt"),
)
.example(
Example::new()
.text("Mounting an archive encrypted to a recipient")
Expand Down
1 change: 1 addition & 0 deletions rage/i18n/en-US/rage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ info-mounting-as-fuse = Mounting as FUSE filesystem
err-mnt-missing-filename = Missing filename.
err-mnt-missing-mountpoint = Missing mountpoint.
err-mnt-missing-types = Missing {-flag-mnt-types}.
err-mnt-must-be-file = Mountpoint must be a file.
err-mnt-unknown-type = Unknown filesystem type "{$fs_type}"
## Unstable features
Expand Down
Loading