Skip to content

Commit

Permalink
Merge pull request #82 from genonullfree/fix/input-arguments
Browse files Browse the repository at this point in the history
Fix multiple input values
  • Loading branch information
genonullfree authored Apr 17, 2022
2 parents 6010767 + 3204682 commit 0d8d221
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "teleporter"
version = "0.9.4"
version = "0.9.5"
authors = ["geno nullfree <[email protected]>"]
license = "BSD-3-Clause"
description = "A small utility to send files quickly from point A to point B"
Expand All @@ -14,7 +14,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "3.0.0", features = ["derive"] }
clap = { version = "3", features = ["derive"] }
byteorder = "1.4.3"
xxhash-rust = { version = "0.8.2", features = ["xxh3"] }
aes-gcm = "0.9.4"
Expand Down
24 changes: 12 additions & 12 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,51 @@ mod utils;
#[derive(Clone, Debug, Parser)]
pub struct Opt {
/// List of filepaths to files that will be teleported
#[structopt(short, long, parse(from_os_str), default_value = "")]
#[clap(short, long, multiple_values = true, default_value = "")]
input: Vec<PathBuf>,

/// Destination teleporter IP address
#[structopt(short, long, default_value = "127.0.0.1")]
#[clap(short, long, default_value = "127.0.0.1")]
dest: String,

/// Destination teleporter Port, or Port to listen on
#[structopt(short, long, default_value = "9001")]
#[clap(short, long, default_value = "9001")]
port: u16,

/// Overwrite remote file
#[structopt(short, long)]
#[clap(short, long)]
overwrite: bool,

/// Recurse into directories on send
#[structopt(short, long)]
#[clap(short, long)]
recursive: bool,

/// Encrypt the file transfer using ECDH key-exchange and random keys
#[structopt(short, long)]
#[clap(short, long)]
encrypt: bool,

/// Disable delta transfer (overwrite will transfer entire file)
#[structopt(short, long)]
#[clap(short, long)]
no_delta: bool,

/// Keep path info (recreate directory path on remote server)
#[structopt(short, long)]
#[clap(short, long)]
keep_path: bool,

/// Allow absolute and relative file paths for transfers (server only) [WARNING: potentially dangerous option, use at your own risk!]
#[structopt(long)]
#[clap(long)]
allow_dangerous_filepath: bool,

/// Backup the destination file to a ".bak" extension if it exists and is being overwritten (consecutive runs will replace the *.bak file)
#[structopt(short, long)]
#[clap(short, long)]
backup: bool,

/// If the destination file exists, append a ".1" (or next available number) to the filename instead of overwriting
#[structopt(short, long)]
#[clap(short, long)]
filename_append: bool,

/// Require encryption for incoming connections to the server
#[structopt(short, long)]
#[clap(short, long)]
must_encrypt: bool,
}

Expand Down

0 comments on commit 0d8d221

Please sign in to comment.