Allow setting custom server and key with env variables #2810

This commit is contained in:
rustdesk
2023-01-18 14:22:41 +08:00
parent 5dcc77cf7b
commit 8fb3c452be
6 changed files with 15 additions and 33 deletions

View File

@@ -1368,22 +1368,6 @@ pub fn get_license() -> Option<License> {
pub fn bootstrap() {
if let Some(lic) = get_license() {
*config::PROD_RENDEZVOUS_SERVER.write().unwrap() = lic.host.clone();
#[cfg(feature = "hbbs")]
{
if !is_win_server() {
return;
}
crate::hbbs::bootstrap(&lic.key, &lic.host);
std::thread::spawn(move || loop {
let tmp = Config::get_option("stop-rendezvous-service");
if tmp.is_empty() {
crate::hbbs::start();
} else {
crate::hbbs::stop();
}
std::thread::sleep(std::time::Duration::from_millis(100));
});
}
}
}