clean up code,build

This commit is contained in:
Macbook 2024-10-14 20:41:55 +07:00
parent f064b9e2c4
commit 3dd7351ec9
15 changed files with 55 additions and 57 deletions

BIN
.gitmodules.swp Normal file

Binary file not shown.

View file

@ -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)

View file

@ -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);

View file

@ -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/')

View file

@ -47,7 +47,7 @@ extension PacketTunnelProvider {
let configuration = OpenVPNConfiguration()
configuration.fileContent = ovpnConfiguration
if str.contains("cloak") {
// configuration.setPTCloak()
configuration.setPTCloak()
}
let evaluation: OpenVPNConfigurationEvaluation?

View file

@ -401,28 +401,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>تم الاتصال</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>تم إنهاء الاتصال</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>إشعار من AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>تم العثور علي شبكة غير مؤمنة: </translation>
</message>

View file

@ -405,28 +405,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>ویپیان وصل شد</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>ویپیان قطع شد</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>اخطار AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>شبکه ناامن شناسایی شد: </translation>
</message>

View file

@ -401,28 +401,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation></translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation></translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>AmneziaVPN ि</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>ि : </translation>
</message>

View file

@ -401,28 +401,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>VPN က</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>VPN က</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>AmneziaVPN </translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>ကက က: </translation>
</message>

View file

@ -405,28 +405,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>VPN подключен</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>VPN выключен</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>Уведомление AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>Обнаружена незащищенная сеть: </translation>
</message>

View file

@ -431,28 +431,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>VPN Підключено</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>VPN Вимкнено</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>Сповіщення AmneziaVPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>Знайдена не захищена мережа: </translation>
</message>

View file

@ -399,30 +399,30 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation>The translation of &quot;AmneziaVPN&quot; in Urdu would be:
امنیزیا وی پی ای</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>وی پی این متصل ہوگیا</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>وی پی این منقطع ہوگیا</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>امنیزیا وی پی این کی اطلاعات</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation>غیر محفوظ نیٹ ورک کا پتہ لگایا گیا ہے: </translation>
</message>

View file

@ -427,28 +427,28 @@ Already installed containers were found on the server. All installed containers
<context>
<name>NotificationHandler</name>
<message>
<location filename="../ui/notificationhandler.cpp" line="66"/>
<location filename="../ui/notificationhandler.cpp" line="73"/>
<location filename="../ui/notificationhandler.cpp" line="64"/>
<location filename="../ui/notificationhandler.cpp" line="71"/>
<source>AmneziaVPN</source>
<translation></translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="67"/>
<location filename="../ui/notificationhandler.cpp" line="65"/>
<source>VPN Connected</source>
<translation>VPN</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="74"/>
<location filename="../ui/notificationhandler.cpp" line="72"/>
<source>VPN Disconnected</source>
<translation>VPN断开</translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="97"/>
<location filename="../ui/notificationhandler.cpp" line="95"/>
<source>AmneziaVPN notification</source>
<translation>AmneziaVPN </translation>
</message>
<message>
<location filename="../ui/notificationhandler.cpp" line="98"/>
<location filename="../ui/notificationhandler.cpp" line="96"/>
<source>Unsecured network detected: </source>
<translation></translation>
</message>

View file

@ -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

View file

@ -8,7 +8,7 @@
#include "notificationhandler.h"
#include <QMenu>
#include <QSystemTrayIcon>'QMenu' file not found
#include <QSystemTrayIcon>
class SystemTrayNotificationHandler : public NotificationHandler {
Q_OBJECT