From 3dd7351ec9079ec743167ba687841384fd025cd3 Mon Sep 17 00:00:00 2001 From: Macbook Date: Mon, 14 Oct 2024 20:41:55 +0700 Subject: [PATCH] clean up code,build --- .gitmodules.swp | Bin 0 -> 12288 bytes client/CMakeLists.txt | 1 - .../WireGuardNetworkExtension-Bridging-Header.h | 6 +++++- client/macos/scripts/openvpn.sh | 3 --- .../ios/PacketTunnelProvider+OpenVPN.swift | 2 +- client/translations/amneziavpn_ar_EG.ts | 12 ++++++------ client/translations/amneziavpn_fa_IR.ts | 12 ++++++------ client/translations/amneziavpn_hi_IN.ts | 12 ++++++------ client/translations/amneziavpn_my_MM.ts | 12 ++++++------ client/translations/amneziavpn_ru_RU.ts | 12 ++++++------ client/translations/amneziavpn_uk_UA.ts | 12 ++++++------ client/translations/amneziavpn_ur_PK.ts | 12 ++++++------ client/translations/amneziavpn_zh_CN.ts | 12 ++++++------ client/ui/notificationhandler.cpp | 2 -- client/ui/systemtray_notificationhandler.h | 2 +- 15 files changed, 55 insertions(+), 57 deletions(-) create mode 100644 .gitmodules.swp diff --git a/.gitmodules.swp b/.gitmodules.swp new file mode 100644 index 0000000000000000000000000000000000000000..b195fc11e074b4604779f9277cc7d57a95aa82d3 GIT binary patch literal 12288 zcmeI2Pixdb7{=fBAQW0HDtJw|7d^~QZ4v)~hpH$FtCiA%h{$9zyBRjgjFU;bE2!Yj zk0PGD_!;~NdJ?~hZ`#=HuF0}J$-+DEFbVU_%#+__4@=%~WB+j{xZU0WY^wl+o9BAp zAFaaT8bB&!XiUExnc6x+-a{YTafZo4FuX74wG$&na%$%LYC-=2=JlhW`g&_ExO8#v ztgDcp2oM1xKm>>Y5g-CYfCvzQIVRxk0(`*yi`6q+uKI>Y5g-CY zfCvx)B0vO)01=o&0wMy~UIzG#D!>2#{r~^t0>C%aJJbu*4b&CXuk!$3QJ+vxP*+jQ zsGlnUUr--WuTj@fi>Tk#+DGfpAs>oN1c(3;AOb{y2oM1xKm>@ue;}|_xFon6#NONd z4(C`I92a3*n)IY-_`qiT`L0fFqVBt)^`c23&JS4$Jeu*0o>`S) Xo&0trET(OWH}0y7Sibt>E{ypHtwCrB literal 0 HcmV?d00001 diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index ce74fc21..37580f74 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -379,7 +379,6 @@ if(IOS) include(cmake/ios.cmake) include(cmake/ios-arch-fixup.cmake) elseif(APPLE AND NOT IOS AND NOT DEFINED MACOS_NE) - # include(cmake/osxtools.cmake) include(cmake/macos.cmake) elseif(APPLE AND NOT IOS AND MACOS_NE) include(cmake/osxtools.cmake) diff --git a/client/macos/networkextension/WireGuardNetworkExtension-Bridging-Header.h b/client/macos/networkextension/WireGuardNetworkExtension-Bridging-Header.h index f911e186..12bf89be 100644 --- a/client/macos/networkextension/WireGuardNetworkExtension-Bridging-Header.h +++ b/client/macos/networkextension/WireGuardNetworkExtension-Bridging-Header.h @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #include "wireguard-go-version.h" #include "3rd/amneziawg-apple/Sources/WireGuardKitGo/wireguard.h" #include "3rd/amneziawg-apple/Sources/WireGuardKitC/WireGuardKitC.h" @@ -20,7 +24,7 @@ bool key_eq(const uint8_t key1[WG_KEY_LEN], const uint8_t key2[WG_KEY_LEN]); void write_msg_to_log(const char* tag, const char* msg); -// Khai báo hàm C để Swift có thể sử dụng +// init function definition in C void hev_socks5_tunnel_quit(void); // Updated function definition in C int hev_socks5_tunnel_main(const char* configFile, int fd); diff --git a/client/macos/scripts/openvpn.sh b/client/macos/scripts/openvpn.sh index 8c371618..a2937dd8 100644 --- a/client/macos/scripts/openvpn.sh +++ b/client/macos/scripts/openvpn.sh @@ -16,9 +16,6 @@ CONFIGURATION_BUILD_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos BUILT_PRODUCTS_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos EOF -# Exclude UIKit, include Cocoa for macOS -# echo "OTHER_LDFLAGS = -framework Cocoa" >> $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/amnezia.xcconfig - # Fetch the current macOS SDK version dynamically MACOSX_SDK=$(xcrun --sdk macosx --show-sdk-path | sed -E 's/.*MacOSX([0-9]+\.[0-9]+)\.sdk/\1/') diff --git a/client/platforms/ios/PacketTunnelProvider+OpenVPN.swift b/client/platforms/ios/PacketTunnelProvider+OpenVPN.swift index f1af7449..34a19fe5 100644 --- a/client/platforms/ios/PacketTunnelProvider+OpenVPN.swift +++ b/client/platforms/ios/PacketTunnelProvider+OpenVPN.swift @@ -47,7 +47,7 @@ extension PacketTunnelProvider { let configuration = OpenVPNConfiguration() configuration.fileContent = ovpnConfiguration if str.contains("cloak") { -// configuration.setPTCloak() + configuration.setPTCloak() } let evaluation: OpenVPNConfigurationEvaluation? diff --git a/client/translations/amneziavpn_ar_EG.ts b/client/translations/amneziavpn_ar_EG.ts index 515abd56..0aa5e32d 100644 --- a/client/translations/amneziavpn_ar_EG.ts +++ b/client/translations/amneziavpn_ar_EG.ts @@ -401,28 +401,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN AmneziaVPN - + VPN Connected تم الاتصال - + VPN Disconnected تم إنهاء الاتصال - + AmneziaVPN notification إشعار من AmneziaVPN - + Unsecured network detected: تم العثور علي شبكة غير مؤمنة: diff --git a/client/translations/amneziavpn_fa_IR.ts b/client/translations/amneziavpn_fa_IR.ts index 468f16b4..f3ed01be 100644 --- a/client/translations/amneziavpn_fa_IR.ts +++ b/client/translations/amneziavpn_fa_IR.ts @@ -405,28 +405,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN AmneziaVPN - + VPN Connected وی‎پی‎ان وصل شد - + VPN Disconnected وی‎پی‎ان قطع شد - + AmneziaVPN notification اخطار AmneziaVPN - + Unsecured network detected: شبکه ناامن شناسایی شد: diff --git a/client/translations/amneziavpn_hi_IN.ts b/client/translations/amneziavpn_hi_IN.ts index 92cebd8c..036c0d7e 100644 --- a/client/translations/amneziavpn_hi_IN.ts +++ b/client/translations/amneziavpn_hi_IN.ts @@ -401,28 +401,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN AmneziaVPN - + VPN Connected कनेक्ट - + VPN Disconnected कनेक्ट - + AmneziaVPN notification AmneziaVPN अधिसूचना - + Unsecured network detected: असुरक्षित नेटवर्क का पता चला: diff --git a/client/translations/amneziavpn_my_MM.ts b/client/translations/amneziavpn_my_MM.ts index 7479e454..1e391587 100644 --- a/client/translations/amneziavpn_my_MM.ts +++ b/client/translations/amneziavpn_my_MM.ts @@ -401,28 +401,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN AmneziaVPN - + VPN Connected VPN ချိတ်ဆက်ထားပါပြီ - + VPN Disconnected VPN ဖြုတ်လိုက်ပါပြီ - + AmneziaVPN notification AmneziaVPN နိုတီ - + Unsecured network detected: လုံခြုံမှုမရှိသောကွန်ရက်မှန်း ထောက်လှန်းမိသည်: diff --git a/client/translations/amneziavpn_ru_RU.ts b/client/translations/amneziavpn_ru_RU.ts index b8f1a242..c059f186 100644 --- a/client/translations/amneziavpn_ru_RU.ts +++ b/client/translations/amneziavpn_ru_RU.ts @@ -405,28 +405,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN AmneziaVPN - + VPN Connected VPN подключен - + VPN Disconnected VPN выключен - + AmneziaVPN notification Уведомление AmneziaVPN - + Unsecured network detected: Обнаружена незащищенная сеть: diff --git a/client/translations/amneziavpn_uk_UA.ts b/client/translations/amneziavpn_uk_UA.ts index 73a731ec..1acb34f9 100644 --- a/client/translations/amneziavpn_uk_UA.ts +++ b/client/translations/amneziavpn_uk_UA.ts @@ -431,28 +431,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN AmneziaVPN - + VPN Connected VPN Підключено - + VPN Disconnected VPN Вимкнено - + AmneziaVPN notification Сповіщення AmneziaVPN - + Unsecured network detected: Знайдена не захищена мережа: diff --git a/client/translations/amneziavpn_ur_PK.ts b/client/translations/amneziavpn_ur_PK.ts index 5faa241a..495aa6ac 100644 --- a/client/translations/amneziavpn_ur_PK.ts +++ b/client/translations/amneziavpn_ur_PK.ts @@ -399,30 +399,30 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN The translation of "AmneziaVPN" in Urdu would be: امنیزیا وی پی ای - + VPN Connected وی پی این متصل ہوگیا - + VPN Disconnected وی پی این منقطع ہوگیا - + AmneziaVPN notification امنیزیا وی پی این کی اطلاعات - + Unsecured network detected: غیر محفوظ نیٹ ورک کا پتہ لگایا گیا ہے: diff --git a/client/translations/amneziavpn_zh_CN.ts b/client/translations/amneziavpn_zh_CN.ts index 8015c249..c3f15afb 100644 --- a/client/translations/amneziavpn_zh_CN.ts +++ b/client/translations/amneziavpn_zh_CN.ts @@ -427,28 +427,28 @@ Already installed containers were found on the server. All installed containers NotificationHandler - - + + AmneziaVPN - + VPN Connected 已连接到VPN - + VPN Disconnected 已从VPN断开 - + AmneziaVPN notification AmneziaVPN 提示 - + Unsecured network detected: 发现不安全网络 diff --git a/client/ui/notificationhandler.cpp b/client/ui/notificationhandler.cpp index b8ad8957..dc5710a7 100644 --- a/client/ui/notificationhandler.cpp +++ b/client/ui/notificationhandler.cpp @@ -7,8 +7,6 @@ #if defined(Q_OS_IOS) || defined(MACOS_NE) # include "platforms/ios/iosnotificationhandler.h" -// #elif defined(MACOS_NE) -// # include "platforms/ios/iosnotificationhandler.h" #else # include "systemtray_notificationhandler.h" #endif diff --git a/client/ui/systemtray_notificationhandler.h b/client/ui/systemtray_notificationhandler.h index a3fb84cc..60bf0b35 100644 --- a/client/ui/systemtray_notificationhandler.h +++ b/client/ui/systemtray_notificationhandler.h @@ -8,7 +8,7 @@ #include "notificationhandler.h" #include -#include 'QMenu' file not found +#include class SystemTrayNotificationHandler : public NotificationHandler { Q_OBJECT