From d00b8bb5805f7f81591f22f3446dbe8c89e55a8f Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 13 May 2025 22:40:49 +0800 Subject: [PATCH 1/4] stupid me --- src/common.rs | 10 ++++------ src/hbbs_http/sync.rs | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/common.rs b/src/common.rs index 9f627f39aa7..f6c9ce0dff2 100644 --- a/src/common.rs +++ b/src/common.rs @@ -960,7 +960,10 @@ pub fn get_custom_rendezvous_server(custom: String) -> String { #[inline] pub fn get_api_server(api: String, custom: String) -> String { - let res = get_api_server_(api, custom); + let mut res = get_api_server_(api, custom); + if res.ends_with('/') { + res.pop(); + } if res.starts_with("https") && res.ends_with(":21114") { return res.replace(":21114", ""); } @@ -998,11 +1001,6 @@ pub fn is_public(url: &str) -> bool { url.contains("rustdesk.com") } -#[inline] -pub fn is_selfhost(url: &str) -> bool { - !is_public(url) -} - pub fn get_audit_server(api: String, custom: String, typ: String) -> String { let url = get_api_server(api, custom); if url.is_empty() || is_public(&url) { diff --git a/src/hbbs_http/sync.rs b/src/hbbs_http/sync.rs index abf62f3933e..c579cf0425e 100644 --- a/src/hbbs_http/sync.rs +++ b/src/hbbs_http/sync.rs @@ -107,7 +107,7 @@ async fn start_hbbs_sync_async() { } let v = v.to_string(); let mut hash = "".to_owned(); - if crate::is_selfhost(&url) { + if crate::is_public(&url) { use sha2::{Digest, Sha256}; let mut hasher = Sha256::new(); hasher.update(url.as_bytes()); From 9c0711e1db41d4219d0f956b6a11e3a17a52ff92 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Wed, 14 May 2025 01:18:54 +0800 Subject: [PATCH 2/4] Update winget.yml --- .github/workflows/winget.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index 52bb17e6f0b..2fa8e3700f7 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -2,6 +2,7 @@ name: Publish to WinGet on: release: types: [released] + workflow_dispatch: jobs: publish: runs-on: ubuntu-latest @@ -9,5 +10,5 @@ jobs: - uses: vedantmgoyal9/winget-releaser@main with: identifier: RustDesk.RustDesk - version: ${{ github.event.release.tag_name }} + version: 1.4.0 token: ${{ secrets.WINGET_TOKEN }} From 43501b663edccefbcf8e1f7a41e5c836ca75434f Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Wed, 14 May 2025 01:21:04 +0800 Subject: [PATCH 3/4] Update winget.yml --- .github/workflows/winget.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index 2fa8e3700f7..6b8d4c61e93 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -10,5 +10,5 @@ jobs: - uses: vedantmgoyal9/winget-releaser@main with: identifier: RustDesk.RustDesk - version: 1.4.0 + version: "1.4.0" token: ${{ secrets.WINGET_TOKEN }} From cee69bb8b4b7220a8b0a723b5bc94e38b2b3fae0 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Wed, 14 May 2025 01:33:08 +0800 Subject: [PATCH 4/4] Update winget.yml --- .github/workflows/winget.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index 6b8d4c61e93..6fb0e9f4e81 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -11,4 +11,5 @@ jobs: with: identifier: RustDesk.RustDesk version: "1.4.0" + release-tag: "1.4.0" token: ${{ secrets.WINGET_TOKEN }}