feat: add default values for s3, s4

This commit is contained in:
Mark Puha 2025-07-04 14:07:26 +02:00
parent 96330798cb
commit a79e375df3
14 changed files with 359 additions and 267 deletions

View file

@ -129,7 +129,7 @@ QString InterfaceConfig::toWgConf(const QMap<QString, QString>& extra) const {
out << "S3 = " << m_cookieReplyPacketJunkSize << "\n";
}
if (!m_transportPacketJunkSize.isNull()) {
out << "S4 = " << m_transportPacketJunkSize << "\n";
out << "S4 = " << m_transportPacketJunkSize << "\n";
}
if (!m_initPacketMagicHeader.isNull()) {
out << "H1 = " << m_initPacketMagicHeader << "\n";

View file

@ -607,6 +607,8 @@ bool IosController::setupAwg()
wgConfig.insert(config_key::initPacketJunkSize, config[config_key::initPacketJunkSize]);
wgConfig.insert(config_key::responsePacketJunkSize, config[config_key::responsePacketJunkSize]);
wgConfig.insert(config_key::cookieReplyPacketJunkSize, config[config_key::cookieReplyPacketJunkSize]);
wgConfig.insert(config_key::transportPacketJunkSize, config[config_key::transportPacketJunkSize]);
wgConfig.insert(config_key::junkPacketCount, config[config_key::junkPacketCount]);
wgConfig.insert(config_key::junkPacketMinSize, config[config_key::junkPacketMinSize]);

View file

@ -502,24 +502,24 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 تم التثبيت بنجاح. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 بالفعل مٌثبت علي الخادم. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>
تمت إضافة الحاويات التي كانت مٌثبتة بالفعل علي الخادم</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
@ -527,47 +527,47 @@ Already installed containers were found on the server. All installed containers
تمت إضافة جميع الحاويات المٌثبتة إلي التطبيق</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>تم تحديث الاعدادات بنجاح</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation>تمت إعادة تشغيل الخادم%1</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation>تمت إزالة الخادم &apos;%1&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation>قد تم حذفها &apos;%1&apos; جميع الحاويات من الخادم</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 تم حدف &apos;%2&apos; اسم الخادم</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation>تم حذف تكوين Api</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>تم مسح ملف تعريف %1 المخزن مؤقتًا</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation>من فضلك قم بتسجيل الدخول كمستخدم</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation>تمت إضافة الخادم بنجاح</translation>
</message>
@ -809,32 +809,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished">احفظ</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished">احفظ الإعدادات؟</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished">واصل</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished">إلغاء</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished">لا يمكن تغيير الإعدادات أثناء وجود اتصال نشط</translation>
</message>
@ -852,7 +852,12 @@ Thank you for staying with us!</source>
<translation>منفذ</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation>جميع المستخدمين الذين شاركت معهم اتصال لن يكونو قادرين علي الاتصال مرة اخري.</translation>
</message>
@ -927,27 +932,26 @@ Thank you for staying with us!</source>
<translation>يجب أن تكون قيم الحقول H1-H4 فريدة</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation>يجب ألا تساوي قيمة الحقل S1 + حجم بدء الرسالة (148) S2 + حجم استجابة الرسالة (92)</translation>
<translation type="vanished">يجب ألا تساوي قيمة الحقل S1 + حجم بدء الرسالة (148) S2 + حجم استجابة الرسالة (92)</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>احفظ الإعدادات؟</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation>واصل</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation>إلغاء</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>لا يمكن تغيير الإعدادات أثناء وجود اتصال نشط</translation>
</message>

View file

@ -507,71 +507,71 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 با موفقیت نصب شد. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 در حال حاضر بر روی سرور نصب شده است. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>
کانتینرهایی که بر روی سرور موجود بودند اضافه شدند</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
کانتینرهای نصب شده بر روی سرور شناسایی شدند. تمام کانتینترهای نصب شده به نرم افزار اضافه شدند</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>تنظیمات با موفقیت بهروزرسانی شدند</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation>سرور %1 راه اندازی مجدد شد</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation>سرور %1 حذف شد</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation>تمام کانتینترها از سرور %1 حذف شدند</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 از سرور %2 حذف شد</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation>پیکربندی API حذف شد.</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>%1 پروفایل ذخیره شده پاک شد.</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation>لطفا به عنوان کاربر وارد شوید</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation>سرور با موفقیت اضافه شد</translation>
</message>
@ -813,32 +813,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished">ذخیره</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished">تنظیمات را ذخیره کن?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished">نمیتوان تنظیمات را تغییر داد در حالی که اتصال فعال است.</translation>
</message>
@ -864,7 +864,7 @@ Thank you for staying with us!</source>
<translation type="vanished">آیا میخواهید AmneziaWG از سرور حذف شود؟</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation>همه کاربرانی که با آنها ارتباطی به اشتراک گذاشتهاید دیگر قادر به اتصال به آن نخواهند بود.</translation>
</message>
@ -939,27 +939,27 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>تنظیمات را ذخیره کن?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation>ادامه</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation>کنسل</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>نمیتوان تنظیمات را تغییر داد در حالی که اتصال فعال است.</translation>
</message>

View file

@ -483,71 +483,71 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 ि . </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 ि . </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>
ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
ि ि ि ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation> &apos;%1&apos; ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation> &apos;%1&apos; ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation> &apos;%1&apos; ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 &apos;%2&apos; ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation> ि </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation> </translation>
</message>
@ -777,32 +777,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished">ि ?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished"> </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished"> </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished">ि ि </translation>
</message>
@ -839,27 +839,26 @@ Thank you for staying with us!</source>
<translation>H1-H4 ि ि</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation> S1 + (148) S2 + िि (92) ि</translation>
<translation type="vanished"> S1 + (148) S2 + िि (92) ि</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>ि ?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation> ि ि , .</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>ि ि </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation> </translation>
</message>
@ -919,7 +918,12 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation> </translation>
</message>

View file

@ -503,71 +503,71 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 က . </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 က . </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>
ကက </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
ကက ကက က </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>ကက </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation> &apos;%1&apos; က </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation> &apos;%1&apos; က </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation> &apos;%1&apos; ကက က</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 က &apos;%2&apos; က</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation>Api config ကက</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>ကက %1 က </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation> log in က</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation>က </translation>
</message>
@ -809,32 +809,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished">ကက ?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished">ကက</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished">က</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished">ကက ကက </translation>
</message>
@ -856,7 +856,7 @@ Thank you for staying with us!</source>
<translation type="vanished">MTU</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation>ကက က.</translation>
</message>
@ -920,6 +920,11 @@ Thank you for staying with us!</source>
<source>H4 - Transport packet magic header</source>
<translation>H4 - Transport packet magic header</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="336"/>
<source>H3 - Underload packet magic header</source>
@ -931,27 +936,26 @@ Thank you for staying with us!</source>
<translation>H1-H4 ကက </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation>ကက S1 + က (148) S2 + က (92) </translation>
<translation type="vanished">ကက S1 + က (148) S2 + က (92) </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>ကက ?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation>ကက</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation>က</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>ကက ကက </translation>
</message>

View file

@ -454,71 +454,71 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 успешно установлен. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 уже установлен на сервер. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>
Добавлены сервисы и протоколы, которые были ранее установлены на сервер</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
На сервере обнаружены установленные протоколы и сервисы. Все они были добавлены в приложение</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>Настройки успешно обновлены</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation>Сервер &apos;%1&apos; был перезагружен</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation>Сервер &apos;%1&apos; был удален</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation>Все протоколы и сервисы были удалены с сервера &apos;%1&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 был удален с сервера &apos;%2&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation>Конфигурация API удалена</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>%1 закэшированный профиль очищен</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation>Пожалуйста, войдите в систему от имени пользователя</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation>Сервер успешно добавлен</translation>
</message>
@ -745,32 +745,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation>Сохранить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation>Сохранить настройки?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation>Будут изменены настройки только для этого устройства</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation>Продолжить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation>Отменить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation>Невозможно изменить настройки во время активного соединения</translation>
</message>
@ -788,7 +788,12 @@ Thank you for staying with us!</source>
<translation>Порт</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation>Все пользователи, с которыми вы поделились конфигурацией вашего VPN, больше не смогут к нему подключаться.</translation>
</message>
@ -863,27 +868,26 @@ Thank you for staying with us!</source>
<translation>Значения в полях H1-H4 должны быть уникальными</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation>Значение в поле S1 + размер инициации сообщения (148) не должно равняться значению в поле S2 + размер ответа на сообщение (92)</translation>
<translation type="vanished">Значение в поле S1 + размер инициации сообщения (148) не должно равняться значению в поле S2 + размер ответа на сообщение (92)</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>Сохранить настройки?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation>Продолжить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation>Отменить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>Невозможно изменить настройки во время активного соединения</translation>
</message>

View file

@ -534,70 +534,70 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 встановлено. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 вже встановлено на сервері. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>Додані сервіси і протоколи, які були раніше встановлені на сервері</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
На сервері знайдені сервіси та протоколи, всі вони додані в застосунок</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>Налаштування оновлено</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation>Сервер &apos;%1&apos; перезавантажено</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation>Сервер &apos;%1&apos; був видалений</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation>Всі сервіси та протоколи були видалені з сервера &apos;%1&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 був видалений з сервера &apos;%2&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation>Конфігурацію API видалено</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>Кешований профіль %1 очищено</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation>Буль-ласка, увійдіть в систему від імені користувача</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation>Сервер додано</translation>
</message>
@ -839,32 +839,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished">Зберегти</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished">Зберегти налаштування?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished">Продовжити</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished">Відмінити</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished">Неможливо змінити налаштування, поки є активне підключення</translation>
</message>
@ -952,22 +952,26 @@ Thank you for staying with us!</source>
<translation>Значення полів H1-H4 мають бути унікальними</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation>Значення поля S1 + розмір повідомлення ініціалізації (148) не має бути рівним значенню S2 + розмір повідомлення відповіді (92)</translation>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation type="vanished">Значення поля S1 + розмір повідомлення ініціалізації (148) не має бути рівним значенню S2 + розмір повідомлення відповіді (92)</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>Зберегти налаштування?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation>Усі користувачі, з якими ви поділилися підключенням, більше не зможуть підключитися до нього.</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>Неможливо змінити налаштування, поки є активне підключення</translation>
</message>
@ -988,12 +992,12 @@ Thank you for staying with us!</source>
<translation type="vanished">Користувачі, з якими ви поділились цим протоколм, більше не зможуть до нього підключитись.</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation>Продовжити</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation>Відмінити</translation>
</message>

View file

@ -481,71 +481,71 @@ Can&apos;t be disabled for current server</source>
<context>
<name>InstallController</name>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 کامیابی سےنصب. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation>%1 پہلے ہی سرور پر انسٹال ہے. </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation>
وہ کنٹینرز شامل کیے گئے جو پہلے سے سرور پر نصب تھے</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
سرور پر پہلے سے نصب کنٹینرز پائے گئے۔ تمام نصب کنٹینرز کو ایپلی کیشن میں شامل کر دیا گیا ہے</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation>ترتیب کامیابی کے ساتھ اپ ڈیٹ ہو گئی</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation>سرور %1 دوبارہ چالو کیا گیا تھا</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation>سرور %1 ہٹا دیا گیا تھا</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation>سرور &apos;%1&apos; سے تمام کنٹینرز ہٹا دیے گئے ہیں</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>سرور &apos;%2&apos; سے %1 ہٹا دیا گیا ہے</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation>%1 کیش کردہ پروفائل ختم کر دی گئی</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation>براہ کرم صارف کے طور پر لاگ ان کریں</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation>سرور کامیابی سے شامل کیا گیا</translation>
</message>
@ -777,32 +777,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished">ترتیبات محفوظ کریں?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished">جب ایک فعال کنکشن موجود ہو تو ترتیبات کو تبدیل نہیں کیا جا سکتا</translation>
</message>
@ -824,7 +824,7 @@ Thank you for staying with us!</source>
<translation type="vanished">ام ٹی یو</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation>آپ جن لوگوں کے ساتھ آپ نے اس کنکشن کا اشتراک کیا تھا، وہ اس سے مزید جڑ نہیں سکیں گے۔</translation>
</message>
@ -899,27 +899,31 @@ Thank you for staying with us!</source>
<translation>H1 تا H4 فیلڈز کی قیمتیں مخصوص ہونی چاہیے</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation>S1 + پیغام شروع کار (148) کے فیلڈ کی قیمت S2 + پیغام جواب (92) کے سائز کے برابر نہیں ہونی چاہئے</translation>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<translation type="vanished">S1 + پیغام شروع کار (148) کے فیلڈ کی قیمت S2 + پیغام جواب (92) کے سائز کے برابر نہیں ہونی چاہئے</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation>ترتیبات محفوظ کریں?</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation>جاری رکھیں</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation>منسوخ کریں</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation>جب ایک فعال کنکشن موجود ہو تو ترتیبات کو تبدیل نہیں کیا جا سکتا</translation>
</message>

View file

@ -482,60 +482,60 @@ Can&apos;t be disabled for current server</source>
<translation type="obsolete"> </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="168"/>
<location filename="../ui/controllers/installController.cpp" line="198"/>
<source>%1 installed successfully. </source>
<translation>%1 </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="170"/>
<location filename="../ui/controllers/installController.cpp" line="201"/>
<source>%1 is already installed on the server. </source>
<translation> %1</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="190"/>
<location filename="../ui/controllers/installController.cpp" line="222"/>
<source>
Added containers that were already installed on the server</source>
<translation></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="270"/>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<source>
Already installed containers were found on the server. All installed containers have been added to the application</source>
<translation>
</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="608"/>
<location filename="../ui/controllers/installController.cpp" line="654"/>
<source>Settings updated successfully</source>
<translation></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="625"/>
<location filename="../ui/controllers/installController.cpp" line="671"/>
<source>Server &apos;%1&apos; was rebooted</source>
<translation> &apos;%1&apos; </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="637"/>
<location filename="../ui/controllers/installController.cpp" line="683"/>
<source>Server &apos;%1&apos; was removed</source>
<translation> &apos;%1&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="648"/>
<location filename="../ui/controllers/installController.cpp" line="694"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation> &apos;%1&apos; </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="666"/>
<location filename="../ui/controllers/installController.cpp" line="713"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation>%1 &apos;%2&apos; </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="675"/>
<location filename="../ui/controllers/installController.cpp" line="722"/>
<source>Api config removed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="697"/>
<location filename="../ui/controllers/installController.cpp" line="744"/>
<source>%1 cached profile cleared</source>
<translation type="unfinished"></translation>
</message>
@ -556,12 +556,12 @@ Already installed containers were found on the server. All installed containers
<translation type="obsolete"> </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="836"/>
<location filename="../ui/controllers/installController.cpp" line="887"/>
<source>Please login as the user</source>
<translation></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="864"/>
<location filename="../ui/controllers/installController.cpp" line="915"/>
<source>Server added successfully</source>
<translation></translation>
</message>
@ -791,32 +791,32 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="414"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="436"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="424"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="446"/>
<source>Save settings?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="447"/>
<source>Only the settings for this device will be changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="448"/>
<source>Continue</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="449"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="431"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgClientSettings.qml" line="453"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished"></translation>
</message>
@ -842,7 +842,7 @@ Thank you for staying with us!</source>
<translation type="vanished">AmneziaWG</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="426"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<source>All users with whom you shared a connection with will no longer be able to connect to it.</source>
<translation></translation>
</message>
@ -917,27 +917,27 @@ Thank you for staying with us!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="420"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)</source>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="422"/>
<source>The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="425"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<source>Save settings?</source>
<translation></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="427"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="429"/>
<source>Continue</source>
<translation></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="430"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="432"/>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="434"/>
<source>Unable change settings while there is an active connection</source>
<translation type="unfinished"></translation>
</message>

