qumaraa / fshare

Rust implementation of Command-line File-Sharing tool using HTTP in localhost🦀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fshare 📁

Official Rust implementation of Command-line File-Sharing tool 🦀.

Available Send & Upload features!

MIT License Version

Logs 🖥️

log_debug (set as default)

log_info

log_warn

log_err

log_trace

Port Generation

let port = rng.gen_range(49152..=65535);
let srv = HttpServer::new({
       /**/
    })
    .bind(("0.0.0.0", port.clone())) /* <- binds to a local network with a randomly generated port */
    .unwrap()
    .run();

    /*
      Sometimes it may happen that the code can generate
      a port that is used by the operating system or other programs, but it's not critical.
    */

Example

Usage: fshare <COMMAND>

Commands:
  send
  recv
  help  Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
fshare help send
Usage: fshare send --path <PATH> --log <LOG>

Options:
  -p, --path <PATH>  Path of file for sending to server for downloading.
  -l, --log <LOG>    Choose log-level. Level::DEBUG set as default.
  -h, --help         Print help
fshare help recv
Usage: fshare recv --log <LOG>

Options:
  -l, --log <LOG>  Choose log-level. Level::DEBUG set as default.
  -h, --help       Print help
fshare --version
fshare 2.1

About

Rust implementation of Command-line File-Sharing tool using HTTP in localhost🦀


Languages

Language:Rust 67.5%Language:HTML 32.5%