diff --git a/client/core/controllers/serverController.cpp b/client/core/controllers/serverController.cpp index 0f88e370..1b661b6e 100644 --- a/client/core/controllers/serverController.cpp +++ b/client/core/controllers/serverController.cpp @@ -367,25 +367,25 @@ bool ServerController::isReinstallContainerRequired(DockerContainer container, c || (oldProtoConfig.value(config_key::underloadPacketMagicHeader).toString(protocols::awg::defaultUnderloadPacketMagicHeader) != newProtoConfig.value(config_key::underloadPacketMagicHeader).toString(protocols::awg::defaultUnderloadPacketMagicHeader)) || (oldProtoConfig.value(config_key::transportPacketMagicHeader).toString(protocols::awg::defaultTransportPacketMagicHeader)) - != newProtoConfig.value(config_key::transportPacketMagicHeader).toString(protocols::awg::defaultTransportPacketMagicHeader) - || (oldProtoConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1)) - != newProtoConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1) - || (oldProtoConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2)) - != newProtoConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2) - || (oldProtoConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3)) - != newProtoConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3) - || (oldProtoConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4)) - != newProtoConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4) - || (oldProtoConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5)) - != newProtoConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5) - || (oldProtoConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1)) - != newProtoConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1) - || (oldProtoConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2)) - != newProtoConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2) - || (oldProtoConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3)) - != newProtoConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3) - || (oldProtoConfig.value(config_key::specialHandshakeTimeout).toString(protocols::awg::defaultSpecialHandshakeTimeout)) - != newProtoConfig.value(config_key::specialHandshakeTimeout).toString(protocols::awg::defaultSpecialHandshakeTimeout)) + != newProtoConfig.value(config_key::transportPacketMagicHeader).toString(protocols::awg::defaultTransportPacketMagicHeader)) + // || (oldProtoConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1)) + // != newProtoConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1) + // || (oldProtoConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2)) + // != newProtoConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2) + // || (oldProtoConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3)) + // != newProtoConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3) + // || (oldProtoConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4)) + // != newProtoConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4) + // || (oldProtoConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5)) + // != newProtoConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5) + // || (oldProtoConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1)) + // != newProtoConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1) + // || (oldProtoConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2)) + // != newProtoConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2) + // || (oldProtoConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3)) + // != newProtoConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3) + // || (oldProtoConfig.value(config_key::specialHandshakeTimeout).toString(protocols::awg::defaultSpecialHandshakeTimeout)) + // != newProtoConfig.value(config_key::specialHandshakeTimeout).toString(protocols::awg::defaultSpecialHandshakeTimeout)) return true; } @@ -657,15 +657,15 @@ ServerController::Vars ServerController::genVarsForScript(const ServerCredential vars.append({ { "$RESPONSE_PACKET_MAGIC_HEADER", amneziaWireguarConfig.value(config_key::responsePacketMagicHeader).toString() } }); vars.append({ { "$UNDERLOAD_PACKET_MAGIC_HEADER", amneziaWireguarConfig.value(config_key::underloadPacketMagicHeader).toString() } }); vars.append({ { "$TRANSPORT_PACKET_MAGIC_HEADER", amneziaWireguarConfig.value(config_key::transportPacketMagicHeader).toString() } }); - vars.append({ { "$SPECIAL_JUNK_1", amneziaWireguarConfig.value(config_key::specialJunk1).toString() } }); - vars.append({ { "$SPECIAL_JUNK_2", amneziaWireguarConfig.value(config_key::specialJunk2).toString() } }); - vars.append({ { "$SPECIAL_JUNK_3", amneziaWireguarConfig.value(config_key::specialJunk3).toString() } }); - vars.append({ { "$SPECIAL_JUNK_4", amneziaWireguarConfig.value(config_key::specialJunk4).toString() } }); - vars.append({ { "$SPECIAL_JUNK_5", amneziaWireguarConfig.value(config_key::specialJunk5).toString() } }); - vars.append({ { "$CONTROLLED_JUNK_1", amneziaWireguarConfig.value(config_key::controlledJunk1).toString() } }); - vars.append({ { "$CONTROLLED_JUNK_2", amneziaWireguarConfig.value(config_key::controlledJunk2).toString() } }); - vars.append({ { "$CONTROLLED_JUNK_3", amneziaWireguarConfig.value(config_key::controlledJunk3).toString() } }); - vars.append({ { "$SPECIAL_HANDSHAKE_TIMEOUT", amneziaWireguarConfig.value(config_key::specialHandshakeTimeout).toString() } }); + // vars.append({ { "$SPECIAL_JUNK_1", amneziaWireguarConfig.value(config_key::specialJunk1).toString() } }); + // vars.append({ { "$SPECIAL_JUNK_2", amneziaWireguarConfig.value(config_key::specialJunk2).toString() } }); + // vars.append({ { "$SPECIAL_JUNK_3", amneziaWireguarConfig.value(config_key::specialJunk3).toString() } }); + // vars.append({ { "$SPECIAL_JUNK_4", amneziaWireguarConfig.value(config_key::specialJunk4).toString() } }); + // vars.append({ { "$SPECIAL_JUNK_5", amneziaWireguarConfig.value(config_key::specialJunk5).toString() } }); + // vars.append({ { "$CONTROLLED_JUNK_1", amneziaWireguarConfig.value(config_key::controlledJunk1).toString() } }); + // vars.append({ { "$CONTROLLED_JUNK_2", amneziaWireguarConfig.value(config_key::controlledJunk2).toString() } }); + // vars.append({ { "$CONTROLLED_JUNK_3", amneziaWireguarConfig.value(config_key::controlledJunk3).toString() } }); + // vars.append({ { "$SPECIAL_HANDSHAKE_TIMEOUT", amneziaWireguarConfig.value(config_key::specialHandshakeTimeout).toString() } }); // Socks5 proxy vars vars.append({ { "$SOCKS5_PROXY_PORT", socks5ProxyConfig.value(config_key::port).toString(protocols::socks5Proxy::defaultPort) } }); diff --git a/client/server_scripts/awg/configure_container.sh b/client/server_scripts/awg/configure_container.sh index 2cf61923..e327f080 100644 --- a/client/server_scripts/awg/configure_container.sh +++ b/client/server_scripts/awg/configure_container.sh @@ -23,14 +23,5 @@ H1 = $INIT_PACKET_MAGIC_HEADER H2 = $RESPONSE_PACKET_MAGIC_HEADER H3 = $UNDERLOAD_PACKET_MAGIC_HEADER H4 = $TRANSPORT_PACKET_MAGIC_HEADER -I1 = $SPECIAL_JUNK_1 -I2 = $SPECIAL_JUNK_2 -I3 = $SPECIAL_JUNK_3 -I4 = $SPECIAL_JUNK_4 -I5 = $SPECIAL_JUNK_5 -J1 = $CONTROLLED_JUNK_1 -J2 = $CONTROLLED_JUNK_2 -J3 = $CONTROLLED_JUNK_3 -Itime = $SPECIAL_HANDSHAKE_TIMEOUT EOF diff --git a/client/server_scripts/awg/template.conf b/client/server_scripts/awg/template.conf index 9c158a17..79932806 100644 --- a/client/server_scripts/awg/template.conf +++ b/client/server_scripts/awg/template.conf @@ -11,15 +11,6 @@ H1 = $INIT_PACKET_MAGIC_HEADER H2 = $RESPONSE_PACKET_MAGIC_HEADER H3 = $UNDERLOAD_PACKET_MAGIC_HEADER H4 = $TRANSPORT_PACKET_MAGIC_HEADER -I1 = $SPECIAL_JUNK_1 -I2 = $SPECIAL_JUNK_2 -I3 = $SPECIAL_JUNK_3 -I4 = $SPECIAL_JUNK_4 -I5 = $SPECIAL_JUNK_5 -J1 = $CONTROLLED_JUNK_1 -J2 = $CONTROLLED_JUNK_2 -J3 = $CONTROLLED_JUNK_3 -Itime = $SPECIAL_HANDSHAKE_TIMEOUT [Peer] PublicKey = $WIREGUARD_SERVER_PUBLIC_KEY diff --git a/client/translations/amneziavpn_ar_EG.ts b/client/translations/amneziavpn_ar_EG.ts index 19306a4c..8a5af48e 100644 --- a/client/translations/amneziavpn_ar_EG.ts +++ b/client/translations/amneziavpn_ar_EG.ts @@ -754,42 +754,87 @@ Thank you for staying with us! - + Server settings - + Port منفذ - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save احفظ - + Save settings? احفظ الإعدادات؟ - + Only the settings for this device will be changed - + Continue واصل - + Cancel إلغاء - + Unable change settings while there is an active connection لا يمكن تغيير الإعدادات أثناء وجود اتصال نشط @@ -807,12 +852,12 @@ Thank you for staying with us! منفذ - + All users with whom you shared a connection with will no longer be able to connect to it. جميع المستخدمين الذين شاركت معهم اتصال لن يكونو قادرين علي الاتصال مرة اخري. - + Save احفظ @@ -867,77 +912,32 @@ Thank you for staying with us! H3 - رأس حزمة السحر غير المحمل - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + The values of the H1-H4 fields must be unique يجب أن تكون قيم الحقول H1-H4 فريدة - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) يجب ألا تساوي قيمة الحقل S1 + حجم بدء الرسالة (148) S2 + حجم استجابة الرسالة (92) - + Save settings? احفظ الإعدادات؟ - + Continue واصل - + Cancel إلغاء - + Unable change settings while there is an active connection لا يمكن تغيير الإعدادات أثناء وجود اتصال نشط diff --git a/client/translations/amneziavpn_fa_IR.ts b/client/translations/amneziavpn_fa_IR.ts index aa3463e5..c0f87b55 100644 --- a/client/translations/amneziavpn_fa_IR.ts +++ b/client/translations/amneziavpn_fa_IR.ts @@ -758,42 +758,87 @@ Thank you for staying with us! - + Server settings - + Port پورت - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save ذخیره - + Save settings? تنظیمات را ذخیره کن? - + Only the settings for this device will be changed - + Continue - + Cancel - + Unable change settings while there is an active connection نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. @@ -819,12 +864,12 @@ Thank you for staying with us! آیا میخواهید AmneziaWG از سرور حذف شود؟ - + All users with whom you shared a connection with will no longer be able to connect to it. همه کاربرانی که با آن‌ها ارتباطی به اشتراک گذاشته‌اید دیگر قادر به اتصال به آن نخواهند بود. - + Save ذخیره @@ -879,77 +924,32 @@ Thank you for staying with us! - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + The values of the H1-H4 fields must be unique - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) - + Save settings? تنظیمات را ذخیره کن? - + Continue ادامه - + Cancel کنسل - + Unable change settings while there is an active connection نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. diff --git a/client/translations/amneziavpn_hi_IN.ts b/client/translations/amneziavpn_hi_IN.ts index 69bcc242..904c15e9 100644 --- a/client/translations/amneziavpn_hi_IN.ts +++ b/client/translations/amneziavpn_hi_IN.ts @@ -722,42 +722,87 @@ Thank you for staying with us! एमटीयू - + Server settings - + Port - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save सहेजें - + Save settings? सेटिंग्स सेव करें? - + Only the settings for this device will be changed - + Continue जारी रखना - + Cancel रद्द करना - + Unable change settings while there is an active connection सक्रिय कनेक्शन होने पर सेटिंग बदलने में असमर्थ @@ -784,37 +829,37 @@ Thank you for staying with us! एमटीयू - + Save सहेजें - + The values of the H1-H4 fields must be unique H1-H4 फ़ील्ड का मान अद्वितीय होना चाहिए - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) फ़ील्ड S1 + संदेश आरंभ आकार (148) का मान S2 + संदेश प्रतिक्रिया आकार (92) के बराबर नहीं होना चाहिए - + Save settings? सेटिंग्स सेव करें? - + All users with whom you shared a connection with will no longer be able to connect to it. वे सभी उपयोगकर्ता जिनके साथ आपने कनेक्शन साझा किया था, वे अब इससे कनेक्ट नहीं हो पाएंगे. - + Unable change settings while there is an active connection सक्रिय कनेक्शन होने पर सेटिंग बदलने में असमर्थ - + Continue जारी रखना @@ -864,52 +909,7 @@ Thank you for staying with us! - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + Cancel रद्द करना diff --git a/client/translations/amneziavpn_my_MM.ts b/client/translations/amneziavpn_my_MM.ts index fe40caae..da4b37a6 100644 --- a/client/translations/amneziavpn_my_MM.ts +++ b/client/translations/amneziavpn_my_MM.ts @@ -754,42 +754,87 @@ Thank you for staying with us! MTU - + Server settings - + Port Port - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save သိမ်းဆည်းမည် - + Save settings? ဆက်တင်များကို သိမ်းဆည်းမည်လား? - + Only the settings for this device will be changed - + Continue ဆက်လက်လုပ်ဆောင်မည် - + Cancel ပယ်ဖျက်မည် - + Unable change settings while there is an active connection လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -811,12 +856,12 @@ Thank you for staying with us! MTU - + All users with whom you shared a connection with will no longer be able to connect to it. သင်နှင့်အတူချိတ်ဆက်မှုတစ်ခုကို မျှဝေထားသည့် အသုံးပြုသူအားလုံး ချိတ်ဆက်နိုင်တော့မည်မဟုတ်ပါ. - + Save သိမ်းဆည်းမည် @@ -871,77 +916,32 @@ Thank you for staying with us! H3 - Underload packet magic header - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + The values of the H1-H4 fields must be unique H1-H4 အကွက်များ၏ တန်ဖိုးများသည် အခြားတန်ဖိုးများနှင့်မတူ တမူထူးခြားနေရပါမည် - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) အကွက် S1 + မက်ဆေ့ချ် စတင်ခြင်း အရွယ်အစား (148) ၏ တန်ဖိုးသည် S2 + မက်ဆေ့ချ် တုံ့ပြန်မှု အရွယ်အစား (92) နှင့် မညီမျှရပါ - + Save settings? ဆက်တင်များကို သိမ်းဆည်းမည်လား? - + Continue ဆက်လက်လုပ်ဆောင်မည် - + Cancel ပယ်ဖျက်မည် - + Unable change settings while there is an active connection လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ diff --git a/client/translations/amneziavpn_ru_RU.ts b/client/translations/amneziavpn_ru_RU.ts index a1697648..d250be5f 100644 --- a/client/translations/amneziavpn_ru_RU.ts +++ b/client/translations/amneziavpn_ru_RU.ts @@ -690,42 +690,87 @@ Thank you for staying with us! MTU - + Server settings Настройки сервера - + Port Порт - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save Сохранить - + Save settings? Сохранить настройки? - + Only the settings for this device will be changed Будут изменены настройки только для этого устройства - + Continue Продолжить - + Cancel Отменить - + Unable change settings while there is an active connection Невозможно изменить настройки во время активного соединения @@ -743,12 +788,12 @@ Thank you for staying with us! Порт - + All users with whom you shared a connection with will no longer be able to connect to it. Все пользователи, с которыми вы поделились конфигурацией вашего VPN, больше не смогут к нему подключаться. - + Save Сохранить @@ -803,77 +848,32 @@ Thank you for staying with us! H3 - Underload packet magic header - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + The values of the H1-H4 fields must be unique Значения в полях H1-H4 должны быть уникальными - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) Значение в поле S1 + размер инициации сообщения (148) не должно равняться значению в поле S2 + размер ответа на сообщение (92) - + Save settings? Сохранить настройки? - + Continue Продолжить - + Cancel Отменить - + Unable change settings while there is an active connection Невозможно изменить настройки во время активного соединения diff --git a/client/translations/amneziavpn_uk_UA.ts b/client/translations/amneziavpn_uk_UA.ts index 8b3ad519..e96f7455 100644 --- a/client/translations/amneziavpn_uk_UA.ts +++ b/client/translations/amneziavpn_uk_UA.ts @@ -784,42 +784,87 @@ Thank you for staying with us! MTU - + Server settings - + Port Порт - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save Зберегти - + Save settings? Зберегти налаштування? - + Only the settings for this device will be changed - + Continue Продовжити - + Cancel Відмінити - + Unable change settings while there is an active connection Неможливо змінити налаштування, поки є активне підключення @@ -887,77 +932,32 @@ Thank you for staying with us! - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + Save Зберегти - + The values of the H1-H4 fields must be unique Значення полів H1-H4 мають бути унікальними - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) Значення поля S1 + розмір повідомлення ініціалізації (148) не має бути рівним значенню S2 + розмір повідомлення відповіді (92) - + Save settings? Зберегти налаштування? - + All users with whom you shared a connection with will no longer be able to connect to it. Усі користувачі, з якими ви поділилися підключенням, більше не зможуть підключитися до нього. - + Unable change settings while there is an active connection Неможливо змінити налаштування, поки є активне підключення @@ -978,12 +978,12 @@ Thank you for staying with us! Користувачі, з якими ви поділились цим протоколм, більше не зможуть до нього підключитись. - + Continue Продовжити - + Cancel Відмінити diff --git a/client/translations/amneziavpn_ur_PK.ts b/client/translations/amneziavpn_ur_PK.ts index 5e723e3c..2c8be9f6 100644 --- a/client/translations/amneziavpn_ur_PK.ts +++ b/client/translations/amneziavpn_ur_PK.ts @@ -722,42 +722,87 @@ Thank you for staying with us! ام ٹی یو - + Server settings - + Port پورٹ - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save - + Save settings? ترتیبات محفوظ کریں? - + Only the settings for this device will be changed - + Continue - + Cancel - + Unable change settings while there is an active connection جب ایک فعال کنکشن موجود ہو تو ترتیبات کو تبدیل نہیں کیا جا سکتا @@ -779,12 +824,12 @@ Thank you for staying with us! ام ٹی یو - + All users with whom you shared a connection with will no longer be able to connect to it. آپ جن لوگوں کے ساتھ آپ نے اس کنکشن کا اشتراک کیا تھا، وہ اس سے مزید جڑ نہیں سکیں گے۔ - + Save محفوظ کریں @@ -839,77 +884,32 @@ Thank you for staying with us! - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + The values of the H1-H4 fields must be unique H1 تا H4 فیلڈز کی قیمتیں مخصوص ہونی چاہیے - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) S1 + پیغام شروع کار (148) کے فیلڈ کی قیمت S2 + پیغام جواب (92) کے سائز کے برابر نہیں ہونی چاہئے - + Save settings? ترتیبات محفوظ کریں? - + Continue جاری رکھیں - + Cancel منسوخ کریں - + Unable change settings while there is an active connection جب ایک فعال کنکشن موجود ہو تو ترتیبات کو تبدیل نہیں کیا جا سکتا diff --git a/client/translations/amneziavpn_zh_CN.ts b/client/translations/amneziavpn_zh_CN.ts index 8ddd4f54..1e6320bf 100644 --- a/client/translations/amneziavpn_zh_CN.ts +++ b/client/translations/amneziavpn_zh_CN.ts @@ -736,42 +736,87 @@ Thank you for staying with us! - + Server settings - + Port 端口 - + + I1 - First special junk packet + + + + + I2 - Second special junk packet + + + + + I3 - Third special junk packet + + + + + I4 - Fourth special junk packet + + + + + I5 - Fifth special junk packet + + + + + J1 - First controlled junk packet + + + + + J2 - Second controlled junk packet + + + + + J3 - Third controlled junk packet + + + + + Itime - Special handshake timeout + + + + Save 保存 - + Save settings? 保存设置? - + Only the settings for this device will be changed - + Continue 继续 - + Cancel 取消 - + Unable change settings while there is an active connection @@ -797,12 +842,12 @@ Thank you for staying with us! 从服务上移除AmneziaWG? - + All users with whom you shared a connection with will no longer be able to connect to it. 与您共享连接的所有用户将无法再连接到该连接。 - + Save 保存 @@ -857,77 +902,32 @@ Thank you for staying with us! - - I1 - First special junk packet - - - - - I2 - Second special junk packet - - - - - I3 - Third special junk packet - - - - - I4 - Fourth special junk packet - - - - - I5 - Fifth special junk packet - - - - - J1 - First controlled junk packet - - - - - J2 - Second controlled junk packet - - - - - J3 - Third controlled junk packet - - - - - Itime - Special handshake timeout - - - - + The values of the H1-H4 fields must be unique - + The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) - + Save settings? 保存设置? - + Continue 继续 - + Cancel 取消 - + Unable change settings while there is an active connection diff --git a/client/ui/models/protocols/awgConfigModel.cpp b/client/ui/models/protocols/awgConfigModel.cpp index b2fc595c..a05aa64f 100644 --- a/client/ui/models/protocols/awgConfigModel.cpp +++ b/client/ui/models/protocols/awgConfigModel.cpp @@ -34,6 +34,33 @@ bool AwgConfigModel::setData(const QModelIndex &index, const QVariant &value, in case Roles::ClientJunkPacketMaxSizeRole: m_clientProtocolConfig.insert(config_key::junkPacketMaxSize, value.toString()); break; + case Roles::ClientSpecialJunk1Role: + m_clientProtocolConfig.insert(config_key::specialJunk1, value.toString()); + break; + case Roles::ClientSpecialJunk2Role: + m_clientProtocolConfig.insert(config_key::specialJunk2, value.toString()); + break; + case Roles::ClientSpecialJunk3Role: + m_clientProtocolConfig.insert(config_key::specialJunk3, value.toString()); + break; + case Roles::ClientSpecialJunk4Role: + m_clientProtocolConfig.insert(config_key::specialJunk4, value.toString()); + break; + case Roles::ClientSpecialJunk5Role: + m_clientProtocolConfig.insert(config_key::specialJunk5, value.toString()); + break; + case Roles::ClientControlledJunk1Role: + m_clientProtocolConfig.insert(config_key::controlledJunk1, value.toString()); + break; + case Roles::ClientControlledJunk2Role: + m_clientProtocolConfig.insert(config_key::controlledJunk2, value.toString()); + break; + case Roles::ClientControlledJunk3Role: + m_clientProtocolConfig.insert(config_key::controlledJunk3, value.toString()); + break; + case Roles::ClientSpecialHandshakeTimeoutRole: + m_clientProtocolConfig.insert(config_key::specialHandshakeTimeout, value.toString()); + break; case Roles::ServerJunkPacketCountRole: m_serverProtocolConfig.insert(config_key::junkPacketCount, value.toString()); @@ -62,33 +89,6 @@ bool AwgConfigModel::setData(const QModelIndex &index, const QVariant &value, in case Roles::ServerTransportPacketMagicHeaderRole: m_serverProtocolConfig.insert(config_key::transportPacketMagicHeader, value.toString()); break; - case Roles::ServerSpecialJunk1Role: - m_serverProtocolConfig.insert(config_key::specialJunk1, value.toString()); - break; - case Roles::ServerSpecialJunk2Role: - m_serverProtocolConfig.insert(config_key::specialJunk2, value.toString()); - break; - case Roles::ServerSpecialJunk3Role: - m_serverProtocolConfig.insert(config_key::specialJunk3, value.toString()); - break; - case Roles::ServerSpecialJunk4Role: - m_serverProtocolConfig.insert(config_key::specialJunk4, value.toString()); - break; - case Roles::ServerSpecialJunk5Role: - m_serverProtocolConfig.insert(config_key::specialJunk5, value.toString()); - break; - case Roles::ServerControlledJunk1Role: - m_serverProtocolConfig.insert(config_key::controlledJunk1, value.toString()); - break; - case Roles::ServerControlledJunk2Role: - m_serverProtocolConfig.insert(config_key::controlledJunk2, value.toString()); - break; - case Roles::ServerControlledJunk3Role: - m_serverProtocolConfig.insert(config_key::controlledJunk3, value.toString()); - break; - case Roles::ServerSpecialHandshakeTimeoutRole: - m_serverProtocolConfig.insert(config_key::specialHandshakeTimeout, value.toString()); - break; } emit dataChanged(index, index, QList { role }); @@ -109,6 +109,16 @@ QVariant AwgConfigModel::data(const QModelIndex &index, int role) const case Roles::ClientJunkPacketCountRole: return m_clientProtocolConfig.value(config_key::junkPacketCount); case Roles::ClientJunkPacketMinSizeRole: return m_clientProtocolConfig.value(config_key::junkPacketMinSize); case Roles::ClientJunkPacketMaxSizeRole: return m_clientProtocolConfig.value(config_key::junkPacketMaxSize); + case Roles::ClientSpecialJunk1Role: return m_clientProtocolConfig.value(config_key::specialJunk1); + case Roles::ClientSpecialJunk2Role: return m_clientProtocolConfig.value(config_key::specialJunk2); + case Roles::ClientSpecialJunk3Role: return m_clientProtocolConfig.value(config_key::specialJunk3); + case Roles::ClientSpecialJunk4Role: return m_clientProtocolConfig.value(config_key::specialJunk4); + case Roles::ClientSpecialJunk5Role: return m_clientProtocolConfig.value(config_key::specialJunk5); + case Roles::ClientControlledJunk1Role: return m_clientProtocolConfig.value(config_key::controlledJunk1); + case Roles::ClientControlledJunk2Role: return m_clientProtocolConfig.value(config_key::controlledJunk2); + case Roles::ClientControlledJunk3Role: return m_clientProtocolConfig.value(config_key::controlledJunk3); + case Roles::ClientSpecialHandshakeTimeoutRole: + return m_clientProtocolConfig.value(config_key::specialHandshakeTimeout); case Roles::ServerJunkPacketCountRole: return m_serverProtocolConfig.value(config_key::junkPacketCount); case Roles::ServerJunkPacketMinSizeRole: return m_serverProtocolConfig.value(config_key::junkPacketMinSize); @@ -123,16 +133,6 @@ QVariant AwgConfigModel::data(const QModelIndex &index, int role) const return m_serverProtocolConfig.value(config_key::underloadPacketMagicHeader); case Roles::ServerTransportPacketMagicHeaderRole: return m_serverProtocolConfig.value(config_key::transportPacketMagicHeader); - case Roles::ServerSpecialJunk1Role: return m_serverProtocolConfig.value(config_key::specialJunk1); - case Roles::ServerSpecialJunk2Role: return m_serverProtocolConfig.value(config_key::specialJunk2); - case Roles::ServerSpecialJunk3Role: return m_serverProtocolConfig.value(config_key::specialJunk3); - case Roles::ServerSpecialJunk4Role: return m_serverProtocolConfig.value(config_key::specialJunk4); - case Roles::ServerSpecialJunk5Role: return m_serverProtocolConfig.value(config_key::specialJunk5); - case Roles::ServerControlledJunk1Role: return m_serverProtocolConfig.value(config_key::controlledJunk1); - case Roles::ServerControlledJunk2Role: return m_serverProtocolConfig.value(config_key::controlledJunk2); - case Roles::ServerControlledJunk3Role: return m_serverProtocolConfig.value(config_key::controlledJunk3); - case Roles::ServerSpecialHandshakeTimeoutRole: - return m_serverProtocolConfig.value(config_key::specialHandshakeTimeout); } return QVariant(); @@ -179,25 +179,6 @@ void AwgConfigModel::updateModel(const QJsonObject &config) m_serverProtocolConfig[config_key::transportPacketMagicHeader] = serverProtocolConfig.value(config_key::transportPacketMagicHeader) .toString(protocols::awg::defaultTransportPacketMagicHeader); - m_serverProtocolConfig[config_key::specialJunk1] = - serverProtocolConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1); - m_serverProtocolConfig[config_key::specialJunk2] = - serverProtocolConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2); - m_serverProtocolConfig[config_key::specialJunk3] = - serverProtocolConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3); - m_serverProtocolConfig[config_key::specialJunk4] = - serverProtocolConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4); - m_serverProtocolConfig[config_key::specialJunk5] = - serverProtocolConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5); - m_serverProtocolConfig[config_key::controlledJunk1] = - serverProtocolConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1); - m_serverProtocolConfig[config_key::controlledJunk2] = - serverProtocolConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2); - m_serverProtocolConfig[config_key::controlledJunk3] = - serverProtocolConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3); - m_serverProtocolConfig[config_key::specialHandshakeTimeout] = - serverProtocolConfig.value(config_key::specialHandshakeTimeout) - .toString(protocols::awg::defaultSpecialHandshakeTimeout); auto lastConfig = m_serverProtocolConfig.value(config_key::last_config).toString(); QJsonObject clientProtocolConfig = QJsonDocument::fromJson(lastConfig.toUtf8()).object(); @@ -211,6 +192,25 @@ void AwgConfigModel::updateModel(const QJsonObject &config) m_clientProtocolConfig[config_key::junkPacketMaxSize] = clientProtocolConfig.value(config_key::junkPacketMaxSize) .toString(m_serverProtocolConfig[config_key::junkPacketMaxSize].toString()); + m_clientProtocolConfig[config_key::specialJunk1] = + clientProtocolConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1); + m_clientProtocolConfig[config_key::specialJunk2] = + clientProtocolConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2); + m_clientProtocolConfig[config_key::specialJunk3] = + clientProtocolConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3); + m_clientProtocolConfig[config_key::specialJunk4] = + clientProtocolConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4); + m_clientProtocolConfig[config_key::specialJunk5] = + clientProtocolConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5); + m_clientProtocolConfig[config_key::controlledJunk1] = + clientProtocolConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1); + m_clientProtocolConfig[config_key::controlledJunk2] = + clientProtocolConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2); + m_clientProtocolConfig[config_key::controlledJunk3] = + clientProtocolConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3); + m_clientProtocolConfig[config_key::specialHandshakeTimeout] = + clientProtocolConfig.value(config_key::specialHandshakeTimeout) + .toString(protocols::awg::defaultSpecialHandshakeTimeout); endResetModel(); } @@ -228,6 +228,15 @@ QJsonObject AwgConfigModel::getConfig() jsonConfig[config_key::junkPacketCount] = m_clientProtocolConfig[config_key::junkPacketCount]; jsonConfig[config_key::junkPacketMinSize] = m_clientProtocolConfig[config_key::junkPacketMinSize]; jsonConfig[config_key::junkPacketMaxSize] = m_clientProtocolConfig[config_key::junkPacketMaxSize]; + jsonConfig[config_key::specialJunk1] = m_clientProtocolConfig[config_key::specialJunk1]; + jsonConfig[config_key::specialJunk2] = m_clientProtocolConfig[config_key::specialJunk2]; + jsonConfig[config_key::specialJunk3] = m_clientProtocolConfig[config_key::specialJunk3]; + jsonConfig[config_key::specialJunk4] = m_clientProtocolConfig[config_key::specialJunk4]; + jsonConfig[config_key::specialJunk5] = m_clientProtocolConfig[config_key::specialJunk5]; + jsonConfig[config_key::controlledJunk1] = m_clientProtocolConfig[config_key::controlledJunk1]; + jsonConfig[config_key::controlledJunk2] = m_clientProtocolConfig[config_key::controlledJunk2]; + jsonConfig[config_key::controlledJunk3] = m_clientProtocolConfig[config_key::controlledJunk3]; + jsonConfig[config_key::specialHandshakeTimeout] = m_clientProtocolConfig[config_key::specialHandshakeTimeout]; m_serverProtocolConfig[config_key::last_config] = QString(QJsonDocument(jsonConfig).toJson()); } @@ -265,6 +274,15 @@ QHash AwgConfigModel::roleNames() const roles[ClientJunkPacketCountRole] = "clientJunkPacketCount"; roles[ClientJunkPacketMinSizeRole] = "clientJunkPacketMinSize"; roles[ClientJunkPacketMaxSizeRole] = "clientJunkPacketMaxSize"; + roles[ClientSpecialJunk1Role] = "clientSpecialJunk1"; + roles[ClientSpecialJunk2Role] = "clientSpecialJunk2"; + roles[ClientSpecialJunk3Role] = "clientSpecialJunk3"; + roles[ClientSpecialJunk4Role] = "clientSpecialJunk4"; + roles[ClientSpecialJunk5Role] = "clientSpecialJunk5"; + roles[ClientControlledJunk1Role] = "clientControlledJunk1"; + roles[ClientControlledJunk2Role] = "clientControlledJunk2"; + roles[ClientControlledJunk3Role] = "clientControlledJunk3"; + roles[ClientSpecialHandshakeTimeoutRole] = "clientSpecialHandshakeTimeout"; roles[ServerJunkPacketCountRole] = "serverJunkPacketCount"; roles[ServerJunkPacketMinSizeRole] = "serverJunkPacketMinSize"; @@ -276,16 +294,6 @@ QHash AwgConfigModel::roleNames() const roles[ServerUnderloadPacketMagicHeaderRole] = "serverUnderloadPacketMagicHeader"; roles[ServerTransportPacketMagicHeaderRole] = "serverTransportPacketMagicHeader"; - roles[ServerSpecialJunk1Role] = "serverSpecialJunk1"; - roles[ServerSpecialJunk2Role] = "serverSpecialJunk2"; - roles[ServerSpecialJunk3Role] = "serverSpecialJunk3"; - roles[ServerSpecialJunk4Role] = "serverSpecialJunk4"; - roles[ServerSpecialJunk5Role] = "serverSpecialJunk5"; - roles[ServerControlledJunk1Role] = "serverControlledJunk1"; - roles[ServerControlledJunk2Role] = "serverControlledJunk2"; - roles[ServerControlledJunk3Role] = "serverControlledJunk3"; - roles[ServerSpecialHandshakeTimeoutRole] = "serverSpecialHandshakeTimeout"; - return roles; } @@ -300,6 +308,24 @@ AwgConfig::AwgConfig(const QJsonObject &serverProtocolConfig) clientProtocolConfig.value(config_key::junkPacketMinSize).toString(protocols::awg::defaultJunkPacketMinSize); clientJunkPacketMaxSize = clientProtocolConfig.value(config_key::junkPacketMaxSize).toString(protocols::awg::defaultJunkPacketMaxSize); + clientSpecialJunk1 = + clientProtocolConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1); + clientSpecialJunk2 = + clientProtocolConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2); + clientSpecialJunk3 = + clientProtocolConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3); + clientSpecialJunk4 = + clientProtocolConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4); + clientSpecialJunk5 = + clientProtocolConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5); + clientControlledJunk1 = + clientProtocolConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1); + clientControlledJunk2 = + clientProtocolConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2); + clientControlledJunk3 = + clientProtocolConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3); + clientSpecialHandshakeTimeout = clientProtocolConfig.value(config_key::specialHandshakeTimeout) + .toString(protocols::awg::defaultSpecialHandshakeTimeout); subnetAddress = serverProtocolConfig.value(config_key::subnet_address).toString(protocols::wireguard::defaultSubnetAddress); @@ -322,24 +348,6 @@ AwgConfig::AwgConfig(const QJsonObject &serverProtocolConfig) .toString(protocols::awg::defaultUnderloadPacketMagicHeader); serverTransportPacketMagicHeader = serverProtocolConfig.value(config_key::transportPacketMagicHeader) .toString(protocols::awg::defaultTransportPacketMagicHeader); - serverSpecialJunk1 = - serverProtocolConfig.value(config_key::specialJunk1).toString(protocols::awg::defaultSpecialJunk1); - serverSpecialJunk2 = - serverProtocolConfig.value(config_key::specialJunk2).toString(protocols::awg::defaultSpecialJunk2); - serverSpecialJunk3 = - serverProtocolConfig.value(config_key::specialJunk3).toString(protocols::awg::defaultSpecialJunk3); - serverSpecialJunk4 = - serverProtocolConfig.value(config_key::specialJunk4).toString(protocols::awg::defaultSpecialJunk4); - serverSpecialJunk5 = - serverProtocolConfig.value(config_key::specialJunk5).toString(protocols::awg::defaultSpecialJunk5); - serverControlledJunk1 = - serverProtocolConfig.value(config_key::controlledJunk1).toString(protocols::awg::defaultControlledJunk1); - serverControlledJunk2 = - serverProtocolConfig.value(config_key::controlledJunk2).toString(protocols::awg::defaultControlledJunk2); - serverControlledJunk3 = - serverProtocolConfig.value(config_key::controlledJunk3).toString(protocols::awg::defaultControlledJunk3); - serverSpecialHandshakeTimeout = serverProtocolConfig.value(config_key::specialHandshakeTimeout) - .toString(protocols::awg::defaultSpecialHandshakeTimeout); } bool AwgConfig::hasEqualServerSettings(const AwgConfig &other) const @@ -352,12 +360,7 @@ bool AwgConfig::hasEqualServerSettings(const AwgConfig &other) const || serverInitPacketMagicHeader != other.serverInitPacketMagicHeader || serverResponsePacketMagicHeader != other.serverResponsePacketMagicHeader || serverUnderloadPacketMagicHeader != other.serverUnderloadPacketMagicHeader - || serverTransportPacketMagicHeader != other.serverTransportPacketMagicHeader - || serverSpecialJunk1 != other.serverSpecialJunk1 || serverSpecialJunk2 != other.serverSpecialJunk2 - || serverSpecialJunk3 != other.serverSpecialJunk3 || serverSpecialJunk4 != other.serverSpecialJunk4 - || serverSpecialJunk5 != other.serverSpecialJunk5 || serverControlledJunk1 != other.serverControlledJunk1 - || serverControlledJunk2 != other.serverControlledJunk2 || serverControlledJunk3 != other.serverControlledJunk3 - || serverSpecialHandshakeTimeout != other.serverSpecialHandshakeTimeout) { + || serverTransportPacketMagicHeader != other.serverTransportPacketMagicHeader) { return false; } return true; @@ -367,7 +370,12 @@ bool AwgConfig::hasEqualClientSettings(const AwgConfig &other) const { if (clientMtu != other.clientMtu || clientJunkPacketCount != other.clientJunkPacketCount || clientJunkPacketMinSize != other.clientJunkPacketMinSize - || clientJunkPacketMaxSize != other.clientJunkPacketMaxSize) { + || clientJunkPacketMaxSize != other.clientJunkPacketMaxSize || clientSpecialJunk1 != other.clientSpecialJunk1 + || clientSpecialJunk2 != other.clientSpecialJunk2 || clientSpecialJunk3 != other.clientSpecialJunk3 + || clientSpecialJunk4 != other.clientSpecialJunk4 || clientSpecialJunk5 != other.clientSpecialJunk5 + || clientControlledJunk1 != other.clientControlledJunk1 || clientControlledJunk2 != other.clientControlledJunk2 + || clientControlledJunk3 != other.clientControlledJunk3 + || clientSpecialHandshakeTimeout != other.clientSpecialHandshakeTimeout) { return false; } return true; diff --git a/client/ui/models/protocols/awgConfigModel.h b/client/ui/models/protocols/awgConfigModel.h index 5c5953b6..e1f38f71 100644 --- a/client/ui/models/protocols/awgConfigModel.h +++ b/client/ui/models/protocols/awgConfigModel.h @@ -22,6 +22,15 @@ struct AwgConfig QString clientJunkPacketCount; QString clientJunkPacketMinSize; QString clientJunkPacketMaxSize; + QString clientSpecialJunk1; + QString clientSpecialJunk2; + QString clientSpecialJunk3; + QString clientSpecialJunk4; + QString clientSpecialJunk5; + QString clientControlledJunk1; + QString clientControlledJunk2; + QString clientControlledJunk3; + QString clientSpecialHandshakeTimeout; QString serverJunkPacketCount; QString serverJunkPacketMinSize; @@ -33,16 +42,6 @@ struct AwgConfig QString serverUnderloadPacketMagicHeader; QString serverTransportPacketMagicHeader; - QString serverSpecialJunk1; - QString serverSpecialJunk2; - QString serverSpecialJunk3; - QString serverSpecialJunk4; - QString serverSpecialJunk5; - QString serverControlledJunk1; - QString serverControlledJunk2; - QString serverControlledJunk3; - QString serverSpecialHandshakeTimeout; - bool hasEqualServerSettings(const AwgConfig &other) const; bool hasEqualClientSettings(const AwgConfig &other) const; }; @@ -60,6 +59,15 @@ public: ClientJunkPacketCountRole, ClientJunkPacketMinSizeRole, ClientJunkPacketMaxSizeRole, + ClientSpecialJunk1Role, + ClientSpecialJunk2Role, + ClientSpecialJunk3Role, + ClientSpecialJunk4Role, + ClientSpecialJunk5Role, + ClientControlledJunk1Role, + ClientControlledJunk2Role, + ClientControlledJunk3Role, + ClientSpecialHandshakeTimeoutRole, ServerJunkPacketCountRole, ServerJunkPacketMinSizeRole, @@ -70,16 +78,6 @@ public: ServerResponsePacketMagicHeaderRole, ServerUnderloadPacketMagicHeaderRole, ServerTransportPacketMagicHeaderRole, - - ServerSpecialJunk1Role, - ServerSpecialJunk2Role, - ServerSpecialJunk3Role, - ServerSpecialJunk4Role, - ServerSpecialJunk5Role, - ServerControlledJunk1Role, - ServerControlledJunk2Role, - ServerControlledJunk3Role, - ServerSpecialHandshakeTimeoutRole, }; explicit AwgConfigModel(QObject *parent = nullptr); diff --git a/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml b/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml index 96662c20..24755e09 100644 --- a/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml @@ -173,6 +173,142 @@ PageType { checkEmptyText: true } + TextFieldWithHeaderType { + id: specialJunk1TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("I1 - First special junk packet") + textField.text: clientSpecialJunk1 + + textField.onEditingFinished: { + if (textField.text !== clientSpecialJunk1) { + clientSpecialJunk1 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: specialJunk2TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("I2 - Second special junk packet") + textField.text: clientSpecialJunk2 + + textField.onEditingFinished: { + if (textField.text !== clientSpecialJunk2) { + clientSpecialJunk2 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: specialJunk3TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("I3 - Third special junk packet") + textField.text: clientSpecialJunk3 + + textField.onEditingFinished: { + if (textField.text !== clientSpecialJunk3) { + clientSpecialJunk3 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: specialJunk4TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("I4 - Fourth special junk packet") + textField.text: clientSpecialJunk4 + + textField.onEditingFinished: { + if (textField.text !== clientSpecialJunk4) { + clientSpecialJunk4 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: specialJunk5TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("I5 - Fifth special junk packet") + textField.text: clientSpecialJunk5 + + textField.onEditingFinished: { + if (textField.text !== clientSpecialJunk5 ) { + clientSpecialJunk5 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: controlledJunk1TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("J1 - First controlled junk packet") + textField.text: clientControlledJunk1 + + textField.onEditingFinished: { + if (textField.text !== clientControlledJunk1) { + clientControlledJunk1 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: controlledJunk2TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("J2 - Second controlled junk packet") + textField.text: clientControlledJunk2 + + textField.onEditingFinished: { + if (textField.text !== clientControlledJunk2) { + clientControlledJunk2 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: controlledJunk3TextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("J3 - Third controlled junk packet") + textField.text: clientControlledJunk3 + + textField.onEditingFinished: { + if (textField.text !== clientControlledJunk3) { + clientControlledJunk3 = textField.text + } + } + } + + TextFieldWithHeaderType { + id: iTimeTextField + Layout.fillWidth: true + Layout.topMargin: 16 + + headerText: qsTr("Itime - Special handshake timeout") + textField.text: clientSpecialHandshakeTimeout + textField.validator: IntValidator { bottom: 0 } + + textField.onEditingFinished: { + if (textField.text !== clientSpecialHandshakeTimeout) { + clientSpecialHandshakeTimeout = textField.text + } + } + } + Header2TextType { Layout.fillWidth: true Layout.topMargin: 16 @@ -256,6 +392,7 @@ PageType { headerText: "H4 - Transport packet magic header" textField.text: serverTransportPacketMagicHeader } + } } } diff --git a/client/ui/qml/Pages2/PageProtocolAwgSettings.qml b/client/ui/qml/Pages2/PageProtocolAwgSettings.qml index 7e2c5feb..906e7ceb 100644 --- a/client/ui/qml/Pages2/PageProtocolAwgSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolAwgSettings.qml @@ -316,141 +316,6 @@ PageType { checkEmptyText: true } - TextFieldWithHeaderType { - id: specialJunk1TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("I1 - First special junk packet") - textField.text: serverSpecialJunk1 - - textField.onEditingFinished: { - if (textField.text !== serverSpecialJunk1) { - serverSpecialJunk1 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: specialJunk2TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("I2 - Second special junk packet") - textField.text: serverSpecialJunk2 - - textField.onEditingFinished: { - if (textField.text !== serverSpecialJunk2) { - serverSpecialJunk2 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: specialJunk3TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("I3 - Third special junk packet") - textField.text: serverSpecialJunk3 - - textField.onEditingFinished: { - if (textField.text !== serverSpecialJunk3) { - serverSpecialJunk3 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: specialJunk4TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("I4 - Fourth special junk packet") - textField.text: serverSpecialJunk4 - - textField.onEditingFinished: { - if (textField.text !== serverSpecialJunk4) { - serverSpecialJunk4 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: specialJunk5TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("I5 - Fifth special junk packet") - textField.text: serverSpecialJunk5 - - textField.onEditingFinished: { - if (textField.text !== serverSpecialJunk5 ) { - serverSpecialJunk5 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: controlledJunk1TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("J1 - First controlled junk packet") - textField.text: serverControlledJunk1 - - textField.onEditingFinished: { - if (textField.text !== serverControlledJunk1) { - serverControlledJunk1 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: controlledJunk2TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("J2 - Second controlled junk packet") - textField.text: serverControlledJunk2 - - textField.onEditingFinished: { - if (textField.text !== serverControlledJunk2) { - serverControlledJunk2 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: controlledJunk3TextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("J3 - Third controlled junk packet") - textField.text: serverControlledJunk3 - - textField.onEditingFinished: { - if (textField.text !== serverControlledJunk3) { - serverControlledJunk3 = textField.text - } - } - } - - TextFieldWithHeaderType { - id: iTimeTextField - Layout.fillWidth: true - Layout.topMargin: 16 - - headerText: qsTr("Itime - Special handshake timeout") - textField.text: serverSpecialHandshakeTimeout - textField.validator: IntValidator { bottom: 0 } - - textField.onEditingFinished: { - if (textField.text !== serverSpecialHandshakeTimeout) { - serverSpecialHandshakeTimeout = textField.text - } - } - } BasicButtonType { id: saveRestartButton @@ -468,15 +333,15 @@ PageType { junkPacketMaxSizeTextField.errorText === "" && junkPacketMinSizeTextField.errorText === "" && junkPacketCountTextField.errorText === "" && - specialJunk1TextField.errorText === "" && - specialJunk2TextField.errorText === "" && - specialJunk3TextField.errorText === "" && - specialJunk4TextField.errorText === "" && - specialJunk5TextField.errorText === "" && - controlledJunk1TextField.errorText === "" && - controlledJunk2TextField.errorText === "" && - controlledJunk3TextField.errorText === "" && - iTimeTextField.errorText === "" && + // specialJunk1TextField.errorText === "" && + // specialJunk2TextField.errorText === "" && + // specialJunk3TextField.errorText === "" && + // specialJunk4TextField.errorText === "" && + // specialJunk5TextField.errorText === "" && + // controlledJunk1TextField.errorText === "" && + // controlledJunk2TextField.errorText === "" && + // controlledJunk3TextField.errorText === "" && + // iTimeTextField.errorText === "" && portTextField.errorText === "" && vpnAddressSubnetTextField.errorText === ""