mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-03-08 13:03:13 +08:00
key
This commit is contained in:
10
src/hbbr.rs
10
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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user