mirror of
https://github.com/bryangerlach/rdgen.git
synced 2025-11-29 00:23:27 +00:00
fix setup_server_tip
This commit is contained in:
29
.github/patches/allowCustom.diff
vendored
Normal file
29
.github/patches/allowCustom.diff
vendored
Normal file
@@ -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::<std::collections::HashMap<String, serde_json::Value>>(&data)
|
||||
else {
|
||||
13
.github/patches/removeSetupServerTip.diff
vendored
Normal file
13
.github/patches/removeSetupServerTip.diff
vendored
Normal file
@@ -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<OnlineStatusWidget> {
|
||||
if (!isIncomingOnly) startServiceWidget(),
|
||||
// ready && public
|
||||
// No need to show the guide if is custom client.
|
||||
- if (!isIncomingOnly) setupServerWidget(),
|
||||
+ //if (!isIncomingOnly) setupServerWidget(),
|
||||
],
|
||||
);
|
||||
|
||||
7
.github/workflows/generator-linux.yml
vendored
7
.github/workflows/generator-linux.yml
vendored
@@ -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
|
||||
|
||||
7
.github/workflows/generator-macos.yml
vendored
7
.github/workflows/generator-macos.yml
vendored
@@ -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
|
||||
|
||||
7
.github/workflows/generator-windows.yml
vendored
7
.github/workflows/generator-windows.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user