From 86b327ee41d12987858888e54bf7356d0a5b81db Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 18 Feb 2025 16:18:41 +0800 Subject: [PATCH] they always forget to remove :21114 for https, so I remove for them --- src/common.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common.rs b/src/common.rs index 56361a5da..9865ab85c 100644 --- a/src/common.rs +++ b/src/common.rs @@ -898,7 +898,16 @@ pub fn get_custom_rendezvous_server(custom: String) -> String { "".to_owned() } +#[inline] pub fn get_api_server(api: String, custom: String) -> String { + let res = get_api_server_(api, custom); + if res.starts_with("https") && res.ends_with(":21114") { + return res.replace(":21114", ""); + } + res +} + +fn get_api_server_(api: String, custom: String) -> String { #[cfg(windows)] if let Ok(lic) = crate::platform::windows::get_license_from_exe_name() { if !lic.api.is_empty() {