View file

@ -8,6 +8,7 @@
#include <QStandardPaths>
#include <QtConcurrent>
#include "core/api/apiUtils.h"
#include "core/controllers/serverController.h"
#include "core/controllers/vpnConfigurationController.h"
#include "core/networkUtilities.h"
@ -15,7 +16,6 @@
#include "ui/models/protocols/awgConfigModel.h"
#include "ui/models/protocols/wireguardConfigModel.h"
#include "utilities.h"
#include "core/api/apiUtils.h"
namespace
{
@ -37,7 +37,8 @@ namespace
}
}
InstallController::InstallController(const QSharedPointer<ServersModel> &serversModel, const QSharedPointer<ContainersModel> &containersModel,
InstallController::InstallController(const QSharedPointer<ServersModel> &serversModel,
const QSharedPointer<ContainersModel> &containersModel,
const QSharedPointer<ProtocolsModel> &protocolsModel,
const QSharedPointer<ClientManagementModel> &clientManagementModel,
const std::shared_ptr<Settings> &settings, QObject *parent)
@ -70,7 +71,8 @@ void InstallController::install(DockerContainer container, int port, TransportPr
if (protocol == mainProto) {
containerConfig.insert(config_key::port, QString::number(port));
containerConfig.insert(config_key::transport_proto, ProtocolProps::transportProtoToString(transportProto, protocol));
containerConfig.insert(config_key::transport_proto,
ProtocolProps::transportProtoToString(transportProto, protocol));
if (container == DockerContainer::Awg) {
QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(2, 5));
@ -79,12 +81,37 @@ void InstallController::install(DockerContainer container, int port, TransportPr
int s1 = QRandomGenerator::global()->bounded(15, 150);
int s2 = QRandomGenerator::global()->bounded(15, 150);
while (s1 + AwgConstant::messageInitiationSize == s2 + AwgConstant::messageResponseSize) {
int s3 = QRandomGenerator::global()->bounded(15, 150);
int s4 = QRandomGenerator::global()->bounded(15, 150);
// Ensure all values are unique and don't create equal packet sizes
QSet<int> usedValues;
usedValues.insert(s1);
while (usedValues.contains(s2)
|| s1 + AwgConstant::messageInitiationSize == s2 + AwgConstant::messageResponseSize) {
s2 = QRandomGenerator::global()->bounded(15, 150);
}
usedValues.insert(s2);
while (usedValues.contains(s3)
|| s1 + AwgConstant::messageInitiationSize == s3 + AwgConstant::messageCookieReplySize
|| s2 + AwgConstant::messageResponseSize == s3 + AwgConstant::messageCookieReplySize) {
s3 = QRandomGenerator::global()->bounded(15, 150);
}
usedValues.insert(s3);
while (usedValues.contains(s4)
|| s1 + AwgConstant::messageInitiationSize == s4 + AwgConstant::messageTransportSize
|| s2 + AwgConstant::messageResponseSize == s4 + AwgConstant::messageTransportSize
|| s3 + AwgConstant::messageCookieReplySize == s4 + AwgConstant::messageTransportSize) {
s4 = QRandomGenerator::global()->bounded(15, 150);
}
QString initPacketJunkSize = QString::number(s1);
QString responsePacketJunkSize = QString::number(s2);
QString cookieReplyPacketJunkSize = QString::number(s3);
QString transportPacketJunkSize = QString::number(s4);
QSet<QString> headersValue;
while (headersValue.size() != 4) {
@ -104,6 +131,8 @@ void InstallController::install(DockerContainer container, int port, TransportPr
containerConfig[config_key::junkPacketMaxSize] = junkPacketMaxSize;
containerConfig[config_key::initPacketJunkSize] = initPacketJunkSize;
containerConfig[config_key::responsePacketJunkSize] = responsePacketJunkSize;
containerConfig[config_key::cookieReplyPacketJunkSize] = cookieReplyPacketJunkSize;
containerConfig[config_key::transportPacketJunkSize] = transportPacketJunkSize;
containerConfig[config_key::initPacketMagicHeader] = initPacketMagicHeader;
containerConfig[config_key::responsePacketMagicHeader] = responsePacketMagicHeader;
containerConfig[config_key::underloadPacketMagicHeader] = underloadPacketMagicHeader;
@ -141,7 +170,8 @@ void InstallController::install(DockerContainer container, int port, TransportPr
serverCredentials = m_processedServerCredentials;
} else {
int serverIndex = m_serversModel->getProcessedServerIndex();
serverCredentials = qvariant_cast<ServerCredentials>(m_serversModel->data(serverIndex, ServersModel::Roles::CredentialsRole));
serverCredentials =
qvariant_cast<ServerCredentials>(m_serversModel->data(serverIndex, ServersModel::Roles::CredentialsRole));
}
QSharedPointer<ServerController> serverController(new ServerController(m_settings));
@ -167,7 +197,8 @@ void InstallController::install(DockerContainer container, int port, TransportPr
installedContainers.insert(container, config);
finishMessage = tr("%1 installed successfully. ").arg(ContainerProps::containerHumanNames().value(container));
} else {
finishMessage = tr("%1 is already installed on the server. ").arg(ContainerProps::containerHumanNames().value(container));
finishMessage =
tr("%1 is already installed on the server. ").arg(ContainerProps::containerHumanNames().value(container));
}
if (errorCode) {
@ -182,9 +213,10 @@ void InstallController::install(DockerContainer container, int port, TransportPr
}
}
void InstallController::installServer(const DockerContainer container, const QMap<DockerContainer, QJsonObject> &installedContainers,
const ServerCredentials &serverCredentials, const QSharedPointer<ServerController> &serverController,
QString &finishMessage)
void InstallController::installServer(const DockerContainer container,
const QMap<DockerContainer, QJsonObject> &installedContainers,
const ServerCredentials &serverCredentials,
const QSharedPointer<ServerController> &serverController, QString &finishMessage)
{
if (installedContainers.size() > 1) {
finishMessage += tr("\nAdded containers that were already installed on the server");
@ -203,8 +235,8 @@ void InstallController::installServer(const DockerContainer container, const QMa
auto containerConfig = iterator.value();
if (ContainerProps::isSupportedByCurrentPlatform(container)) {
auto errorCode = vpnConfigurationController.createProtocolConfigForContainer(m_processedServerCredentials, iterator.key(),
containerConfig);
auto errorCode = vpnConfigurationController.createProtocolConfigForContainer(
m_processedServerCredentials, iterator.key(), containerConfig);
if (errorCode) {
emit installationErrorOccurred(errorCode);
return;
@ -212,7 +244,8 @@ void InstallController::installServer(const DockerContainer container, const QMa
containerConfigs.append(containerConfig);
errorCode = m_clientManagementModel->appendClient(iterator.key(), serverCredentials, containerConfig,
QString("Admin [%1]").arg(QSysInfo::prettyProductName()), serverController);
QString("Admin [%1]").arg(QSysInfo::prettyProductName()),
serverController);
if (errorCode) {
emit installationErrorOccurred(errorCode);
return;
@ -230,7 +263,8 @@ void InstallController::installServer(const DockerContainer container, const QMa
emit installServerFinished(finishMessage);
}
void InstallController::installContainer(const DockerContainer container, const QMap<DockerContainer, QJsonObject> &installedContainers,
void InstallController::installContainer(const DockerContainer container,
const QMap<DockerContainer, QJsonObject> &installedContainers,
const ServerCredentials &serverCredentials,
const QSharedPointer<ServerController> &serverController, QString &finishMessage)
{
@ -243,16 +277,17 @@ void InstallController::installContainer(const DockerContainer container, const
containerConfig = iterator.value();
if (ContainerProps::isSupportedByCurrentPlatform(container)) {
auto errorCode =
vpnConfigurationController.createProtocolConfigForContainer(serverCredentials, iterator.key(), containerConfig);
auto errorCode = vpnConfigurationController.createProtocolConfigForContainer(
serverCredentials, iterator.key(), containerConfig);
if (errorCode) {
emit installationErrorOccurred(errorCode);
return;
}
m_serversModel->addContainerConfig(iterator.key(), containerConfig);
errorCode = m_clientManagementModel->appendClient(iterator.key(), serverCredentials, containerConfig,
QString("Admin [%1]").arg(QSysInfo::prettyProductName()), serverController);
errorCode = m_clientManagementModel->appendClient(
iterator.key(), serverCredentials, containerConfig,
QString("Admin [%1]").arg(QSysInfo::prettyProductName()), serverController);
if (errorCode) {
emit installationErrorOccurred(errorCode);
return;
@ -280,7 +315,8 @@ bool InstallController::isServerAlreadyExists()
auto modelIndex = m_serversModel->index(i);
const ServerCredentials credentials =
qvariant_cast<ServerCredentials>(m_serversModel->data(modelIndex, ServersModel::Roles::CredentialsRole));
if (m_processedServerCredentials.hostName == credentials.hostName && m_processedServerCredentials.port == credentials.port) {
if (m_processedServerCredentials.hostName == credentials.hostName
&& m_processedServerCredentials.port == credentials.port) {
emit serverAlreadyExists(i);
return true;
}
@ -309,17 +345,17 @@ void InstallController::scanServerForInstalledContainers()
containerConfig = iterator.value();
if (ContainerProps::isSupportedByCurrentPlatform(container)) {
auto errorCode =
vpnConfigurationController.createProtocolConfigForContainer(serverCredentials, container, containerConfig);
auto errorCode = vpnConfigurationController.createProtocolConfigForContainer(
serverCredentials, container, containerConfig);
if (errorCode) {
emit installationErrorOccurred(errorCode);
return;
}
m_serversModel->addContainerConfig(container, containerConfig);
errorCode = m_clientManagementModel->appendClient(container, serverCredentials, containerConfig,
QString("Admin [%1]").arg(QSysInfo::prettyProductName()),
serverController);
errorCode = m_clientManagementModel->appendClient(
container, serverCredentials, containerConfig,
QString("Admin [%1]").arg(QSysInfo::prettyProductName()), serverController);
if (errorCode) {
emit installationErrorOccurred(errorCode);
return;
@ -383,8 +419,8 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
containerConfig.insert(config_key::transport_proto, transportProto);
if (protocol == Proto::Awg) {
QString serverConfig = serverController->getTextFileFromContainer(container, credentials,
protocols::awg::serverConfigPath, errorCode);
QString serverConfig = serverController->getTextFileFromContainer(
container, credentials, protocols::awg::serverConfigPath, errorCode);
QMap<QString, QString> serverConfigMap;
auto serverConfigLines = serverConfig.split("\n");
@ -402,16 +438,22 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
containerConfig[config_key::subnet_address] = serverConfigMap.value("Address").remove("/24");
containerConfig[config_key::junkPacketCount] = serverConfigMap.value(config_key::junkPacketCount);
containerConfig[config_key::junkPacketMinSize] = serverConfigMap.value(config_key::junkPacketMinSize);
containerConfig[config_key::junkPacketMaxSize] = serverConfigMap.value(config_key::junkPacketMaxSize);
containerConfig[config_key::initPacketJunkSize] = serverConfigMap.value(config_key::initPacketJunkSize);
containerConfig[config_key::responsePacketJunkSize] = serverConfigMap.value(config_key::responsePacketJunkSize);
containerConfig[config_key::junkPacketMinSize] =
serverConfigMap.value(config_key::junkPacketMinSize);
containerConfig[config_key::junkPacketMaxSize] =
serverConfigMap.value(config_key::junkPacketMaxSize);
containerConfig[config_key::initPacketJunkSize] =
serverConfigMap.value(config_key::initPacketJunkSize);
containerConfig[config_key::responsePacketJunkSize] =
serverConfigMap.value(config_key::responsePacketJunkSize);
containerConfig[config_key::cookieReplyPacketJunkSize] =
serverConfigMap.value(config_key::cookieReplyPacketJunkSize);
containerConfig[config_key::transportPacketJunkSize] =
serverConfigMap.value(config_key::transportPacketJunkSize);
containerConfig[config_key::initPacketMagicHeader] = serverConfigMap.value(config_key::initPacketMagicHeader);
containerConfig[config_key::responsePacketMagicHeader] = serverConfigMap.value(config_key::responsePacketMagicHeader);
containerConfig[config_key::initPacketMagicHeader] =
serverConfigMap.value(config_key::initPacketMagicHeader);
containerConfig[config_key::responsePacketMagicHeader] =
serverConfigMap.value(config_key::responsePacketMagicHeader);
containerConfig[config_key::underloadPacketMagicHeader] =
serverConfigMap.value(config_key::underloadPacketMagicHeader);
containerConfig[config_key::transportPacketMagicHeader] =
@ -424,12 +466,12 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
containerConfig[config_key::controlledJunk1] = serverConfigMap.value(config_key::controlledJunk1);
containerConfig[config_key::controlledJunk2] = serverConfigMap.value(config_key::controlledJunk2);
containerConfig[config_key::controlledJunk3] = serverConfigMap.value(config_key::controlledJunk3);
containerConfig[config_key::specialHandshakeTimeout] = serverConfigMap.value(config_key::specialHandshakeTimeout);
containerConfig[config_key::specialHandshakeTimeout] =
serverConfigMap.value(config_key::specialHandshakeTimeout);
} else if (protocol == Proto::WireGuard) {
QString serverConfig = serverController->getTextFileFromContainer(container, credentials,
protocols::wireguard::serverConfigPath, errorCode);
QString serverConfig = serverController->getTextFileFromContainer(
container, credentials, protocols::wireguard::serverConfigPath, errorCode);
QMap<QString, QString> serverConfigMap;
auto serverConfigLines = serverConfig.split("\n");
@ -449,7 +491,8 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
stdOut.clear();
script = QString("sudo docker inspect --format '{{.Config.Cmd}}' %1").arg(name);
ErrorCode errorCode = serverController->runScript(credentials, script, cbReadStdOut, cbReadStdErr);
ErrorCode errorCode =
serverController->runScript(credentials, script, cbReadStdOut, cbReadStdErr);
if (errorCode != ErrorCode::NoError) {
return errorCode;
}
@ -466,8 +509,8 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
containerConfig.insert(config_key::userName, userName);
containerConfig.insert(config_key::password, password);
} else if (protocol == Proto::Socks5Proxy) {
QString proxyConfig = serverController->getTextFileFromContainer(container, credentials,
protocols::socks5Proxy::proxyConfigPath, errorCode);
QString proxyConfig = serverController->getTextFileFromContainer(
container, credentials, protocols::socks5Proxy::proxyConfigPath, errorCode);
const static QRegularExpression usernameAndPasswordRegExp("users (\\w+):CL:(\\w+)");
QRegularExpressionMatch usernameAndPasswordMatch = usernameAndPasswordRegExp.match(proxyConfig);
@ -552,7 +595,8 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
stdOut.clear();
script = QString("sudo docker exec -i %1 sh -c 'cat /var/lib/tor/hidden_service/hostname'").arg(name);
ErrorCode errorCode = serverController->runScript(credentials, script, cbReadStdOut, cbReadStdErr);
ErrorCode errorCode =
serverController->runScript(credentials, script, cbReadStdOut, cbReadStdErr);
if (errorCode != ErrorCode::NoError) {
return errorCode;
}
@ -591,7 +635,8 @@ void InstallController::updateContainer(QJsonObject config)
if (isUpdateDockerContainerRequired(container, oldContainerConfig, config)) {
QSharedPointer<ServerController> serverController(new ServerController(m_settings));
connect(serverController.get(), &ServerController::serverIsBusy, this, &InstallController::serverIsBusy);
connect(this, &InstallController::cancelInstallation, serverController.get(), &ServerController::cancelInstallation);
connect(this, &InstallController::cancelInstallation, serverController.get(),
&ServerController::cancelInstallation);
errorCode = serverController->updateContainer(serverCredentials, container, oldContainerConfig, config);
clearCachedProfile(serverController);
@ -601,7 +646,8 @@ void InstallController::updateContainer(QJsonObject config)
m_serversModel->updateContainerConfig(container, config);
m_protocolModel->updateModel(config);
auto defaultContainer = qvariant_cast<DockerContainer>(m_serversModel->data(serverIndex, ServersModel::Roles::DefaultContainerRole));
auto defaultContainer = qvariant_cast<DockerContainer>(
m_serversModel->data(serverIndex, ServersModel::Roles::DefaultContainerRole));
if ((serverIndex == m_serversModel->getDefaultServerIndex()) && (container == defaultContainer)) {
emit currentContainerUpdated();
} else {
@ -663,7 +709,8 @@ void InstallController::removeProcessedContainer()
ErrorCode errorCode = m_serversModel->removeContainer(serverController, container);
if (errorCode == ErrorCode::NoError) {
emit removeProcessedContainerFinished(tr("%1 has been removed from the server '%2'").arg(containerName, serverName));
emit removeProcessedContainerFinished(
tr("%1 has been removed from the server '%2'").arg(containerName, serverName));
return;
}
emit installationErrorOccurred(errorCode);
@ -707,7 +754,8 @@ QRegularExpression InstallController::ipAddressRegExp()
return NetworkUtilities::ipAddressRegExp();
}
void InstallController::setProcessedServerCredentials(const QString &hostName, const QString &userName, const QString &secretData)
void InstallController::setProcessedServerCredentials(const QString &hostName, const QString &userName,
const QString &secretData)
{
m_processedServerCredentials.hostName = hostName;
if (m_processedServerCredentials.hostName.contains(":")) {
@ -742,7 +790,8 @@ void InstallController::mountSftpDrive(const QString &port, const QString &passw
cmd = "C:\\Program Files\\SSHFS-Win\\bin\\sshfs.exe";
#elif defined AMNEZIA_DESKTOP
mountPath = QString("%1/sftp:%2:%3").arg(QStandardPaths::writableLocation(QStandardPaths::HomeLocation), hostname, port);
mountPath =
QString("%1/sftp:%2:%3").arg(QStandardPaths::writableLocation(QStandardPaths::HomeLocation), hostname, port);
QDir dir(mountPath);
if (!dir.exists()) {
dir.mkpath(mountPath);
@ -806,7 +855,8 @@ bool InstallController::checkSshConnection(QSharedPointer<ServerController> serv
ErrorCode errorCode = ErrorCode::NoError;
m_privateKeyPassphrase = "";
if (m_processedServerCredentials.secretData.contains("BEGIN") && m_processedServerCredentials.secretData.contains("PRIVATE KEY")) {
if (m_processedServerCredentials.secretData.contains("BEGIN")
&& m_processedServerCredentials.secretData.contains("PRIVATE KEY")) {
auto passphraseCallback = [this]() {
emit passphraseRequestStarted();
QEventLoop loop;
@ -817,7 +867,8 @@ bool InstallController::checkSshConnection(QSharedPointer<ServerController> serv
};
QString decryptedPrivateKey;
errorCode = serverController->getDecryptedPrivateKey(m_processedServerCredentials, decryptedPrivateKey, passphraseCallback);
errorCode = serverController->getDecryptedPrivateKey(m_processedServerCredentials, decryptedPrivateKey,
passphraseCallback);
if (errorCode == ErrorCode::NoError) {
m_processedServerCredentials.secretData = decryptedPrivateKey;
} else {
@ -878,7 +929,8 @@ bool InstallController::isConfigValid()
return false;
}
DockerContainer container = qvariant_cast<DockerContainer>(m_serversModel->data(serverIndex, ServersModel::Roles::DefaultContainerRole));
DockerContainer container =
qvariant_cast<DockerContainer>(m_serversModel->data(serverIndex, ServersModel::Roles::DefaultContainerRole));
if (container == DockerContainer::None) {
emit installationErrorOccurred(ErrorCode::NoInstalledContainersError);
@ -898,8 +950,10 @@ bool InstallController::isConfigValid()
auto isProtocolConfigExists = [](const QJsonObject &containerConfig, const DockerContainer container) {
for (Proto protocol : ContainerProps::protocolsForContainer(container)) {
QString protocolConfig =
containerConfig.value(ProtocolProps::protoToString(protocol)).toObject().value(config_key::last_config).toString();
QString protocolConfig = containerConfig.value(ProtocolProps::protoToString(protocol))
.toObject()
.value(config_key::last_config)
.toString();
if (protocolConfig.isEmpty()) {
return false;
@ -910,14 +964,16 @@ bool InstallController::isConfigValid()
if (!isProtocolConfigExists(containerConfig, container)) {
VpnConfigurationsController vpnConfigurationController(m_settings, serverController);
errorCode = vpnConfigurationController.createProtocolConfigForContainer(credentials, container, containerConfig);
errorCode =
vpnConfigurationController.createProtocolConfigForContainer(credentials, container, containerConfig);
if (errorCode != ErrorCode::NoError) {
return errorCode;
}
m_serversModel->updateContainerConfig(container, containerConfig);
errorCode = m_clientManagementModel->appendClient(container, credentials, containerConfig,
QString("Admin [%1]").arg(QSysInfo::prettyProductName()), serverController);
QString("Admin [%1]").arg(QSysInfo::prettyProductName()),
serverController);
if (errorCode != ErrorCode::NoError) {
return errorCode;
}

View file

@ -266,9 +266,15 @@ bool AwgConfigModel::isHeadersEqual(const QString &h1, const QString &h2, const
return (h1 == h2) || (h1 == h3) || (h1 == h4) || (h2 == h3) || (h2 == h4) || (h3 == h4);
}
bool AwgConfigModel::isPacketSizeEqual(const int s1, const int s2)
bool AwgConfigModel::isPacketSizeEqual(const int s1, const int s2, const int s3, const int s4)
{
return (AwgConstant::messageInitiationSize + s1 == AwgConstant::messageResponseSize + s2);
int initSize = AwgConstant::messageInitiationSize + s1;
int responseSize = AwgConstant::messageResponseSize + s2;
int cookieSize = AwgConstant::messageCookieReplySize + s3;
int transportSize = AwgConstant::messageTransportSize + s4;
return (initSize == responseSize || initSize == cookieSize || initSize == transportSize
|| responseSize == cookieSize || responseSize == transportSize || cookieSize == transportSize);
}
bool AwgConfigModel::isServerSettingsEqual()

View file

@ -10,6 +10,8 @@ namespace AwgConstant
{
const int messageInitiationSize = 148;
const int messageResponseSize = 92;
const int messageCookieReplySize = 64;
const int messageTransportSize = 32;
}
struct AwgConfig
@ -98,7 +100,7 @@ public slots:
QJsonObject getConfig();
bool isHeadersEqual(const QString &h1, const QString &h2, const QString &h3, const QString &h4);
bool isPacketSizeEqual(const int s1, const int s2);
bool isPacketSizeEqual(const int s1, const int s2, const int s3, const int s4);
bool isServerSettingsEqual();

View file

@ -416,8 +416,10 @@ PageType {
}
if (AwgConfigModel.isPacketSizeEqual(parseInt(initPacketJunkSizeTextField.textField.text),
parseInt(responsePacketJunkSizeTextField.textField.text))) {
PageController.showErrorMessage(qsTr("The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92)"))
parseInt(responsePacketJunkSizeTextField.textField.text),
parseInt(cookieReplyPacketJunkSizeTextField.textField.text),
parseInt(transportPacketJunkSizeTextField.textField.text))) {
PageController.showErrorMessage(qsTr("The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) + S3 + cookie reply size (64) + S4 + transport packet size (32)"))
return
}
}