!!! This Repo is a mirror of qrustcp and will not be further updated !!!
Thought that I should implement my version of qrcp just because I really don't like go.
What language wold best fit this task? Rust of course! Why?
- It's blazing fast
- It's safe
- Other justific-VALID REASONS ... There isn't much more to it.
cargo install --git https://gitlab.com/comodino/qrustcp.git --branch masterThe CLI supports two commands:
send, to send one or multiple filesreceive, to receive one or multiple files
They both have subcommands:
pub struct SendArgs {
/// Files to send
#[arg(required = true)]
pub files: Vec<PathBuf>,
/// Compression format
#[arg(short, long, default_value = "bz2")]
pub compression: CompressionFormat,
/// Port to use (random if not specified)
#[arg(short, long)]
pub port: Option<u16>,
/// Don't show QR code
#[arg(long)]
pub no_qr: bool,
/// Timeout in seconds (default: no timeout)
#[arg(short, long)]
pub timeout: Option<u64>,
}pub struct ReceiveArgs {
/// Output directory for received files
#[arg(short, long, default_value = ".")]
pub output: PathBuf,
/// Compression format for multiple files
#[arg(short, long, default_value = "bz2")]
pub compression: CompressionFormat,
/// Port to use (random if not specified)
#[arg(short, long)]
pub port: Option<u16>,
/// Don't show QR code
#[arg(long)]
pub no_qr: bool,
/// Timeout in seconds (default: no timeout)
#[arg(short, long)]
pub timeout: Option<u64>,
}When ran it tries to create open a server with an endpoint in the local network.
The webapp is embedded in the code, which
is a clever way to make it faster, while
also being a terrible way of editing it.
(All the HTML/CSS/JS code is AI generated)
If it succeds then it will try to either locate the files supplied and proceed to compress them before sending them out, or wait for a connection and compress then download the files uploaded.
When uploading/downloading multiple files
they are compressed by default, using bz.
One can choose not to show the QR code.
# send file(s)
qrustcp send [ -c, --compression { gz, bz, xz, zip } ] [FILE...]
# receive file(s)
qrustcp receive [ -c, --compression { gz, bz, xz, zip } ] [ -o, --output <outname> ]cargo build # debug build
cargo build --release # release build