aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main.rs
diff options
context:
space:
mode:
authoropentrade <[email protected]>2021-04-08 17:53:56 +0800
committeropentrade <[email protected]>2021-04-08 17:53:56 +0800
commit25554dd3186cab764e499614a637f71be75b5d46 (patch)
tree472af0af35e2a833bebee168a471a6b11e68ea6b /src/main.rs
parent92bd9c325053c5b21fb424a45eae7215160ed610 (diff)
downloadrustdesk-server-25554dd3186cab764e499614a637f71be75b5d46.tar.gz
rustdesk-server-25554dd3186cab764e499614a637f71be75b5d46.zip
lic draft
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 888fa11..16de822 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,6 +4,7 @@
use clap::App;
use hbb_common::{env_logger::*, log, ResultType};
use hbbs::*;
+mod lic;
use ini::Ini;
use std::sync::{Arc, Mutex};
@@ -17,8 +18,9 @@ fn main() -> ResultType<()> {
-u, --software-url=[URL] 'Sets download url of RustDesk software of newest version'
-r, --relay-servers=[HOST] 'Sets the default relay servers, seperated by colon'
-C, --change-id=[BOOL(default=Y)] 'Sets if support to change id'
+ {}
-k, --key=[KEY] 'Only allow the client with the same key'",
- DEFAULT_PORT,
+ DEFAULT_PORT, lic::EMAIL_ARG
);
let matches = App::new("hbbs")
.version(crate::VERSION)
@@ -62,6 +64,9 @@ fn main() -> ResultType<()> {
log::info!("serial={}", serial);
log::info!("rendezvous-servers={:?}", rendezvous_servers);
let stop: Arc<Mutex<bool>> = Default::default();
+ if !lic::check_lic(&get_arg("email", "")) {
+ return Ok(());
+ }
RendezvousServer::start(
&addr,
&addr2,