mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Allow setting custom server and key with env variables #2810
This commit is contained in:
@@ -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));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user