mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da1cdfd6fa | |||
| e1dec3c1ba | |||
| 7834860245 | |||
| 2da1025f26 | |||
| 338499247d | |||
| 79e1761c1f | |||
| e2ae341ba9 | |||
| de03435bac | |||
| e16c425f87 | |||
| a46e55d5c2 | |||
| 4b64bfaec0 | |||
| 2f0c1eeecc | |||
| 160d88f002 | |||
| 94304b5777 | |||
| 61ddfe01a1 | |||
| 00d334f704 | |||
| f4a4979997 | |||
| 5369e68267 | |||
| 9eb23e38bd | |||
| 36ba3758db | |||
| 81f835458f | |||
| e01b1db706 | |||
| cdb18de305 | |||
| 8e0eef3316 | |||
| 221d45f564 | |||
| a01ba5909c | |||
| 1c4678af95 | |||
| 5f5435c645 | |||
| 2f7dc2c46c | |||
| 9bc1c9dd03 | |||
| 4c81cdb4a2 | |||
| 3406ffa7a2 | |||
| 6d05b6845e | |||
| c7cd8e4c80 | |||
| f65e4066e3 | |||
| 37c18c5d3c | |||
| 8885f580b2 | |||
| 512ac74ee6 | |||
| b6d2030041 | |||
| 3ac09181c6 | |||
| ffc9e5823a | |||
| f5448fed59 | |||
| 8163e51434 | |||
| 3836836c72 | |||
| a4624c7377 |
+1
-1
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
||||
|
||||
set(PROJECT AmneziaVPN)
|
||||
|
||||
project(${PROJECT} VERSION 4.0.8.1
|
||||
project(${PROJECT} VERSION 4.0.8.4
|
||||
DESCRIPTION "AmneziaVPN"
|
||||
HOMEPAGE_URL "https://amnezia.org/"
|
||||
)
|
||||
|
||||
@@ -74,7 +74,6 @@ qt6_add_resources(QRC ${I18NQRC} ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
||||
# -- i18n end
|
||||
|
||||
if(IOS)
|
||||
#execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/scripts/run-build-cloak.sh)
|
||||
execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/ios/scripts/openvpn.sh args
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
||||
@@ -286,6 +286,8 @@ void AmneziaApplication::initModels()
|
||||
m_engine->rootContext()->setContextProperty("ServersModel", m_serversModel.get());
|
||||
connect(m_serversModel.get(), &ServersModel::currentlyProcessedServerIndexChanged, m_containersModel.get(),
|
||||
&ContainersModel::setCurrentlyProcessedServerIndex);
|
||||
connect(m_serversModel.get(), &ServersModel::defaultServerIndexChanged, m_containersModel.get(),
|
||||
&ContainersModel::setCurrentlyProcessedServerIndex);
|
||||
|
||||
m_languageModel.reset(new LanguageModel(m_settings, this));
|
||||
m_engine->rootContext()->setContextProperty("LanguageModel", m_languageModel.get());
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
android:label="-- %%INSERT_APP_NAME%% --"
|
||||
android:screenOrientation="unspecified"
|
||||
android:launchMode="singleInstance"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:exported="true">
|
||||
|
||||
<!-- android:theme="@style/splashScreenTheme"-->
|
||||
|
||||
@@ -89,7 +89,6 @@ QMap<DockerContainer, QString> ContainerProps::containerHumanNames()
|
||||
|
||||
{ DockerContainer::TorWebSite, QObject::tr("Website in Tor network") },
|
||||
{ DockerContainer::Dns, QObject::tr("Amnezia DNS") },
|
||||
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service")},
|
||||
{ DockerContainer::Sftp, QObject::tr("Sftp file sharing service") } };
|
||||
}
|
||||
|
||||
@@ -108,9 +107,10 @@ QMap<DockerContainer, QString> ContainerProps::containerDescriptions()
|
||||
{ DockerContainer::WireGuard,
|
||||
QObject::tr("WireGuard - New popular VPN protocol with high performance, high speed and low power "
|
||||
"consumption. Recommended for regions with low levels of censorship.") },
|
||||
{ DockerContainer::Awg,
|
||||
QObject::tr("AmneziaWG - Special protocol from Amnezia, based on WireGuard. It's fast like WireGuard, but very resistant to blockages. "
|
||||
"Recommended for regions with high levels of censorship.") },
|
||||
{ DockerContainer::Awg,
|
||||
QObject::tr("AmneziaWG - Special protocol from Amnezia, based on WireGuard. It's fast like WireGuard, "
|
||||
"but very resistant to blockages. "
|
||||
"Recommended for regions with high levels of censorship.") },
|
||||
{ DockerContainer::Ipsec,
|
||||
QObject::tr("IKEv2 - Modern stable protocol, a bit faster than others, restores connection after "
|
||||
"signal loss. It has native support on the latest versions of Android and iOS.") },
|
||||
@@ -118,44 +118,108 @@ QMap<DockerContainer, QString> ContainerProps::containerDescriptions()
|
||||
{ DockerContainer::TorWebSite, QObject::tr("Deploy a WordPress site on the Tor network in two clicks.") },
|
||||
{ DockerContainer::Dns,
|
||||
QObject::tr("Replace the current DNS server with your own. This will increase your privacy level.") },
|
||||
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service - is Window file sharing protocol")},
|
||||
{ DockerContainer::Sftp,
|
||||
QObject::tr("Creates a file vault on your server to securely store and transfer files.") } };
|
||||
}
|
||||
|
||||
QMap<DockerContainer, QString> ContainerProps::containerDetailedDescriptions()
|
||||
{
|
||||
return { { DockerContainer::OpenVpn, QObject::tr("OpenVPN container") },
|
||||
{ DockerContainer::ShadowSocks, QObject::tr("Container with OpenVpn and ShadowSocks") },
|
||||
{ DockerContainer::Cloak,
|
||||
QObject::tr("Container with OpenVpn and ShadowSocks protocols "
|
||||
"configured with traffic masking by Cloak plugin") },
|
||||
{ DockerContainer::WireGuard, QObject::tr("WireGuard container") },
|
||||
{ DockerContainer::WireGuard, QObject::tr("AmneziaWG container") },
|
||||
{ DockerContainer::Ipsec, QObject::tr("IPsec container") },
|
||||
return {
|
||||
{ DockerContainer::OpenVpn,
|
||||
QObject::tr(
|
||||
"OpenVPN stands as one of the most popular and time-tested VPN protocols available.\n"
|
||||
"It employs its unique security protocol, "
|
||||
"leveraging the strength of SSL/TLS for encryption and key exchange. "
|
||||
"Furthermore, OpenVPN's support for a multitude of authentication methods makes it versatile and adaptable, "
|
||||
"catering to a wide range of devices and operating systems. "
|
||||
"Due to its open-source nature, OpenVPN benefits from extensive scrutiny by the global community, "
|
||||
"which continually reinforces its security. "
|
||||
"With a strong balance of performance, security, and compatibility, "
|
||||
"OpenVPN remains a top choice for privacy-conscious individuals and businesses alike.\n\n"
|
||||
"* Available in the AmneziaVPN across all platforms\n"
|
||||
"* Normal power consumption on mobile devices\n"
|
||||
"* Flexible customisation to suit user needs to work with different operating systems and devices\n"
|
||||
"* Recognised by DPI analysis systems and therefore susceptible to blocking\n"
|
||||
"* Can operate over both TCP and UDP network protocols.") },
|
||||
{ DockerContainer::ShadowSocks,
|
||||
QObject::tr("Shadowsocks, inspired by the SOCKS5 protocol, safeguards the connection using the AEAD cipher. "
|
||||
"Although Shadowsocks is designed to be discreet and challenging to identify, it isn't identical to a standard HTTPS connection."
|
||||
"However, certain traffic analysis systems might still detect a Shadowsocks connection. "
|
||||
"Due to limited support in Amnezia, it's recommended to use AmneziaWG protocol.\n\n"
|
||||
"* Available in the AmneziaVPN only on desktop platforms\n"
|
||||
"* Normal power consumption on mobile devices\n\n"
|
||||
"* Configurable encryption protocol\n"
|
||||
"* Detectable by some DPI systems\n"
|
||||
"* Works over TCP network protocol.") },
|
||||
{ DockerContainer::Cloak,
|
||||
QObject::tr("This is a combination of the OpenVPN protocol and the Cloak plugin designed specifically for "
|
||||
"blocking protection.\n\n"
|
||||
"OpenVPN provides a secure VPN connection by encrypting all Internet traffic between the client "
|
||||
"and the server.\n\n"
|
||||
"Cloak protects OpenVPN from detection and blocking. \n\n"
|
||||
"Cloak can modify packet metadata so that it completely masks VPN traffic as normal web traffic, "
|
||||
"and also protects the VPN from detection by Active Probing. This makes it very resistant to "
|
||||
"being detected\n\n"
|
||||
"Immediately after receiving the first data packet, Cloak authenticates the incoming connection. "
|
||||
"If authentication fails, the plugin masks the server as a fake website and your VPN becomes "
|
||||
"invisible to analysis systems.\n\n"
|
||||
"If there is a extreme level of Internet censorship in your region, we advise you to use only "
|
||||
"OpenVPN over Cloak from the first connection\n\n"
|
||||
"* Available in the AmneziaVPN across all platforms\n"
|
||||
"* High power consumption on mobile devices\n"
|
||||
"* Flexible settings\n"
|
||||
"* Not recognised by DPI analysis systems\n"
|
||||
"* Works over TCP network protocol, 443 port.\n") },
|
||||
{ DockerContainer::WireGuard,
|
||||
QObject::tr("A relatively new popular VPN protocol with a simplified architecture.\n"
|
||||
"Provides stable VPN connection, high performance on all devices. Uses hard-coded encryption "
|
||||
"settings. WireGuard compared to OpenVPN has lower latency and better data transfer throughput.\n"
|
||||
"WireGuard is very susceptible to blocking due to its distinct packet signatures. "
|
||||
"Unlike some other VPN protocols that employ obfuscation techniques, "
|
||||
"the consistent signature patterns of WireGuard packets can be more easily identified and "
|
||||
"thus blocked by advanced Deep Packet Inspection (DPI) systems and other network monitoring tools.\n\n"
|
||||
"* Available in the AmneziaVPN across all platforms\n"
|
||||
"* Low power consumption\n"
|
||||
"* Minimum number of settings\n"
|
||||
"* Easily recognised by DPI analysis systems, susceptible to blocking\n"
|
||||
"* Works over UDP network protocol.") },
|
||||
{ DockerContainer::Awg,
|
||||
QObject::tr("A modern iteration of the popular VPN protocol, "
|
||||
"AmneziaWG builds upon the foundation set by WireGuard, "
|
||||
"retaining its simplified architecture and high-performance capabilities across devices.\n"
|
||||
"While WireGuard is known for its efficiency, "
|
||||
"it had issues with being easily detected due to its distinct packet signatures. "
|
||||
"AmneziaWG solves this problem by using better obfuscation methods, "
|
||||
"making its traffic blend in with regular internet traffic.\n"
|
||||
"This means that AmneziaWG keeps the fast performance of the original "
|
||||
"while adding an extra layer of stealth, "
|
||||
"making it a great choice for those wanting a fast and discreet VPN connection.\n\n"
|
||||
"* Available in the AmneziaVPN across all platforms\n"
|
||||
"* Low power consumption\n"
|
||||
"* Minimum number of settings\n"
|
||||
"* Not recognised by DPI analysis systems, resistant to blocking\n"
|
||||
"* Works over UDP network protocol.") },
|
||||
{ DockerContainer::Ipsec,
|
||||
QObject::tr("IKEv2, paired with the IPSec encryption layer, stands as a modern and stable VPN protocol.\n"
|
||||
"One of its distinguishing features is its ability to swiftly switch between networks and devices, "
|
||||
"making it particularly adaptive in dynamic network environments. \n"
|
||||
"While it offers a blend of security, stability, and speed, "
|
||||
"it's essential to note that IKEv2 can be easily detected and is susceptible to blocking.\n\n"
|
||||
"* Available in the AmneziaVPN only on Windows\n"
|
||||
"* Low power consumption, on mobile devices\n"
|
||||
"* Minimal configuration\n"
|
||||
"* Recognised by DPI analysis systems\n"
|
||||
"* Works over UDP network protocol, ports 500 and 4500.") },
|
||||
|
||||
{ DockerContainer::TorWebSite, QObject::tr("Website in Tor network") },
|
||||
{ DockerContainer::Dns, QObject::tr("DNS Service") },
|
||||
//{DockerContainer::FileShare, QObject::tr("SMB file sharing service - is Window file sharing protocol")},
|
||||
{ DockerContainer::Sftp, QObject::tr("Sftp file sharing service - is secure FTP service") } };
|
||||
{ DockerContainer::TorWebSite, QObject::tr("Website in Tor network") },
|
||||
{ DockerContainer::Dns, QObject::tr("DNS Service") },
|
||||
{ DockerContainer::Sftp, QObject::tr("Sftp file sharing service - is secure FTP service") }
|
||||
};
|
||||
}
|
||||
|
||||
amnezia::ServiceType ContainerProps::containerService(DockerContainer c)
|
||||
{
|
||||
switch (c) {
|
||||
case DockerContainer::None: return ServiceType::None;
|
||||
case DockerContainer::OpenVpn: return ServiceType::Vpn;
|
||||
case DockerContainer::Cloak: return ServiceType::Vpn;
|
||||
case DockerContainer::ShadowSocks: return ServiceType::Vpn;
|
||||
case DockerContainer::WireGuard: return ServiceType::Vpn;
|
||||
case DockerContainer::Awg: return ServiceType::Vpn;
|
||||
case DockerContainer::Ipsec: return ServiceType::Vpn;
|
||||
case DockerContainer::TorWebSite: return ServiceType::Other;
|
||||
case DockerContainer::Dns: return ServiceType::Other;
|
||||
// case DockerContainer::FileShare : return ServiceType::Other;
|
||||
case DockerContainer::Sftp: return ServiceType::Other;
|
||||
default: return ServiceType::Other;
|
||||
}
|
||||
return ProtocolProps::protocolService(defaultProtocol(c));
|
||||
}
|
||||
|
||||
Proto ContainerProps::defaultProtocol(DockerContainer c)
|
||||
@@ -171,7 +235,6 @@ Proto ContainerProps::defaultProtocol(DockerContainer c)
|
||||
|
||||
case DockerContainer::TorWebSite: return Proto::TorWebSite;
|
||||
case DockerContainer::Dns: return Proto::Dns;
|
||||
// case DockerContainer::FileShare : return Protocol::FileShare;
|
||||
case DockerContainer::Sftp: return Proto::Sftp;
|
||||
default: return Proto::Any;
|
||||
}
|
||||
@@ -233,8 +296,8 @@ bool ContainerProps::isEasySetupContainer(DockerContainer container)
|
||||
{
|
||||
switch (container) {
|
||||
case DockerContainer::WireGuard: return true;
|
||||
case DockerContainer::Awg: return true;
|
||||
case DockerContainer::Cloak: return true;
|
||||
case DockerContainer::OpenVpn: return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
@@ -243,8 +306,8 @@ QString ContainerProps::easySetupHeader(DockerContainer container)
|
||||
{
|
||||
switch (container) {
|
||||
case DockerContainer::WireGuard: return tr("Low");
|
||||
case DockerContainer::Cloak: return tr("High");
|
||||
case DockerContainer::OpenVpn: return tr("Medium");
|
||||
case DockerContainer::Awg: return tr("Medium or High");
|
||||
case DockerContainer::Cloak: return tr("Extreme");
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@@ -252,9 +315,10 @@ QString ContainerProps::easySetupHeader(DockerContainer container)
|
||||
QString ContainerProps::easySetupDescription(DockerContainer container)
|
||||
{
|
||||
switch (container) {
|
||||
case DockerContainer::WireGuard: return tr("I just want to increase the level of privacy");
|
||||
case DockerContainer::Cloak: return tr("Many foreign websites and VPN providers are blocked");
|
||||
case DockerContainer::OpenVpn: return tr("Some foreign sites are blocked, but VPN providers are not blocked");
|
||||
case DockerContainer::WireGuard: return tr("I just want to increase the level of my privacy.");
|
||||
case DockerContainer::Awg: return tr("I want to bypass censorship. This option recommended in most cases.");
|
||||
case DockerContainer::Cloak:
|
||||
return tr("Most VPN protocols are blocked. Recommended if other options are not working.");
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@@ -262,9 +326,9 @@ QString ContainerProps::easySetupDescription(DockerContainer container)
|
||||
int ContainerProps::easySetupOrder(DockerContainer container)
|
||||
{
|
||||
switch (container) {
|
||||
case DockerContainer::WireGuard: return 1;
|
||||
case DockerContainer::Cloak: return 3;
|
||||
case DockerContainer::OpenVpn: return 2;
|
||||
case DockerContainer::WireGuard: return 3;
|
||||
case DockerContainer::Awg: return 2;
|
||||
case DockerContainer::Cloak: return 1;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,17 +16,16 @@ namespace amnezia
|
||||
Q_NAMESPACE
|
||||
enum DockerContainer {
|
||||
None = 0,
|
||||
OpenVpn,
|
||||
ShadowSocks,
|
||||
Cloak,
|
||||
WireGuard,
|
||||
Awg,
|
||||
WireGuard,
|
||||
OpenVpn,
|
||||
Cloak,
|
||||
ShadowSocks,
|
||||
Ipsec,
|
||||
|
||||
// non-vpn
|
||||
TorWebSite,
|
||||
Dns,
|
||||
// FileShare,
|
||||
Sftp
|
||||
};
|
||||
Q_ENUM_NS(DockerContainer)
|
||||
|
||||
@@ -16,7 +16,6 @@ QString amnezia::scriptFolder(amnezia::DockerContainer container)
|
||||
|
||||
case DockerContainer::TorWebSite: return QLatin1String("website_tor");
|
||||
case DockerContainer::Dns: return QLatin1String("dns");
|
||||
// case DockerContainer::FileShare: return QLatin1String("file_share");
|
||||
case DockerContainer::Sftp: return QLatin1String("sftp");
|
||||
default: return "";
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ bool ServerController::isReinstallContainerRequired(DockerContainer container, c
|
||||
!= newProtoConfig.value(config_key::port).toString(protocols::shadowsocks::defaultPort))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (container == DockerContainer::Awg) {
|
||||
return true;
|
||||
}
|
||||
@@ -490,8 +490,7 @@ ServerController::Vars ServerController::genVarsForScript(const ServerCredential
|
||||
const QJsonObject &cloakConfig = config.value(ProtocolProps::protoToString(Proto::Cloak)).toObject();
|
||||
const QJsonObject &ssConfig = config.value(ProtocolProps::protoToString(Proto::ShadowSocks)).toObject();
|
||||
const QJsonObject &wireguarConfig = config.value(ProtocolProps::protoToString(Proto::WireGuard)).toObject();
|
||||
const QJsonObject &amneziaWireguarConfig =
|
||||
config.value(ProtocolProps::protoToString(Proto::Awg)).toObject();
|
||||
const QJsonObject &amneziaWireguarConfig = config.value(ProtocolProps::protoToString(Proto::Awg)).toObject();
|
||||
const QJsonObject &sftpConfig = config.value(ProtocolProps::protoToString(Proto::Sftp)).toObject();
|
||||
|
||||
Vars vars;
|
||||
@@ -591,33 +590,21 @@ ServerController::Vars ServerController::genVarsForScript(const ServerCredential
|
||||
// Amnezia wireguard vars
|
||||
vars.append({ { "$AWG_SERVER_PORT",
|
||||
amneziaWireguarConfig.value(config_key::port).toString(protocols::awg::defaultPort) } });
|
||||
vars.append({ { "$JUNK_PACKET_COUNT",
|
||||
amneziaWireguarConfig.value(config_key::junkPacketCount)
|
||||
.toString(protocols::awg::defaultJunkPacketCount) } });
|
||||
vars.append({ { "$JUNK_PACKET_MIN_SIZE",
|
||||
amneziaWireguarConfig.value(config_key::junkPacketMinSize)
|
||||
.toString(protocols::awg::defaultJunkPacketMinSize) } });
|
||||
vars.append({ { "$JUNK_PACKET_MAX_SIZE",
|
||||
amneziaWireguarConfig.value(config_key::junkPacketMaxSize)
|
||||
.toString(protocols::awg::defaultJunkPacketMaxSize) } });
|
||||
vars.append({ { "$INIT_PACKET_JUNK_SIZE",
|
||||
amneziaWireguarConfig.value(config_key::initPacketJunkSize)
|
||||
.toString(protocols::awg::defaultInitPacketJunkSize) } });
|
||||
|
||||
vars.append({ { "$JUNK_PACKET_COUNT", amneziaWireguarConfig.value(config_key::junkPacketCount).toString() } });
|
||||
vars.append({ { "$JUNK_PACKET_MIN_SIZE", amneziaWireguarConfig.value(config_key::junkPacketMinSize).toString() } });
|
||||
vars.append({ { "$JUNK_PACKET_MAX_SIZE", amneziaWireguarConfig.value(config_key::junkPacketMaxSize).toString() } });
|
||||
vars.append({ { "$INIT_PACKET_JUNK_SIZE", amneziaWireguarConfig.value(config_key::initPacketJunkSize).toString() } });
|
||||
vars.append({ { "$RESPONSE_PACKET_JUNK_SIZE",
|
||||
amneziaWireguarConfig.value(config_key::responsePacketJunkSize)
|
||||
.toString(protocols::awg::defaultResponsePacketJunkSize) } });
|
||||
amneziaWireguarConfig.value(config_key::responsePacketJunkSize).toString() } });
|
||||
vars.append({ { "$INIT_PACKET_MAGIC_HEADER",
|
||||
amneziaWireguarConfig.value(config_key::initPacketMagicHeader)
|
||||
.toString(protocols::awg::defaultInitPacketMagicHeader) } });
|
||||
amneziaWireguarConfig.value(config_key::initPacketMagicHeader).toString() } });
|
||||
vars.append({ { "$RESPONSE_PACKET_MAGIC_HEADER",
|
||||
amneziaWireguarConfig.value(config_key::responsePacketMagicHeader)
|
||||
.toString(protocols::awg::defaultResponsePacketMagicHeader) } });
|
||||
amneziaWireguarConfig.value(config_key::responsePacketMagicHeader).toString() } });
|
||||
vars.append({ { "$UNDERLOAD_PACKET_MAGIC_HEADER",
|
||||
amneziaWireguarConfig.value(config_key::underloadPacketMagicHeader)
|
||||
.toString(protocols::awg::defaultUnderloadPacketMagicHeader) } });
|
||||
amneziaWireguarConfig.value(config_key::underloadPacketMagicHeader).toString() } });
|
||||
vars.append({ { "$TRANSPORT_PACKET_MAGIC_HEADER",
|
||||
amneziaWireguarConfig.value(config_key::transportPacketMagicHeader)
|
||||
.toString(protocols::awg::defaultTransportPacketMagicHeader) } });
|
||||
amneziaWireguarConfig.value(config_key::transportPacketMagicHeader).toString() } });
|
||||
|
||||
QString serverIp = Utils::getIPAddress(credentials.hostName);
|
||||
if (!serverIp.isEmpty()) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "protocols_defs.h"
|
||||
|
||||
#include <QRandomGenerator>
|
||||
|
||||
using namespace amnezia;
|
||||
|
||||
QDebug operator<<(QDebug debug, const amnezia::ProtocolEnumNS::Proto &p)
|
||||
@@ -66,13 +68,12 @@ QMap<amnezia::Proto, QString> ProtocolProps::protocolHumanNames()
|
||||
{ Proto::ShadowSocks, "ShadowSocks" },
|
||||
{ Proto::Cloak, "Cloak" },
|
||||
{ Proto::WireGuard, "WireGuard" },
|
||||
{ Proto::WireGuard, "AmneziaWG" },
|
||||
{ Proto::Awg, "AmneziaWG" },
|
||||
{ Proto::Ikev2, "IKEv2" },
|
||||
{ Proto::L2tp, "L2TP" },
|
||||
|
||||
{ Proto::TorWebSite, "Website in Tor network" },
|
||||
{ Proto::Dns, "DNS Service" },
|
||||
{ Proto::FileShare, "File Sharing Service" },
|
||||
{ Proto::Sftp, QObject::tr("Sftp service") } };
|
||||
}
|
||||
|
||||
@@ -90,28 +91,42 @@ amnezia::ServiceType ProtocolProps::protocolService(Proto p)
|
||||
case Proto::ShadowSocks: return ServiceType::Vpn;
|
||||
case Proto::WireGuard: return ServiceType::Vpn;
|
||||
case Proto::Awg: return ServiceType::Vpn;
|
||||
case Proto::Ikev2: return ServiceType::Vpn;
|
||||
|
||||
case Proto::TorWebSite: return ServiceType::Other;
|
||||
case Proto::Dns: return ServiceType::Other;
|
||||
case Proto::FileShare: return ServiceType::Other;
|
||||
case Proto::Sftp: return ServiceType::Other;
|
||||
default: return ServiceType::Other;
|
||||
}
|
||||
}
|
||||
|
||||
int ProtocolProps::getPortForInstall(Proto p)
|
||||
{
|
||||
switch (p) {
|
||||
case Awg:
|
||||
case WireGuard:
|
||||
case ShadowSocks:
|
||||
case OpenVpn:
|
||||
return QRandomGenerator::global()->bounded(30000, 50000);
|
||||
default:
|
||||
return defaultPort(p);
|
||||
}
|
||||
}
|
||||
|
||||
int ProtocolProps::defaultPort(Proto p)
|
||||
{
|
||||
switch (p) {
|
||||
case Proto::Any: return -1;
|
||||
case Proto::OpenVpn: return 1194;
|
||||
case Proto::Cloak: return 443;
|
||||
case Proto::ShadowSocks: return 6789;
|
||||
case Proto::WireGuard: return 51820;
|
||||
case Proto::Awg: return 55424;
|
||||
case Proto::OpenVpn: return QString(protocols::openvpn::defaultPort).toInt();
|
||||
case Proto::Cloak: return QString(protocols::cloak::defaultPort).toInt();
|
||||
case Proto::ShadowSocks: return QString(protocols::shadowsocks::defaultPort).toInt();
|
||||
case Proto::WireGuard: return QString(protocols::wireguard::defaultPort).toInt();
|
||||
case Proto::Awg: return QString(protocols::awg::defaultPort).toInt();
|
||||
case Proto::Ikev2: return -1;
|
||||
case Proto::L2tp: return -1;
|
||||
|
||||
case Proto::TorWebSite: return -1;
|
||||
case Proto::Dns: return 53;
|
||||
case Proto::FileShare: return 139;
|
||||
case Proto::Sftp: return 222;
|
||||
default: return -1;
|
||||
}
|
||||
@@ -129,10 +144,10 @@ bool ProtocolProps::defaultPortChangeable(Proto p)
|
||||
case Proto::Ikev2: return false;
|
||||
case Proto::L2tp: return false;
|
||||
|
||||
case Proto::TorWebSite: return true;
|
||||
case Proto::TorWebSite: return false;
|
||||
case Proto::Dns: return false;
|
||||
case Proto::FileShare: return false;
|
||||
default: return -1;
|
||||
case Proto::Sftp: return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +165,6 @@ TransportProto ProtocolProps::defaultTransportProto(Proto p)
|
||||
// non-vpn
|
||||
case Proto::TorWebSite: return TransportProto::Tcp;
|
||||
case Proto::Dns: return TransportProto::Udp;
|
||||
case Proto::FileShare: return TransportProto::Udp;
|
||||
case Proto::Sftp: return TransportProto::Tcp;
|
||||
}
|
||||
}
|
||||
@@ -169,7 +183,6 @@ bool ProtocolProps::defaultTransportProtoChangeable(Proto p)
|
||||
// non-vpn
|
||||
case Proto::TorWebSite: return false;
|
||||
case Proto::Dns: return false;
|
||||
case Proto::FileShare: return false;
|
||||
case Proto::Sftp: return false;
|
||||
default: return false;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,6 @@ namespace amnezia
|
||||
// non-vpn
|
||||
TorWebSite,
|
||||
Dns,
|
||||
FileShare,
|
||||
Sftp
|
||||
};
|
||||
Q_ENUM_NS(Proto)
|
||||
@@ -229,6 +228,8 @@ namespace amnezia
|
||||
|
||||
Q_INVOKABLE static ServiceType protocolService(Proto p);
|
||||
|
||||
Q_INVOKABLE static int getPortForInstall(Proto p);
|
||||
|
||||
Q_INVOKABLE static int defaultPort(Proto p);
|
||||
Q_INVOKABLE static bool defaultPortChangeable(Proto p);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ if ! command -v sudo > /dev/null 2>&1; then $pm update -yq; $pm install -yq sudo
|
||||
if ! command -v fuser > /dev/null 2>&1; then sudo $pm install -yq psmisc; fi;\
|
||||
if ! command -v lsof > /dev/null 2>&1; then sudo $pm install -yq lsof; fi;\
|
||||
if ! command -v docker > /dev/null 2>&1; then sudo $pm update -yq; sudo $pm install -yq $docker_pkg;\
|
||||
if [ "$dist" = "fedora" ] || [ "$dist" = "debian" ]; then sudo systemctl enable docker && sudo systemctl start docker; fi;\
|
||||
if [ "$dist" = "fedora" ] || [ "$dist" = "centos" ] || [ "$dist" = "debian" ]; then sudo systemctl enable docker && sudo systemctl start docker; fi;\
|
||||
fi;\
|
||||
if [ "$dist" = "debian" ]; then \
|
||||
docker_service=$(systemctl list-units --full --all | grep docker.service | grep -v inactive | grep -v dead | grep -v failed);\
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@
|
||||
#include <QEventLoop>
|
||||
#include <QJsonObject>
|
||||
#include <QStandardPaths>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include "core/errorstrings.h"
|
||||
#include "core/servercontroller.h"
|
||||
@@ -73,6 +74,38 @@ void InstallController::install(DockerContainer container, int port, TransportPr
|
||||
containerConfig.insert(config_key::transport_proto,
|
||||
ProtocolProps::transportProtoToString(transportProto, protocol));
|
||||
|
||||
if (container == DockerContainer::Awg) {
|
||||
QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(3, 10));
|
||||
QString junkPacketMinSize = QString::number(50);
|
||||
QString junkPacketMaxSize = QString::number(1000);
|
||||
QString initPacketJunkSize = QString::number(QRandomGenerator::global()->bounded(15, 150));
|
||||
QString responsePacketJunkSize = QString::number(QRandomGenerator::global()->bounded(15, 150));
|
||||
|
||||
QSet<QString> headersValue;
|
||||
while (headersValue.size() != 4) {
|
||||
|
||||
auto max = (std::numeric_limits<qint32>::max)();
|
||||
headersValue.insert(QString::number(QRandomGenerator::global()->bounded(1, max)));
|
||||
}
|
||||
|
||||
auto headersValueList = headersValue.values();
|
||||
|
||||
QString initPacketMagicHeader = headersValueList.at(0);
|
||||
QString responsePacketMagicHeader = headersValueList.at(1);
|
||||
QString underloadPacketMagicHeader = headersValueList.at(2);
|
||||
QString transportPacketMagicHeader = headersValueList.at(3);
|
||||
|
||||
containerConfig[config_key::junkPacketCount] = junkPacketCount;
|
||||
containerConfig[config_key::junkPacketMinSize] = junkPacketMinSize;
|
||||
containerConfig[config_key::junkPacketMaxSize] = junkPacketMaxSize;
|
||||
containerConfig[config_key::initPacketJunkSize] = initPacketJunkSize;
|
||||
containerConfig[config_key::responsePacketJunkSize] = responsePacketJunkSize;
|
||||
containerConfig[config_key::initPacketMagicHeader] = initPacketMagicHeader;
|
||||
containerConfig[config_key::responsePacketMagicHeader] = responsePacketMagicHeader;
|
||||
containerConfig[config_key::underloadPacketMagicHeader] = underloadPacketMagicHeader;
|
||||
containerConfig[config_key::transportPacketMagicHeader] = transportPacketMagicHeader;
|
||||
}
|
||||
|
||||
if (container == DockerContainer::Sftp) {
|
||||
containerConfig.insert(config_key::userName, protocols::sftp::defaultUserName);
|
||||
containerConfig.insert(config_key::password, Utils::getRandomString(10));
|
||||
@@ -183,7 +216,9 @@ void InstallController::installContainer(DockerContainer container, QJsonObject
|
||||
"All installed containers have been added to the application");
|
||||
}
|
||||
|
||||
m_containersModel->setData(m_containersModel->index(0, 0), container, ContainersModel::Roles::IsDefaultRole);
|
||||
if (ContainerProps::containerService(container) == ServiceType::Vpn) {
|
||||
m_containersModel->setData(m_containersModel->index(container), true, ContainersModel::Roles::IsDefaultRole);
|
||||
}
|
||||
emit installContainerFinished(finishMessage, ContainerProps::containerService(container) == ServiceType::Other);
|
||||
return;
|
||||
}
|
||||
@@ -473,6 +508,8 @@ void InstallController::addEmptyServer()
|
||||
server.insert(config_key::port, m_currentlyInstalledServerCredentials.port);
|
||||
server.insert(config_key::description, m_settings->nextAvailableServerName());
|
||||
|
||||
server.insert(config_key::defaultContainer, ContainerProps::containerToString(DockerContainer::None));
|
||||
|
||||
m_serversModel->addServer(server);
|
||||
m_serversModel->setDefaultServerIndex(m_serversModel->getServersCount() - 1);
|
||||
|
||||
|
||||
@@ -78,12 +78,11 @@ PageLoader::PageEnum ProtocolsModel::protocolPage(Proto protocol) const
|
||||
case Proto::ShadowSocks: return PageLoader::PageEnum::PageProtocolShadowSocksSettings;
|
||||
case Proto::WireGuard: return PageLoader::PageEnum::PageProtocolWireGuardSettings;
|
||||
case Proto::Ikev2: return PageLoader::PageEnum::PageProtocolIKev2Settings;
|
||||
case Proto::L2tp: return PageLoader::PageEnum::PageProtocolOpenVpnSettings;
|
||||
case Proto::L2tp: return PageLoader::PageEnum::PageProtocolIKev2Settings;
|
||||
// non-vpn
|
||||
case Proto::TorWebSite: return PageLoader::PageEnum::PageProtocolOpenVpnSettings;
|
||||
case Proto::Dns: return PageLoader::PageEnum::PageProtocolOpenVpnSettings;
|
||||
case Proto::FileShare: return PageLoader::PageEnum::PageProtocolOpenVpnSettings;
|
||||
case Proto::Sftp: return PageLoader::PageEnum::PageProtocolOpenVpnSettings;
|
||||
case Proto::TorWebSite: return PageLoader::PageEnum::PageServiceTorWebsiteSettings;
|
||||
case Proto::Dns: return PageLoader::PageEnum::PageServiceDnsSettings;
|
||||
case Proto::Sftp: return PageLoader::PageEnum::PageServiceSftpSettings;
|
||||
default: return PageLoader::PageEnum::PageProtocolOpenVpnSettings;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ void ServersModel::setDefaultServerIndex(const int index)
|
||||
{
|
||||
m_settings->setDefaultServer(index);
|
||||
m_defaultServerIndex = m_settings->defaultServerIndex();
|
||||
emit defaultServerIndexChanged();
|
||||
emit defaultServerIndexChanged(m_defaultServerIndex);
|
||||
}
|
||||
|
||||
const int ServersModel::getDefaultServerIndex()
|
||||
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
|
||||
signals:
|
||||
void currentlyProcessedServerIndexChanged(const int index);
|
||||
void defaultServerIndexChanged();
|
||||
void defaultServerIndexChanged(const int index);
|
||||
void defaultServerNameChanged();
|
||||
|
||||
private:
|
||||
|
||||
@@ -142,6 +142,7 @@ Button {
|
||||
PageController.setTriggeredBtConnectButton(true)
|
||||
|
||||
ServersModel.currentlyProcessedIndex = ServersModel.getDefaultServerIndex()
|
||||
InstallController.setShouldCreateServer(false)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardEasy)
|
||||
|
||||
return
|
||||
|
||||
@@ -20,16 +20,14 @@ DrawerType {
|
||||
anchors.right: parent.right
|
||||
spacing: 0
|
||||
|
||||
Header2TextType {
|
||||
Header2Type {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
Layout.bottomMargin: 32
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.bottomMargin: 16
|
||||
|
||||
text: qsTr("Connection data")
|
||||
wrapMode: Text.WordWrap
|
||||
headerText: qsTr("Add new connection")
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
@@ -37,7 +35,7 @@ DrawerType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
text: qsTr("Server IP, login and password")
|
||||
text: qsTr("Configure your server")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
@@ -51,7 +49,7 @@ DrawerType {
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("QR code, key or configuration file")
|
||||
text: qsTr("Open config file, key or QR code")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
|
||||
@@ -50,34 +50,26 @@ ListView {
|
||||
imageSource: "qrc:/images/controls/download.svg"
|
||||
showImage: !isInstalled
|
||||
|
||||
checkable: isInstalled
|
||||
checkable: isInstalled && !ConnectionController.isConnected && isSupported
|
||||
checked: isDefault
|
||||
|
||||
onPressed: function(mouse) {
|
||||
if (!isSupported) {
|
||||
PageController.showErrorMessage(qsTr("The selected protocol is not supported on the current platform"))
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (checked) {
|
||||
var needReconnected = false
|
||||
if (!isDefault) {
|
||||
needReconnected = true
|
||||
}
|
||||
if (ConnectionController.isConnected && isInstalled) {
|
||||
PageController.showNotificationMessage(qsTr("Unable change protocol while there is an active connection"))
|
||||
return
|
||||
}
|
||||
|
||||
if (checked) {
|
||||
isDefault = true
|
||||
|
||||
menuContent.currentIndex = index
|
||||
containersDropDown.menuVisible = false
|
||||
|
||||
|
||||
if (needReconnected && (ConnectionController.isConnected || ConnectionController.isConnectionInProgress)) {
|
||||
PageController.showNotificationMessage(qsTr("Reconnect via VPN Procotol: ") + name)
|
||||
PageController.goToPageHome()
|
||||
ConnectionController.openConnection()
|
||||
}
|
||||
} else {
|
||||
if (!isSupported && isInstalled) {
|
||||
PageController.showErrorMessage(qsTr("The selected protocol is not supported on the current platform"))
|
||||
return
|
||||
}
|
||||
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
|
||||
@@ -17,9 +17,11 @@ DrawerType {
|
||||
property var noButtonFunction
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.5
|
||||
height: content.implicitHeight + 32
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
@@ -26,4 +26,16 @@ Item {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
TextEdit{
|
||||
id: clipboard
|
||||
visible: false
|
||||
}
|
||||
|
||||
function copyToClipBoard(text) {
|
||||
clipboard.text = text
|
||||
clipboard.selectAll()
|
||||
clipboard.copy()
|
||||
clipboard.select(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ RadioButton {
|
||||
|
||||
Text {
|
||||
text: root.headerText
|
||||
wrapMode: Text.WordWrap
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 25
|
||||
font.weight: 700
|
||||
@@ -110,6 +111,7 @@ RadioButton {
|
||||
|
||||
Text {
|
||||
text: root.footerText
|
||||
wrapMode: Text.WordWrap
|
||||
visible: root.footerText !== ""
|
||||
color: "#878B91"
|
||||
font.pixelSize: 13
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import "../Config"
|
||||
|
||||
Drawer {
|
||||
id: drawer
|
||||
property bool needCloseButton: true
|
||||
@@ -39,6 +41,18 @@ Drawer {
|
||||
|
||||
border.color: "#2C2D30"
|
||||
border.width: 1
|
||||
|
||||
Rectangle {
|
||||
visible: GC.isMobile()
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.topMargin: 10
|
||||
|
||||
width: 20
|
||||
height: 2
|
||||
color: "#2C2D30"
|
||||
}
|
||||
}
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
|
||||
@@ -20,7 +20,9 @@ Item {
|
||||
property bool isLeftImageHoverEnabled: true //todo separete this qml file to 3
|
||||
|
||||
property string textColor: "#d7d8db"
|
||||
property string textDisabledColor: "#878B91"
|
||||
property string descriptionColor: "#878B91"
|
||||
property string descriptionDisabledColor: "#494B50"
|
||||
property real textOpacity: 1.0
|
||||
|
||||
property string rightImageColor: "#d7d8db"
|
||||
@@ -71,7 +73,14 @@ Item {
|
||||
|
||||
ListItemTitleType {
|
||||
text: root.text
|
||||
color: root.descriptionOnTop ? root.descriptionColor : root.textColor
|
||||
color: {
|
||||
if (root.enabled) {
|
||||
return root.descriptionOnTop ? root.descriptionColor : root.textColor
|
||||
} else {
|
||||
return root.descriptionOnTop ? root.descriptionDisabledColor : root.textDisabledColor
|
||||
}
|
||||
}
|
||||
|
||||
maximumLineCount: root.textMaximumLineCount
|
||||
elide: root.textElide
|
||||
|
||||
@@ -96,7 +105,13 @@ Item {
|
||||
id: description
|
||||
|
||||
text: root.descriptionText
|
||||
color: root.descriptionOnTop ? root.textColor : root.descriptionColor
|
||||
color: {
|
||||
if (root.enabled) {
|
||||
return root.descriptionOnTop ? root.textColor : root.descriptionColor
|
||||
} else {
|
||||
return root.descriptionOnTop ? root.textDisabledColor : root.descriptionDisabledColor
|
||||
}
|
||||
}
|
||||
|
||||
opacity: root.textOpacity
|
||||
|
||||
@@ -157,7 +172,7 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
hoverEnabled: root.enabled
|
||||
|
||||
onEntered: {
|
||||
if (rightImageSource) {
|
||||
|
||||
@@ -241,8 +241,18 @@ PageType {
|
||||
}
|
||||
]
|
||||
|
||||
DividerType {
|
||||
Layout.topMargin: 10
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: 20
|
||||
Layout.preferredHeight: 2
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
|
||||
visible: (buttonContent.collapsedVisibility || buttonContent.expandedVisibility)
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.topMargin: 24
|
||||
Layout.topMargin: 14
|
||||
Layout.leftMargin: 24
|
||||
Layout.rightMargin: 24
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
@@ -305,7 +315,7 @@ PageType {
|
||||
|
||||
Header1TextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
Layout.topMargin: 14
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
@@ -471,10 +481,16 @@ PageType {
|
||||
}
|
||||
|
||||
checked: index === serversMenuContent.currentIndex
|
||||
checkable: !ConnectionController.isConnected
|
||||
|
||||
ButtonGroup.group: serversRadioButtonGroup
|
||||
|
||||
onClicked: {
|
||||
if (ConnectionController.isConnected) {
|
||||
PageController.showNotificationMessage(qsTr("Unable change server while there is an active connection"))
|
||||
return
|
||||
}
|
||||
|
||||
serversMenuContent.currentIndex = index
|
||||
|
||||
ServersModel.currentlyProcessedIndex = index
|
||||
|
||||
@@ -96,7 +96,7 @@ PageType {
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
col.copyToClipBoard(descriptionText)
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
PageController.showNotificationMessage(qsTr("Copied"))
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ PageType {
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
col.copyToClipBoard(descriptionText)
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
PageController.showNotificationMessage(qsTr("Copied"))
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ PageType {
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
col.copyToClipBoard(descriptionText)
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
PageController.showNotificationMessage(qsTr("Copied"))
|
||||
}
|
||||
}
|
||||
@@ -147,23 +147,11 @@ PageType {
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
col.copyToClipBoard(descriptionText)
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
PageController.showNotificationMessage(qsTr("Copied"))
|
||||
}
|
||||
}
|
||||
|
||||
TextEdit{
|
||||
id: clipboard
|
||||
visible: false
|
||||
}
|
||||
|
||||
function copyToClipBoard(text) {
|
||||
clipboard.text = text
|
||||
clipboard.selectAll()
|
||||
clipboard.copy()
|
||||
clipboard.select(0, 0)
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
visible: !GC.isMobile()
|
||||
|
||||
|
||||
@@ -78,23 +78,11 @@ PageType {
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
content.copyToClipBoard(descriptionText)
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
PageController.showNotificationMessage(qsTr("Copied"))
|
||||
}
|
||||
}
|
||||
|
||||
TextEdit{
|
||||
id: clipboard
|
||||
visible: false
|
||||
}
|
||||
|
||||
function copyToClipBoard(text) {
|
||||
clipboard.text = text
|
||||
clipboard.selectAll()
|
||||
clipboard.copy()
|
||||
clipboard.select(0, 0)
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 40
|
||||
@@ -121,7 +109,7 @@ PageType {
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
text: qsTr("When configuring WordPress set the domain as this onion address.")
|
||||
text: qsTr("When configuring WordPress set the this onion address as domain.")
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
|
||||
@@ -110,6 +110,7 @@ PageType {
|
||||
DividerType {}
|
||||
|
||||
LabelWithButtonType {
|
||||
visible: GC.isDesktop()
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: about.height
|
||||
|
||||
@@ -122,7 +123,9 @@ PageType {
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
DividerType {
|
||||
visible: GC.isDesktop()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ PageType {
|
||||
Layout.margins: 16
|
||||
|
||||
text: qsTr("Auto start")
|
||||
descriptionText: qsTr("Launch the application every time %1 starts").arg(Qt.platform.os)
|
||||
descriptionText: qsTr("Launch the application every time the device is starts")
|
||||
|
||||
checked: SettingsController.isAutoStartEnabled()
|
||||
onCheckedChanged: {
|
||||
|
||||
@@ -103,6 +103,7 @@ PageType {
|
||||
PageController.showBusyIndicator(true)
|
||||
SettingsController.backupAppConfig(fileName)
|
||||
PageController.showBusyIndicator(false)
|
||||
PageController.showNotificationMessage(qsTr("Backup file saved"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,8 @@ PageType {
|
||||
DividerType {}
|
||||
|
||||
LabelWithButtonType {
|
||||
visible: GC.isDesktop()
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Site-based split tunneling")
|
||||
@@ -105,12 +107,15 @@ PageType {
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
DividerType {
|
||||
visible: GC.isDesktop()
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
visible: false
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("App-based split tunneling")
|
||||
descriptionText: qsTr("Allows you to use the VPN only for certain applications")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
@@ -119,7 +124,9 @@ PageType {
|
||||
}
|
||||
}
|
||||
|
||||
// DividerType {}
|
||||
DividerType {
|
||||
visible: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ PageType {
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("If AmneziaDNS is not used or installed")
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ PageType {
|
||||
PageController.showBusyIndicator(true)
|
||||
SettingsController.exportLogsFile(fileName)
|
||||
PageController.showBusyIndicator(false)
|
||||
PageController.showNotificationMessage(qsTr("Logs file saved"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,10 @@ import "../Components"
|
||||
PageType {
|
||||
id: root
|
||||
|
||||
property bool pageEnabled: {
|
||||
return !ConnectionController.isConnected
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SitesController
|
||||
|
||||
@@ -78,6 +82,8 @@ PageType {
|
||||
|
||||
RowLayout {
|
||||
HeaderType {
|
||||
enabled: root.pageEnabled
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 16
|
||||
|
||||
@@ -89,6 +95,8 @@ PageType {
|
||||
|
||||
property int lastActiveRouteMode: routeMode.onlyForwardSites
|
||||
|
||||
enabled: root.pageEnabled
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: 16
|
||||
|
||||
@@ -115,7 +123,7 @@ PageType {
|
||||
|
||||
drawerHeight: 0.4375
|
||||
|
||||
enabled: switcher.checked
|
||||
enabled: switcher.checked && root.pageEnabled
|
||||
|
||||
headerText: qsTr("Mode")
|
||||
|
||||
@@ -155,9 +163,9 @@ PageType {
|
||||
FlickableType {
|
||||
anchors.top: header.bottom
|
||||
anchors.topMargin: 16
|
||||
contentHeight: col.implicitHeight + connectButton.implicitHeight + connectButton.anchors.bottomMargin + connectButton.anchors.topMargin
|
||||
contentHeight: col.implicitHeight + addSiteButton.implicitHeight + addSiteButton.anchors.bottomMargin + addSiteButton.anchors.topMargin
|
||||
|
||||
enabled: switcher.checked
|
||||
enabled: switcher.checked && root.pageEnabled
|
||||
|
||||
Column {
|
||||
id: col
|
||||
@@ -221,8 +229,17 @@ PageType {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: addSiteButton
|
||||
anchors.bottomMargin: -24
|
||||
color: "#0E0E11"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: connectButton
|
||||
id: addSiteButton
|
||||
|
||||
enabled: root.pageEnabled
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -41,7 +41,7 @@ PageType {
|
||||
HeaderType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
headerText: qsTr("Server connection")
|
||||
headerText: qsTr("Configure your server")
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
@@ -107,6 +107,14 @@ PageType {
|
||||
PageController.goToPage(PageEnum.PageSetupWizardEasy)
|
||||
}
|
||||
}
|
||||
|
||||
LabelTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 12
|
||||
|
||||
text: qsTr("All data you enter will remain strictly confidential
|
||||
and will not be shared or disclosed to the Amnezia or any third parties")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ PageType {
|
||||
|
||||
function onServerIsBusy(isBusy) {
|
||||
if (isBusy) {
|
||||
root.progressBarText = qsTr("Amnesia has detected that your server is currently ") +
|
||||
qsTr("busy installing other software. Amnesia installation ") +
|
||||
root.progressBarText = qsTr("Amnezia has detected that your server is currently ") +
|
||||
qsTr("busy installing other software. Amnezia installation ") +
|
||||
qsTr("will pause until the server finishes installing other software")
|
||||
root.isTimerRunning = false
|
||||
} else {
|
||||
|
||||
@@ -144,33 +144,16 @@ PageType {
|
||||
headerText: name
|
||||
}
|
||||
|
||||
TextField {
|
||||
implicitWidth: parent.width
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.bottomMargin: 16
|
||||
|
||||
padding: 0
|
||||
leftPadding: 0
|
||||
height: 24
|
||||
|
||||
color: "#D7D8DB"
|
||||
|
||||
font.pixelSize: 16
|
||||
font.weight: Font.Medium
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
text: detailedDescription
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readOnly: true
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
}
|
||||
textFormat: Text.MarkdownText
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
color: "transparent"
|
||||
@@ -241,7 +224,7 @@ PageType {
|
||||
if (ProtocolProps.defaultPort(defaultContainerProto) < 0) {
|
||||
port.visible = false
|
||||
} else {
|
||||
port.textFieldText = ProtocolProps.defaultPort(defaultContainerProto)
|
||||
port.textFieldText = ProtocolProps.getPortForInstall(defaultContainerProto)
|
||||
}
|
||||
transportProtoSelector.currentIndex = ProtocolProps.defaultTransportProto(defaultContainerProto)
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ PageType {
|
||||
Layout.bottomMargin: 24
|
||||
|
||||
text: accessTypeSelector.currentIndex === 0 ? qsTr("VPN access without the ability to manage the server") :
|
||||
qsTr("Access to server management. The user with whom you share full access to the connection will be able to add and remove your protocols and services to the servers, as well as change settings.")
|
||||
qsTr("Access to server management. The user with whom you share full access to the connection will be able to add and remove your protocols and services to the server, as well as change settings.")
|
||||
color: "#878B91"
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ PageType {
|
||||
|
||||
if (index === ContainerProps.containerFromString("amnezia-openvpn")) {
|
||||
root.connectionTypesModel.push(openVpnConnectionFormat)
|
||||
} else if (index === ContainerProps.containerFromString("amnezia-awg")) {
|
||||
} else if (index === ContainerProps.containerFromString("amnezia-wireguard")) {
|
||||
root.connectionTypesModel.push(wireGuardConnectionFormat)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@ PageType {
|
||||
tabBar.enabled = !visible
|
||||
}
|
||||
|
||||
function onShowTopCloseButton(visible) {
|
||||
topCloseButton.visible = visible
|
||||
}
|
||||
// function onShowTopCloseButton(visible) {
|
||||
// topCloseButton.visible = visible
|
||||
// }
|
||||
|
||||
function onEnableTabBar(enabled) {
|
||||
tabBar.enabled = enabled
|
||||
@@ -137,10 +137,10 @@ PageType {
|
||||
tabBarStackView.push(pagePath, { "objectName" : pagePath })
|
||||
}
|
||||
|
||||
onWidthChanged: {
|
||||
topCloseButton.x = tabBarStackView.x + tabBarStackView.width -
|
||||
topCloseButton.buttonWidth - topCloseButton.rightPadding
|
||||
}
|
||||
// onWidthChanged: {
|
||||
// topCloseButton.x = tabBarStackView.x + tabBarStackView.width -
|
||||
// topCloseButton.buttonWidth - topCloseButton.rightPadding
|
||||
// }
|
||||
}
|
||||
|
||||
TabBar {
|
||||
@@ -234,11 +234,12 @@ PageType {
|
||||
z: 1
|
||||
}
|
||||
|
||||
TopCloseButtonType {
|
||||
id: topCloseButton
|
||||
x: tabBarStackView.width - topCloseButton.buttonWidth - topCloseButton.rightPadding
|
||||
z: 1
|
||||
}
|
||||
// TopCloseButtonType {
|
||||
// id: topCloseButton
|
||||
|
||||
// x: tabBarStackView.width - topCloseButton.buttonWidth - topCloseButton.rightPadding
|
||||
// z: 1
|
||||
// }
|
||||
|
||||
ConnectionTypeSelectionDrawer {
|
||||
id: connectionTypeSelection
|
||||
|
||||
@@ -96,16 +96,16 @@ if [ "${MAC_CERT_PW+x}" ]; then
|
||||
security find-identity -p codesigning
|
||||
|
||||
echo "Signing App bundle..."
|
||||
/usr/bin/codesign --deep --force --verbose --timestamp -o runtime --sign "Developer ID Application: Privacy Technologies OU (X7UJ388FXK)" $BUNDLE_DIR
|
||||
/usr/bin/codesign --deep --force --verbose --timestamp -o runtime --sign "$MAC_SIGNER_ID" $BUNDLE_DIR
|
||||
/usr/bin/codesign --verify -vvvv $BUNDLE_DIR || true
|
||||
spctl -a -vvvv $BUNDLE_DIR || true
|
||||
|
||||
if [ "${NOTARIZE_APP+x}" ]; then
|
||||
echo "Notarizing App bundle..."
|
||||
/usr/bin/ditto -c -k --keepParent $BUNDLE_DIR $PROJECT_DIR/Bundle_to_notarize.zip
|
||||
xcrun altool --notarize-app -f $PROJECT_DIR/Bundle_to_notarize.zip -t osx --primary-bundle-id "$APP_DOMAIN" -u "$APPLE_DEV_EMAIL" -p $APPLE_DEV_PASSWORD
|
||||
xcrun notarytool submit $PROJECT_DIR/Bundle_to_notarize.zip --apple-id $APPLE_DEV_EMAIL --team-id $MAC_TEAM_ID --password $APPLE_DEV_PASSWORD
|
||||
rm $PROJECT_DIR/Bundle_to_notarize.zip
|
||||
sleep 600
|
||||
sleep 300
|
||||
xcrun stapler staple $BUNDLE_DIR
|
||||
xcrun stapler validate $BUNDLE_DIR
|
||||
spctl -a -vvvv $BUNDLE_DIR || true
|
||||
@@ -130,15 +130,15 @@ $QIF_BIN_DIR/binarycreator --offline-only -v -c $BUILD_DIR/installer/config/maco
|
||||
if [ "${MAC_CERT_PW+x}" ]; then
|
||||
echo "Signing installer bundle..."
|
||||
security unlock-keychain -p $TEMP_PASS $KEYCHAIN
|
||||
/usr/bin/codesign --deep --force --verbose --timestamp -o runtime --sign "Developer ID Application: Privacy Technologies OU (X7UJ388FXK)" $INSTALLER_BUNDLE_DIR
|
||||
/usr/bin/codesign --deep --force --verbose --timestamp -o runtime --sign "$MAC_SIGNER_ID" $INSTALLER_BUNDLE_DIR
|
||||
/usr/bin/codesign --verify -vvvv $INSTALLER_BUNDLE_DIR || true
|
||||
|
||||
if [ "${NOTARIZE_APP+x}" ]; then
|
||||
echo "Notarizing installer bundle..."
|
||||
/usr/bin/ditto -c -k --keepParent $INSTALLER_BUNDLE_DIR $PROJECT_DIR/Installer_bundle_to_notarize.zip
|
||||
xcrun altool --notarize-app -f $PROJECT_DIR/Installer_bundle_to_notarize.zip -t osx --primary-bundle-id "$APP_DOMAIN" -u "$APPLE_DEV_EMAIL" -p $APPLE_DEV_PASSWORD
|
||||
xcrun notarytool submit $PROJECT_DIR/Installer_bundle_to_notarize.zip --apple-id $APPLE_DEV_EMAIL --team-id $MAC_TEAM_ID --password $APPLE_DEV_PASSWORD
|
||||
rm $PROJECT_DIR/Installer_bundle_to_notarize.zip
|
||||
sleep 600
|
||||
sleep 300
|
||||
xcrun stapler staple $INSTALLER_BUNDLE_DIR
|
||||
xcrun stapler validate $INSTALLER_BUNDLE_DIR
|
||||
spctl -a -vvvv $INSTALLER_BUNDLE_DIR || true
|
||||
@@ -151,13 +151,13 @@ hdiutil create -volname AmneziaVPN -srcfolder $BUILD_DIR/installer/$APP_NAME.app
|
||||
if [ "${MAC_CERT_PW+x}" ]; then
|
||||
echo "Signing DMG installer..."
|
||||
security unlock-keychain -p $TEMP_PASS $KEYCHAIN
|
||||
/usr/bin/codesign --deep --force --verbose --timestamp -o runtime --sign "Developer ID Application: Privacy Technologies OU (X7UJ388FXK)" $DMG_FILENAME
|
||||
/usr/bin/codesign --deep --force --verbose --timestamp -o runtime --sign "$MAC_SIGNER_ID" $DMG_FILENAME
|
||||
/usr/bin/codesign --verify -vvvv $DMG_FILENAME || true
|
||||
|
||||
if [ "${NOTARIZE_APP+x}" ]; then
|
||||
echo "Notarizing DMG installer..."
|
||||
xcrun altool --notarize-app -f $DMG_FILENAME -t osx --primary-bundle-id $APP_DOMAIN -u $APPLE_DEV_EMAIL -p $APPLE_DEV_PASSWORD
|
||||
sleep 600
|
||||
xcrun notarytool submit $DMG_FILENAME --apple-id $APPLE_DEV_EMAIL --team-id $MAC_TEAM_ID --password $APPLE_DEV_PASSWORD
|
||||
sleep 300
|
||||
xcrun stapler staple $DMG_FILENAME
|
||||
xcrun stapler validate $DMG_FILENAME
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user