File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -960,7 +960,10 @@ pub fn get_custom_rendezvous_server(custom: String) -> String {
960960
961961#[ inline]
962962pub fn get_api_server ( api : String , custom : String ) -> String {
963- let res = get_api_server_ ( api, custom) ;
963+ let mut res = get_api_server_ ( api, custom) ;
964+ if res. ends_with ( '/' ) {
965+ res. pop ( ) ;
966+ }
964967 if res. starts_with ( "https" ) && res. ends_with ( ":21114" ) {
965968 return res. replace ( ":21114" , "" ) ;
966969 }
@@ -998,11 +1001,6 @@ pub fn is_public(url: &str) -> bool {
9981001 url. contains ( "rustdesk.com" )
9991002}
10001003
1001- #[ inline]
1002- pub fn is_selfhost ( url : & str ) -> bool {
1003- !is_public ( url)
1004- }
1005-
10061004pub fn get_audit_server ( api : String , custom : String , typ : String ) -> String {
10071005 let url = get_api_server ( api, custom) ;
10081006 if url. is_empty ( ) || is_public ( & url) {
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ async fn start_hbbs_sync_async() {
107107 }
108108 let v = v. to_string( ) ;
109109 let mut hash = "" . to_owned( ) ;
110- if crate :: is_selfhost ( & url) {
110+ if crate :: is_public ( & url) {
111111 use sha2:: { Digest , Sha256 } ;
112112 let mut hasher = Sha256 :: new( ) ;
113113 hasher. update( url. as_bytes( ) ) ;
You can’t perform that action at this time.
0 commit comments