diff --git a/.github/patches/allowCustom.diff b/.github/patches/allowCustom.diff new file mode 100644 index 0000000..5cf437b --- /dev/null +++ b/.github/patches/allowCustom.diff @@ -0,0 +1,29 @@ +diff --git a/src/common.rs b/src/common.rs +index 56361a5da..92b221e9a 100644 +--- a/src/common.rs ++++ b/src/common.rs +@@ -1474,15 +1474,15 @@ pub fn read_custom_client(config: &str) { + log::error!("Failed to decode custom client config"); + return; + }; +- const KEY: &str = "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM="; +- let Some(pk) = get_rs_pk(KEY) else { +- log::error!("Failed to parse public key of custom client"); +- return; +- }; +- let Ok(data) = sign::verify(&data, &pk) else { +- log::error!("Failed to dec custom client config"); +- return; +- }; ++ // const KEY: &str = "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM="; ++ // let Some(pk) = get_rs_pk(KEY) else { ++ // log::error!("Failed to parse public key of custom client"); ++ // return; ++ // }; ++ // let Ok(data) = sign::verify(&data, &pk) else { ++ // log::error!("Failed to dec custom client config"); ++ // return; ++ // }; + let Ok(mut data) = + serde_json::from_slice::>(&data) + else { diff --git a/.github/patches/removeSetupServerTip.diff b/.github/patches/removeSetupServerTip.diff new file mode 100644 index 0000000..044b0d0 --- /dev/null +++ b/.github/patches/removeSetupServerTip.diff @@ -0,0 +1,13 @@ +diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart +index d9dc3eec4..76f386b76 100644 +--- a/flutter/lib/desktop/pages/connection_page.dart ++++ b/flutter/lib/desktop/pages/connection_page.dart +@@ -131,7 +131,7 @@ class _OnlineStatusWidgetState extends State { + if (!isIncomingOnly) startServiceWidget(), + // ready && public + // No need to show the guide if is custom client. +- if (!isIncomingOnly) setupServerWidget(), ++ //if (!isIncomingOnly) setupServerWidget(), + ], + ); + diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index 010744a..3e8839c 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -293,9 +293,10 @@ jobs: run: | sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs - sed -i -e '/const KEY:/,/};/d' ./src/common.rs - sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs + wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff + git apply allowCustom.diff + wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff + git apply removeSetupServerTip.diff echo -n "${{ inputs.custom }}" | cat > ./custom.txt sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs diff --git a/.github/workflows/generator-macos.yml b/.github/workflows/generator-macos.yml index 0693121..a29e57e 100644 --- a/.github/workflows/generator-macos.yml +++ b/.github/workflows/generator-macos.yml @@ -238,11 +238,12 @@ jobs: sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs - sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs - sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs + wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff + git apply allowCustom.diff + wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff + git apply removeSetupServerTip.diff # Update pubspec.yaml with proper YAML formatting cp ./flutter/pubspec.yaml ./flutter/pubspec.yaml.bak diff --git a/.github/workflows/generator-windows.yml b/.github/workflows/generator-windows.yml index cafac75..405b51f 100644 --- a/.github/workflows/generator-windows.yml +++ b/.github/workflows/generator-windows.yml @@ -234,9 +234,10 @@ jobs: run: | sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs - sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs - sed -i -e '/const KEY:/,/};/d' ./src/common.rs - sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs + Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/allowCustom.diff -OutFile allowCustom.diff + git apply allowCustom.diff + Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff -OutFile removeSetupServerTip.diff + git apply removeSetupServerTip.diff sed -i -e 's|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs # ./flutter/pubspec.yaml sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml