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

@@ -134,13 +134,6 @@ pub fn show_run_without_install() -> bool {
false
}
#[inline]
pub fn has_rendezvous_service() -> bool {
#[cfg(all(windows, feature = "hbbs"))]
return crate::platform::is_win_server() && crate::platform::windows::get_license().is_some();
return false;
}
#[inline]
pub fn get_license() -> String {
#[cfg(windows)]
@@ -243,7 +236,8 @@ pub fn set_peer_option(id: String, name: String, value: String) {
#[inline]
pub fn using_public_server() -> bool {
crate::get_custom_rendezvous_server(get_option_("custom-rendezvous-server")).is_empty()
option_env!("RENDEZVOUS_SERVER").is_none()
&& crate::get_custom_rendezvous_server(get_option_("custom-rendezvous-server")).is_empty()
}
#[inline]