diff options
author | open-trade <[email protected]> | 2021-03-30 16:01:22 +0800 |
---|---|---|
committer | open-trade <[email protected]> | 2021-03-30 16:01:22 +0800 |
commit | 244410cda9eb44ef7b2467e58d64e49aaebfca46 (patch) | |
tree | 83655578264ff66a5eed5c90b49286824b4a9d25 /src/hbbr.rs | |
parent | 457c74d203aa52610c17327337bbe5068d7bdfc7 (diff) | |
download | rustdesk-server-244410cda9eb44ef7b2467e58d64e49aaebfca46.tar.gz rustdesk-server-244410cda9eb44ef7b2467e58d64e49aaebfca46.zip |
key
Diffstat (limited to 'src/hbbr.rs')
-rw-r--r-- | src/hbbr.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/hbbr.rs b/src/hbbr.rs index e65b6ce..c2ac21b 100644 --- a/src/hbbr.rs +++ b/src/hbbr.rs @@ -7,7 +7,9 @@ use std::sync::{Arc, Mutex}; fn main() -> ResultType<()> { init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info")); let args = format!( - "-p, --port=[NUMBER(default={})] 'Sets the listening port'", + "-p, --port=[NUMBER(default={})] 'Sets the listening port' + -k, --key=[KEY] 'Only allow the client with the same key' + ", DEFAULT_PORT ); let matches = App::new("hbbr") @@ -17,6 +19,10 @@ fn main() -> ResultType<()> { .args_from_usage(&args) .get_matches(); let stop: Arc<Mutex<bool>> = Default::default(); - start(matches.value_of("port").unwrap_or(DEFAULT_PORT), "", stop)?; + start( + matches.value_of("port").unwrap_or(DEFAULT_PORT), + matches.value_of("key").unwrap_or(""), + stop, + )?; Ok(()) } |