Compare commits

..

15 Commits

Author SHA1 Message Date
lunardunno
d61e2bc8f6 revert change: Linux versions of stdOut 2025-04-01 03:11:51 +04:00
lunardunno
9e1298550f Linux version to stdOut
Print the Linux version to stdOut for subsequent checking by the server controller.
2025-04-01 03:04:55 +04:00
vladimir.kuznetsov
805bc5fb61 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2025-03-25 22:43:34 +07:00
vladimir.kuznetsov
3241782098 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2024-05-20 10:49:42 +02:00
pokamest
b19009b669 Merge branch 'dev' into update_server_scripts 2024-03-18 21:43:55 +00:00
pokamest
26218b22ee Merge branch 'dev' into update_server_scripts 2024-03-03 15:11:14 +00:00
pokamest
3eeeb5094e Merge pull request #628 from amnezia-vpn/feature/new-awg-docker-container
Feature/new awg docker container
2024-03-03 07:09:56 -08:00
vladimir.kuznetsov
f309a358c3 Merge branch 'update_server_scripts' of github.com:amnezia-vpn/amnezia-client into feature/new-awg-docker-container 2024-02-24 14:41:08 +05:00
vladimir.kuznetsov
be0ec37738 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2024-02-24 14:40:14 +05:00
vladimir.kuznetsov
179c6093ce Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-awg-docker-container 2024-02-24 14:37:26 +05:00
vladimir.kuznetsov
10933ce466 added backward compatibility for the old awg container 2024-02-24 14:34:47 +05:00
vladimir.kuznetsov
cd9cdd24ec Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-awg-docker-container 2024-02-22 15:49:41 +05:00
vladimir.kuznetsov
144ed3c988 updated the paths to awg files and interfaces to match the new docker container 2024-02-21 19:06:16 +05:00
vladimir.kuznetsov
e046b6df04 Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into update_server_scripts 2024-02-21 15:00:54 +05:00
root
548959752c rename interface and config file name to awg0
change base docker image to amneziavpn/amneziawg-go:latest
2024-02-15 11:07:09 +07:00
45 changed files with 2973 additions and 6917 deletions

View File

@@ -10,7 +10,7 @@ env:
jobs:
Build-Linux-Ubuntu:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
env:
QT_VERSION: 6.6.2
@@ -190,7 +190,7 @@ jobs:
- name: 'Install go'
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.22.1'
cache: false
- name: 'Setup gomobile'

View File

@@ -1,41 +1,64 @@
name: 'Upload a new version'
on:
workflow_dispatch:
inputs:
RELEASE_VERSION:
description: 'Release version (e.g. 1.2.3.4)'
required: true
type: string
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
jobs:
Upload-S3:
upload:
runs-on: ubuntu-latest
name: upload
steps:
- name: Checkout
- name: Checkout CMakeLists.txt
uses: actions/checkout@v4
with:
ref: ${{ inputs.RELEASE_VERSION }}
ref: ${{ github.ref_name }}
sparse-checkout: |
CMakeLists.txt
deploy/deploy_s3.sh
sparse-checkout-cone-mode: false
- name: Verify git tag
run: |
TAG_NAME=${{ inputs.RELEASE_VERSION }}
GIT_TAG=${{ github.ref_name }}
CMAKE_TAG=$(grep 'project.*VERSION' CMakeLists.txt | sed -E 's/.* ([0-9]+.[0-9]+.[0-9]+.[0-9]+)$/\1/')
if [[ "$TAG_NAME" == "$CMAKE_TAG" ]]; then
echo "Git tag ($TAG_NAME) matches CMakeLists.txt version ($CMAKE_TAG)."
if [[ "$GIT_TAG" == "$CMAKE_TAG" ]]; then
echo "Git tag ($GIT_TAG) and version in CMakeLists.txt ($CMAKE_TAG) are the same. Continuing..."
else
echo "::error::Mismatch: Git tag ($TAG_NAME) != CMakeLists.txt version ($CMAKE_TAG). Exiting with error..."
echo "Git tag ($GIT_TAG) and version in CMakeLists.txt ($CMAKE_TAG) are not the same! Cancelling..."
exit 1
fi
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
- name: Download artifacts from the "${{ github.ref_name }}" tag
uses: robinraju/release-downloader@v1.8
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
tag: ${{ github.ref_name }}
fileName: "AmneziaVPN_(Linux_|)${{ github.ref_name }}*"
out-file-path: ${{ github.ref_name }}
- name: Send dist to S3
run: bash deploy/deploy_s3.sh ${{ inputs.RELEASE_VERSION }}
- name: Upload beta version
uses: jakejarvis/s3-sync-action@master
if: contains(github.event.base_ref, 'dev')
with:
args: --include "AmneziaVPN*" --delete
env:
AWS_S3_BUCKET: updates
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT: https://${{ vars.CF_ACCOUNT_ID }}.r2.cloudflarestorage.com
SOURCE_DIR: ${{ github.ref_name }}
DEST_DIR: beta/${{ github.ref_name }}
- name: Upload stable version
uses: jakejarvis/s3-sync-action@master
if: contains(github.event.base_ref, 'master')
with:
args: --include "AmneziaVPN*" --delete
env:
AWS_S3_BUCKET: updates
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT: https://${{ vars.CF_ACCOUNT_ID }}.r2.cloudflarestorage.com
SOURCE_DIR: ${{ github.ref_name }}
DEST_DIR: stable/${{ github.ref_name }}

View File

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
set(PROJECT AmneziaVPN)
project(${PROJECT} VERSION 4.8.6.0
project(${PROJECT} VERSION 4.8.5.0
DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/"
)
@@ -11,7 +11,7 @@ string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
set(RELEASE_DATE "${CURRENT_DATE}")
set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH})
set(APP_ANDROID_VERSION_CODE 2083)
set(APP_ANDROID_VERSION_CODE 2082)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(MZ_PLATFORM_NAME "linux")

View File

@@ -35,6 +35,10 @@ WireguardConfigurator::WireguardConfigurator(std::shared_ptr<Settings> settings,
m_protocolName = m_isAwg ? config_key::awg : config_key::wireguard;
m_defaultPort = m_isAwg ? protocols::wireguard::defaultPort : protocols::awg::defaultPort;
m_interfaceName = m_isAwg ? protocols::awg::interfaceName : protocols::wireguard::interfaceName;
m_wgBinaryName = m_isAwg ? protocols::awg::wgBinaryName : protocols::wireguard::wgBinaryName;
m_wgQuickBinaryName = m_isAwg ? protocols::awg::wgQuickBinaryName : protocols::wireguard::wgQuickBinaryName;
}
WireguardConfigurator::ConnectionData WireguardConfigurator::genClientKeys()
@@ -103,6 +107,20 @@ WireguardConfigurator::ConnectionData WireguardConfigurator::prepareWireguardCon
return connData;
}
if (container == DockerContainer::Awg) {
if (m_serverController->isNewAwgContainer(credentials)) {
m_serverConfigPath = amnezia::protocols::awg::serverConfigPath;
m_interfaceName = protocols::awg::interfaceName;
m_wgBinaryName = protocols::awg::wgBinaryName;
m_wgQuickBinaryName = protocols::awg::wgQuickBinaryName;
} else {
m_serverConfigPath = "/opt/amnezia/awg/wg0.conf";
m_interfaceName = protocols::wireguard::interfaceName;
m_wgBinaryName = protocols::wireguard::wgBinaryName;
m_wgQuickBinaryName = protocols::wireguard::wgQuickBinaryName;
}
}
QString getIpsScript = QString("cat %1 | grep AllowedIPs").arg(m_serverConfigPath);
QString stdOut;
auto cbReadStdOut = [&](const QString &data, libssh::Client &) {
@@ -168,8 +186,8 @@ WireguardConfigurator::ConnectionData WireguardConfigurator::prepareWireguardCon
return connData;
}
QString script = QString("sudo docker exec -i $CONTAINER_NAME bash -c 'wg syncconf wg0 <(wg-quick strip %1)'")
.arg(m_serverConfigPath);
QString script = QString("sudo docker exec -i $CONTAINER_NAME bash -c '%4 syncconf %2 <(%3 strip %1)'")
.arg(m_serverConfigPath, m_interfaceName, m_wgQuickBinaryName, m_wgBinaryName);
errorCode = m_serverController->runScript(
credentials,

View File

@@ -49,6 +49,9 @@ private:
amnezia::ProtocolScriptType m_configTemplate;
QString m_protocolName;
QString m_defaultPort;
QString m_interfaceName;
QString m_wgBinaryName;
QString m_wgQuickBinaryName;
};
#endif // WIREGUARD_CONFIGURATOR_H

View File

@@ -10,8 +10,7 @@ namespace apiDefs
AmneziaFreeV3,
AmneziaPremiumV1,
AmneziaPremiumV2,
SelfHosted,
ExternalPremium
SelfHosted
};
enum ConfigSource {
@@ -44,13 +43,6 @@ namespace apiDefs
constexpr QLatin1String maxDeviceCount("max_device_count");
constexpr QLatin1String subscriptionEndDate("subscription_end_date");
constexpr QLatin1String issuedConfigs("issued_configs");
constexpr QLatin1String supportInfo("support_info");
constexpr QLatin1String email("email");
constexpr QLatin1String billingEmail("billing_email");
constexpr QLatin1String website("website");
constexpr QLatin1String websiteName("website_name");
constexpr QLatin1String telegram("telegram");
}
const int requestTimeoutMsecs = 12 * 1000; // 12 secs

View File

@@ -32,17 +32,15 @@ apiDefs::ConfigType apiUtils::getConfigType(const QJsonObject &serverConfigObjec
constexpr QLatin1String servicePremium("amnezia-premium");
constexpr QLatin1String serviceFree("amnezia-free");
constexpr QLatin1String serviceExternalPremium("external-premium");
auto apiConfigObject = serverConfigObject.value(apiDefs::key::apiConfig).toObject();
auto stackType = apiConfigObject.value(apiDefs::key::stackType).toString();
auto serviceType = apiConfigObject.value(apiDefs::key::serviceType).toString();
if (serviceType == servicePremium) {
if (serviceType == servicePremium || stackType == stackPremium) {
return apiDefs::ConfigType::AmneziaPremiumV2;
} else if (serviceType == serviceFree) {
} else if (serviceType == serviceFree || stackType == stackFree) {
return apiDefs::ConfigType::AmneziaFreeV3;
} else if (serviceType == serviceExternalPremium) {
return apiDefs::ConfigType::ExternalPremium;
}
}
default: {
@@ -68,7 +66,6 @@ amnezia::ErrorCode apiUtils::checkNetworkReplyErrors(const QList<QSslError> &ssl
return amnezia::ErrorCode::NoError;
} else if (reply->error() == QNetworkReply::NetworkError::OperationCanceledError
|| reply->error() == QNetworkReply::NetworkError::TimeoutError) {
qDebug() << reply->error();
return amnezia::ErrorCode::ApiConfigTimeoutError;
} else {
QString err = reply->errorString();
@@ -88,10 +85,3 @@ amnezia::ErrorCode apiUtils::checkNetworkReplyErrors(const QList<QSslError> &ssl
qDebug() << "something went wrong";
return amnezia::ErrorCode::InternalError;
}
bool apiUtils::isPremiumServer(const QJsonObject &serverConfigObject)
{
static const QSet<apiDefs::ConfigType> premiumTypes = { apiDefs::ConfigType::AmneziaPremiumV1, apiDefs::ConfigType::AmneziaPremiumV2,
apiDefs::ConfigType::ExternalPremium };
return premiumTypes.contains(getConfigType(serverConfigObject));
}

View File

@@ -13,8 +13,6 @@ namespace apiUtils
bool isSubscriptionExpired(const QString &subscriptionEndDate);
bool isPremiumServer(const QJsonObject &serverConfigObject);
apiDefs::ConfigType getConfigType(const QJsonObject &serverConfigObject);
apiDefs::ConfigSource getConfigSource(const QJsonObject &serverConfigObject);

View File

@@ -251,9 +251,6 @@ QStringList GatewayController::getProxyUrls()
}
return endpoints;
} else {
apiUtils::checkNetworkReplyErrors(sslErrors, reply);
qDebug() << "go to the next storage endpoint";
reply->deleteLater();
}
}
@@ -264,29 +261,26 @@ bool GatewayController::shouldBypassProxy(QNetworkReply *reply, const QByteArray
const QByteArray &iv, const QByteArray &salt)
{
if (reply->error() == QNetworkReply::NetworkError::OperationCanceledError || reply->error() == QNetworkReply::NetworkError::TimeoutError) {
qDebug() << "timeout occurred";
qDebug() << reply->error();
qDebug() << "Timeout occurred";
return true;
} else if (responseBody.contains("html")) {
qDebug() << "the response contains an html tag";
qDebug() << "The response contains an html tag";
return true;
} else if (reply->error() == QNetworkReply::NetworkError::ContentNotFoundError) {
if (responseBody.contains(errorResponsePattern1) || responseBody.contains(errorResponsePattern2)
|| responseBody.contains(errorResponsePattern3)) {
return false;
} else {
qDebug() << reply->error();
return true;
}
} else if (reply->error() != QNetworkReply::NetworkError::NoError) {
qDebug() << reply->error();
return true;
} else if (checkEncryption) {
try {
QSimpleCrypto::QBlockCipher blockCipher;
static_cast<void>(blockCipher.decryptAesBlockCipher(responseBody, key, iv, "", salt));
} catch (...) {
qDebug() << "failed to decrypt the data";
qDebug() << "Failed to decrypt the data";
return true;
}
}
@@ -307,7 +301,7 @@ void GatewayController::bypassProxy(const QString &endpoint, QNetworkReply *repl
QByteArray responseBody;
for (const QString &proxyUrl : proxyUrls) {
qDebug() << "go to the next proxy endpoint";
qDebug() << "Go to the next endpoint";
reply->deleteLater(); // delete the previous reply
reply = requestFunction(endpoint.arg(proxyUrl));

View File

@@ -409,11 +409,7 @@ ErrorCode ServerController::installDockerWorker(const ServerCredentials &credent
qDebug().noquote() << "ServerController::installDockerWorker" << stdOut;
if (stdOut.contains("lock"))
return ErrorCode::ServerPacketManagerError;
if (stdOut.contains("Podman is not supported"))
return ErrorCode::ServerPodmanIsNotSupported;
if (stdOut.contains("Status Docker is not active"))
return ErrorCode::ServerDockerStatusIsNotActive;
if (stdOut.contains("sudo:") && stdOut.contains("not found"))
if (stdOut.contains("command not found"))
return ErrorCode::ServerDockerFailedError;
return error;
@@ -443,22 +439,15 @@ ErrorCode ServerController::buildContainerWorker(const ServerCredentials &creden
stdOut += data + "\n";
return ErrorCode::NoError;
};
auto cbReadStdErr = [&](const QString &data, libssh::Client &) {
stdOut += data + "\n";
return ErrorCode::NoError;
};
ErrorCode error =
errorCode =
runScript(credentials,
replaceVars(amnezia::scriptData(SharedScriptType::build_container), genVarsForScript(credentials, container, config)),
cbReadStdOut, cbReadStdErr);
if (stdOut.contains("doesn't work on cgroups v2"))
return ErrorCode::ServerDockerOnCgroupsV2;
if (stdOut.contains("cgroup mountpoint does not exist"))
return ErrorCode::ServerCgroupMountpoint;
cbReadStdOut);
if (errorCode)
return errorCode;
return error;
return errorCode;
}
ErrorCode ServerController::runContainerWorker(const ServerCredentials &credentials, DockerContainer container, QJsonObject &config)
@@ -854,3 +843,24 @@ ErrorCode ServerController::getDecryptedPrivateKey(const ServerCredentials &cred
auto error = m_sshClient.getDecryptedPrivateKey(credentials, decryptedPrivateKey, callback);
return error;
}
bool ServerController::isNewAwgContainer(const ServerCredentials &credentials)
{
QString stdOut;
auto cbReadStdOut = [&](const QString &data, libssh::Client &) {
stdOut += data + "\n";
return ErrorCode::NoError;
};
auto cbReadStdErr = [&](const QString &data, libssh::Client &) {
stdOut += data + "\n";
return ErrorCode::NoError;
};
QString script = QString("sudo docker exec -i $CONTAINER_NAME bash -c 'type awg'");
runScript(credentials, replaceVars(script, genVarsForScript(credentials, DockerContainer::Awg)), cbReadStdOut, cbReadStdErr);
return stdOut.contains("/usr/bin/awg");
}

View File

@@ -57,6 +57,8 @@ public:
ErrorCode getDecryptedPrivateKey(const ServerCredentials &credentials, QString &decryptedPrivateKey,
const std::function<QString()> &callback);
bool isNewAwgContainer(const ServerCredentials &credentials);
private:
ErrorCode installDockerWorker(const ServerCredentials &credentials, DockerContainer container);
ErrorCode prepareHostWorker(const ServerCredentials &credentials, DockerContainer container, const QJsonObject &config = QJsonObject());

View File

@@ -58,10 +58,6 @@ namespace amnezia
ServerUserDirectoryNotAccessible = 208,
ServerUserNotAllowedInSudoers = 209,
ServerUserPasswordRequired = 210,
ServerDockerOnCgroupsV2 = 211,
ServerCgroupMountpoint = 212,
ServerPodmanIsNotSupported = 213,
ServerDockerStatusIsNotActive = 214,
// Ssh connection errors
SshRequestDeniedError = 300,

View File

@@ -26,10 +26,6 @@ QString errorString(ErrorCode code) {
case(ErrorCode::ServerUserDirectoryNotAccessible): errorMessage = QObject::tr("The server user's home directory is not accessible"); break;
case(ErrorCode::ServerUserNotAllowedInSudoers): errorMessage = QObject::tr("Action not allowed in sudoers"); break;
case(ErrorCode::ServerUserPasswordRequired): errorMessage = QObject::tr("The user's password is required"); break;
case(ErrorCode::ServerDockerOnCgroupsV2): errorMessage = QObject::tr("Docker error: runc doesn't work on cgroups v2"); break;
case(ErrorCode::ServerCgroupMountpoint): errorMessage = QObject::tr("Server error: cgroup mountpoint does not exist"); break;
case(ErrorCode::ServerPodmanIsNotSupported): errorMessage = QObject::tr("Server error: podman-docker is not supported"); break;
case(ErrorCode::ServerDockerStatusIsNotActive): errorMessage = QObject::tr("Server error: Docker status is not active"); break;
// Libssh errors
case(ErrorCode::SshRequestDeniedError): errorMessage = QObject::tr("SSH request was denied"); break;

View File

@@ -6,7 +6,6 @@
#define INTERFACECONFIG_H
#include <QList>
#include <QMap>
#include <QString>
#include "ipaddress.h"

View File

@@ -186,6 +186,9 @@ namespace amnezia
constexpr char serverPublicKeyPath[] = "/opt/amnezia/wireguard/wireguard_server_public_key.key";
constexpr char serverPskKeyPath[] = "/opt/amnezia/wireguard/wireguard_psk.key";
constexpr char interfaceName[] = "wg0";
constexpr char wgBinaryName[] = "wg";
constexpr char wgQuickBinaryName[] = "wg-quick";
}
namespace sftp
@@ -203,7 +206,7 @@ namespace amnezia
constexpr char defaultMtu[] = "1376";
#endif
constexpr char serverConfigPath[] = "/opt/amnezia/awg/wg0.conf";
constexpr char serverConfigPath[] = "/opt/amnezia/awg/awg0.conf";
constexpr char serverPublicKeyPath[] = "/opt/amnezia/awg/wireguard_server_public_key.key";
constexpr char serverPskKeyPath[] = "/opt/amnezia/awg/wireguard_psk.key";
@@ -216,6 +219,10 @@ namespace amnezia
constexpr char defaultResponsePacketMagicHeader[] = "3288052141";
constexpr char defaultTransportPacketMagicHeader[] = "2528465083";
constexpr char defaultUnderloadPacketMagicHeader[] = "1766607858";
constexpr char interfaceName[] = "awg0";
constexpr char wgBinaryName[] = "awg";
constexpr char wgQuickBinaryName[] = "awg-quick";
}
namespace socks5Proxy

View File

@@ -1,4 +1,4 @@
FROM amneziavpn/amnezia-wg:latest
FROM amneziavpn/amneziawg-go:latest
LABEL maintainer="AmneziaVPN"

View File

@@ -1,15 +1,15 @@
mkdir -p /opt/amnezia/awg
cd /opt/amnezia/awg
WIREGUARD_SERVER_PRIVATE_KEY=$(wg genkey)
WIREGUARD_SERVER_PRIVATE_KEY=$(awg genkey)
echo $WIREGUARD_SERVER_PRIVATE_KEY > /opt/amnezia/awg/wireguard_server_private_key.key
WIREGUARD_SERVER_PUBLIC_KEY=$(echo $WIREGUARD_SERVER_PRIVATE_KEY | wg pubkey)
WIREGUARD_SERVER_PUBLIC_KEY=$(echo $WIREGUARD_SERVER_PRIVATE_KEY | awg pubkey)
echo $WIREGUARD_SERVER_PUBLIC_KEY > /opt/amnezia/awg/wireguard_server_public_key.key
WIREGUARD_PSK=$(wg genpsk)
WIREGUARD_PSK=$(awg genpsk)
echo $WIREGUARD_PSK > /opt/amnezia/awg/wireguard_psk.key
cat > /opt/amnezia/awg/wg0.conf <<EOF
cat > /opt/amnezia/awg/awg0.conf <<EOF
[Interface]
PrivateKey = $WIREGUARD_SERVER_PRIVATE_KEY
Address = $AWG_SUBNET_IP/$WIREGUARD_SUBNET_CIDR

View File

@@ -6,19 +6,19 @@ echo "Container startup"
#ifconfig eth0:0 $SERVER_IP_ADDRESS netmask 255.255.255.255 up
# kill daemons in case of restart
wg-quick down /opt/amnezia/awg/wg0.conf
awg-quick down /opt/amnezia/awg/awg0.conf
# start daemons if configured
if [ -f /opt/amnezia/awg/wg0.conf ]; then (wg-quick up /opt/amnezia/awg/wg0.conf); fi
if [ -f /opt/amnezia/awg/awg0.conf ]; then (awg-quick up /opt/amnezia/awg/awg0.conf); fi
# Allow traffic on the TUN interface.
iptables -A INPUT -i wg0 -j ACCEPT
iptables -A FORWARD -i wg0 -j ACCEPT
iptables -A OUTPUT -o wg0 -j ACCEPT
iptables -A INPUT -i awg0 -j ACCEPT
iptables -A FORWARD -i awg0 -j ACCEPT
iptables -A OUTPUT -o awg0 -j ACCEPT
# Allow forwarding traffic only from the VPN.
iptables -A FORWARD -i wg0 -o eth0 -s $AWG_SUBNET_IP/$WIREGUARD_SUBNET_CIDR -j ACCEPT
iptables -A FORWARD -i wg0 -o eth1 -s $AWG_SUBNET_IP/$WIREGUARD_SUBNET_CIDR -j ACCEPT
iptables -A FORWARD -i awg0 -o eth0 -s $AWG_SUBNET_IP/$WIREGUARD_SUBNET_CIDR -j ACCEPT
iptables -A FORWARD -i awg0 -o eth1 -s $AWG_SUBNET_IP/$WIREGUARD_SUBNET_CIDR -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

View File

@@ -1,36 +1,23 @@
if which apt-get > /dev/null 2>&1; then pm=$(which apt-get); silent_inst="-yq install"; check_pkgs="-yq update"; what_pkg="-s install"; docker_pkg="docker.io"; dist="debian";\
elif which dnf > /dev/null 2>&1; then pm=$(which dnf); silent_inst="-yq install"; check_pkgs="-yq check-update"; what_pkg="--assumeno install --setopt=tsflags=test"; docker_pkg="docker"; dist="fedora";\
elif which yum > /dev/null 2>&1; then pm=$(which yum); silent_inst="-y -q install"; check_pkgs="-y -q check-update"; what_pkg="--assumeno install --setopt=tsflags=test"; docker_pkg="docker"; dist="centos";\
elif which pacman > /dev/null 2>&1; then pm=$(which pacman); silent_inst="-S --noconfirm --noprogressbar --quiet"; check_pkgs="-Sup"; what_pkg="-Sp"; docker_pkg="docker"; dist="archlinux";\
if which apt-get > /dev/null 2>&1; then pm=$(which apt-get); silent_inst="-yq install"; check_pkgs="-yq update"; docker_pkg="docker.io"; dist="debian";\
elif which dnf > /dev/null 2>&1; then pm=$(which dnf); silent_inst="-yq install"; check_pkgs="-yq check-update"; docker_pkg="docker"; dist="fedora";\
elif which yum > /dev/null 2>&1; then pm=$(which yum); silent_inst="-y -q install"; check_pkgs="-y -q check-update"; docker_pkg="docker"; dist="centos";\
elif which pacman > /dev/null 2>&1; then pm=$(which pacman); silent_inst="-S --noconfirm --noprogressbar --quiet"; check_pkgs="-Sup"; docker_pkg="docker"; dist="archlinux";\
else echo "Packet manager not found"; exit 1; fi;\
echo "Dist: $dist, Packet manager: $pm, Install command: $silent_inst, Check pkgs command: $check_pkgs, What pkg command: $what_pkg, Docker pkg: $docker_pkg";\
echo $LANG | grep -qE '^(en_US.UTF-8|C.UTF-8|C)$' || export LC_ALL=C;\
echo "Dist: $dist, Packet manager: $pm, Install command: $silent_inst, Check pkgs command: $check_pkgs, Docker pkg: $docker_pkg";\
if [ "$dist" = "debian" ]; then export DEBIAN_FRONTEND=noninteractive; fi;\
if ! command -v sudo > /dev/null 2>&1; then $pm $check_pkgs; $pm $silent_inst sudo; fi;\
if ! command -v fuser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst psmisc; fi;\
if ! command -v lsof > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst lsof; fi;\
if ! command -v docker > /dev/null 2>&1; then \
sudo $pm $check_pkgs;\
if [ -z "$(sudo $pm $what_pkg $docker_pkg 2>/dev/null | grep podman)" ]; then \
sudo $pm $silent_inst $docker_pkg;\
else echo "Podman is not supported"; exit 1;\
fi;\
sudo $pm $check_pkgs; sudo $pm $silent_inst $docker_pkg;\
sleep 5; sudo systemctl enable --now docker; sleep 5;\
fi;\
if [ "$(cat /sys/module/apparmor/parameters/enabled 2>/dev/null)" = "Y" ] && ! command -v apparmor_parser > /dev/null 2>&1; then \
sudo $pm $check_pkgs; sudo $pm $silent_inst apparmor;\
if [ "$(cat /sys/module/apparmor/parameters/enabled 2>/dev/null)" = "Y" ]; then \
if ! command -v apparmor_parser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst apparmor; fi;\
fi;\
if [ "$(systemctl is-active docker)" != "active" ]; then \
if [ -z "$(sudo docker --version 2>/dev/null | grep podman)" ]; then \
sudo $pm $check_pkgs;\
if [ -z "$(sudo $pm $what_pkg $docker_pkg 2>/dev/null | grep podman)" ]; then \
sudo $pm $silent_inst $docker_pkg;\
fi;\
sleep 5; sudo systemctl start docker; sleep 5;\
if [ "$(systemctl is-active docker)" != "active" ]; then \
echo "Status Docker is not active";\
fi;\
else echo "Podman is not supported";\
fi;\
sudo $pm $check_pkgs; sudo $pm $silent_inst $docker_pkg;\
sleep 5; sudo systemctl start docker; sleep 5;\
fi;\
sudo docker --version
if ! command -v sudo > /dev/null 2>&1; then echo "Failed to install sudo, command not found"; exit 1; fi;\
docker --version

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,14 +3,10 @@
<TS version="2.1" language="ru_RU">
<context>
<name>AdLabel</name>
<message>
<source>Amnezia Premium - for access to any website</source>
<translation type="vanished">Amnezia Premium - для доступа к любым сайтам</translation>
</message>
<message>
<location filename="../ui/qml/Components/AdLabel.qml" line="57"/>
<source>Amnezia Premium - for access to all websites and online resources</source>
<translation>Amnezia Premium - доступ ко всем сайтам и онлайн ресурсам</translation>
<source>Amnezia Premium - for access to any website</source>
<translation>Amnezia Premium - для доступа к любым сайтам</translation>
</message>
</context>
<context>
@@ -60,12 +56,12 @@
<translation>%1 успешно установлен.</translation>
</message>
<message>
<location filename="../ui/controllers/api/apiConfigsController.cpp" line="257"/>
<location filename="../ui/controllers/api/apiConfigsController.cpp" line="258"/>
<source>API config reloaded</source>
<translation>Конфигурация API перезагружена</translation>
</message>
<message>
<location filename="../ui/controllers/api/apiConfigsController.cpp" line="261"/>
<location filename="../ui/controllers/api/apiConfigsController.cpp" line="262"/>
<source>Successfully changed the country of connection to %1</source>
<translation>Страна подключения изменена на %1</translation>
</message>
@@ -94,8 +90,9 @@
<translation type="vanished">Amnezia Free - это бесплатный VPN для обхода блокировок в странах с высоким уровнем интернет-цензуры</translation>
</message>
<message>
<location filename="../ui/models/api/apiServicesModel.cpp" line="68"/>
<source>Amnezia Premium is VPN for comfortable work, downloading large files and watching videos in 8K resolution. Works for any sites with no restrictions. Speed up to %1 MBit/s. Unlimited traffic.</source>
<translation type="vanished">Amnezia Premium VPN для комфортной работы, скачивания больших файлов и просмотра видео в высоком разрешении. Скорость до %1 Мбит/с. Безлимитный трафик.</translation>
<translation>Amnezia Premium VPN для комфортной работы, скачивания больших файлов и просмотра видео в высоком разрешении. Скорость до %1 Мбит/с. Безлимитный трафик.</translation>
</message>
<message>
<location filename="../ui/models/api/apiServicesModel.cpp" line="72"/>
@@ -103,19 +100,10 @@
<source>AmneziaFree provides free unlimited access to a basic set of web sites, such as Facebook, Instagram, Twitter (X), Discord, Telegram, and others. YouTube is not included in the free plan.</source>
<translation>AmneziaFree предоставляет бесплатный неограниченный доступ к базовому набору сайтов и приложений, таким как Facebook, Instagram, Twitter (X), Discord, Telegram и другим. YouTube не включен в бесплатный тариф.</translation>
</message>
<message>
<source>Amnezia Premium is VPN for comfortable work, downloading large files and watching videos in 8K resolution. Works for any sites with no restrictions.</source>
<translation type="vanished">Amnezia Premium VPN для комфортной работы, скачивания больших файлов и просмотра видео в высоком разрешении. Работает для любых сайтов без ограничений.</translation>
</message>
<message>
<location filename="../ui/models/api/apiServicesModel.cpp" line="68"/>
<source>Amnezia Premium is classic VPN for seamless work, downloading large files, and watching videos. Access all websites and online resources. Speeds up to %1 Mbps.</source>
<translation>Amnezia Premium - это классический VPN для комфортной работы, загрузки больших файлов и просмотра видео. Доступ ко всем сайтам и онлайн ресурсам. Скорость - до %1 Мбит/с.</translation>
</message>
<message>
<location filename="../ui/models/api/apiServicesModel.cpp" line="82"/>
<source>Amnezia Premium is classic VPN for for seamless work, downloading large files, and watching videos. Access all websites and online resources.</source>
<translation>Amnezia Premium - это классический VPN для комфортной работы, загрузки больших файлов и просмотра видео. Доступ ко всем сайтам и онлайн ресурсам.</translation>
<source>Amnezia Premium is VPN for comfortable work, downloading large files and watching videos in 8K resolution. Works for any sites with no restrictions.</source>
<translation>Amnezia Premium VPN для комфортной работы, скачивания больших файлов и просмотра видео в высоком разрешении. Работает для любых сайтов без ограничений.</translation>
</message>
<message>
<location filename="../ui/models/api/apiServicesModel.cpp" line="97"/>
@@ -352,23 +340,14 @@ Can&apos;t be disabled for current server</source>
<translation type="vanished">Неверный файл конфигурации</translation>
</message>
<message>
<location filename="../ui/controllers/importController.cpp" line="650"/>
<location filename="../ui/controllers/importController.cpp" line="651"/>
<source>Scanned %1 of %2.</source>
<translation>Отсканировано %1 из %2.</translation>
</message>
<message>
<location filename="../ui/controllers/importController.cpp" line="685"/>
<source>This configuration contains an OpenVPN setup. OpenVPN configurations can include malicious scripts, so only add it if you fully trust the provider of this config. </source>
<translation>Эта конфигурация содержит настройки OpenVPN. Конфигурации OpenVPN могут содержать вредоносные скрипты, поэтому добавляйте их только в том случае, если полностью доверяете источнику этого файла. </translation>
</message>
<message>
<location filename="../ui/controllers/importController.cpp" line="689"/>
<source>&lt;br&gt;In the imported configuration, potentially dangerous lines were found:</source>
<translation>&lt;br&gt;В импортированной конфигурации обнаружены потенциально опасные строки:</translation>
</message>
<message>
<location filename="../ui/controllers/importController.cpp" line="686"/>
<source>In the imported configuration, potentially dangerous lines were found:</source>
<translation type="vanished">В импортированной конфигурации были обнаружены потенциально опасные строки:</translation>
<translation>В импортированной конфигурации были обнаружены потенциально опасные строки:</translation>
</message>
</context>
<context>
@@ -538,12 +517,12 @@ Already installed containers were found on the server. All installed containers
<message>
<location filename="../ui/qml/Pages2/PageDevMenu.qml" line="68"/>
<source>Gateway endpoint</source>
<translation>Gateway endpoint</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageDevMenu.qml" line="97"/>
<source>Dev gateway environment</source>
<translation>Dev gateway environment</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -673,47 +652,47 @@ Already installed containers were found on the server. All installed containers
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="146"/>
<source>Jc - Junk packet count</source>
<translation>Jc - Junk packet count</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="168"/>
<source>Jmin - Junk packet minimum size</source>
<translation>Jmin - Junk packet minimum size</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="186"/>
<source>Jmax - Junk packet maximum size</source>
<translation>Jmax - Junk packet maximum size</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="204"/>
<source>S1 - Init packet junk size</source>
<translation>S1 - Init packet junk size</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="228"/>
<source>S2 - Response packet junk size</source>
<translation>S2 - Response packet junk size</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="252"/>
<source>H1 - Init packet magic header</source>
<translation>H1 - Init packet magic header</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="270"/>
<source>H2 - Response packet magic header</source>
<translation>H2 - Response packet magic header</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="288"/>
<source>H4 - Transport packet magic header</source>
<translation>H4 - Transport packet magic header</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="306"/>
<source>H3 - Underload packet magic header</source>
<translation>H3 - Underload packet magic header</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageProtocolAwgSettings.qml" line="354"/>
@@ -1482,7 +1461,7 @@ Already installed containers were found on the server. All installed containers
<message>
<location filename="../ui/qml/Pages2/PageSettings.qml" line="123"/>
<source>Dev console</source>
<translation>Dev console</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettings.qml" line="142"/>
@@ -1609,13 +1588,9 @@ Already installed containers were found on the server. All installed containers
</context>
<context>
<name>PageSettingsApiDevices</name>
<message>
<source>Active devices</source>
<translation type="vanished">Активные устройства</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiDevices.qml" line="45"/>
<source>Active Devices</source>
<source>Active devices</source>
<translation>Активные устройства</translation>
</message>
<message>
@@ -1766,14 +1741,10 @@ Already installed containers were found on the server. All installed containers
<source>Save AmneziaVPN config</source>
<translation>Сохранить конфигурацию AmneziaVPN</translation>
</message>
<message>
<source>Configuration files</source>
<translation type="vanished">Файл конфигурации</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiNativeConfigs.qml" line="48"/>
<source>Configuration Files</source>
<translation>Файлы конфигурации</translation>
<source>Configuration files</source>
<translation>Файл конфигурации</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiNativeConfigs.qml" line="49"/>
@@ -1861,8 +1832,9 @@ Already installed containers were found on the server. All installed containers
<translation type="vanished">Период работы</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="37"/>
<source>Valid until</source>
<translation type="vanished">Действует до</translation>
<translation>Действует до</translation>
</message>
<message>
<source>Speed</source>
@@ -1873,12 +1845,14 @@ Already installed containers were found on the server. All installed containers
<translation type="vanished">Скопировано</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="29"/>
<source>Subscription status</source>
<translation type="vanished">Статус подписки</translation>
<translation>Статус подписки</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="45"/>
<source>Active connections</source>
<translation type="vanished">Активные соединения</translation>
<translation>Активные соединения</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="171"/>
@@ -1886,8 +1860,9 @@ Already installed containers were found on the server. All installed containers
<translation>Сетевые адреса одного или нескольких серверов были обновлены. Пожалуйста, удалите старые конфигурацию и загрузите новые файлы</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="186"/>
<source>Subscription key</source>
<translation type="vanished">Ключ для подключения</translation>
<translation>Ключ для подключения</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="190"/>
@@ -1895,8 +1870,9 @@ Already installed containers were found on the server. All installed containers
<translation>Ключ подписки Amnezia Premium</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="194"/>
<source>Save VPN key to file</source>
<translation type="vanished">Сохранить VPN-ключ в файле</translation>
<translation>Сохранить VPN-ключ в файле</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="195"/>
@@ -1904,51 +1880,18 @@ Already installed containers were found on the server. All installed containers
<translation>Скопировать VPN ключ</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="216"/>
<source>Configuration files</source>
<translation type="vanished">Файл конфигурации</translation>
<translation>Файл конфигурации</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="218"/>
<source>Manage configuration files</source>
<translation>Управление файлами конфигурации</translation>
</message>
<message>
<source>Active devices</source>
<translation type="vanished">Активные устройства</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="29"/>
<source>Subscription Status</source>
<translation>Статус подписки</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="37"/>
<source>Valid Until</source>
<translation>Действительна до</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="45"/>
<source>Active Connections</source>
<translation>Активные соединения</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="186"/>
<source>Subscription Key</source>
<translation>Ключ для подключения</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="194"/>
<source>Save VPN key as a file</source>
<translation>Сохранить VPN-ключ в файл</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="216"/>
<source>Configuration Files</source>
<translation>Файлы конфигурации</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiServerInfo.qml" line="236"/>
<source>Active Devices</source>
<source>Active devices</source>
<translation>Активные устройства</translation>
</message>
<message>
@@ -2038,13 +1981,9 @@ Already installed containers were found on the server. All installed containers
<source>Telegram</source>
<translation></translation>
</message>
<message>
<source>Email Support</source>
<translation type="vanished">Email</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsApiSupport.qml" line="30"/>
<source>Email</source>
<source>Email Support</source>
<translation>Email</translation>
</message>
<message>
@@ -2393,12 +2332,8 @@ Already installed containers were found on the server. All installed containers
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="143"/>
<source>Cannot change KillSwitch settings during active connection</source>
<translation>Невозможно изменить настройки KillSwitch во время активного подключения</translation>
</message>
<message>
<source>Cannot change killSwitch settings during active connection</source>
<translation type="vanished">Невозможно изменить настройки аварийного выключателя во время активного соединения</translation>
<translation>Невозможно изменить настройки аварийного выключателя во время активного соединения</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="86"/>
@@ -2561,12 +2496,12 @@ Already installed containers were found on the server. All installed containers
<message>
<location filename="../ui/qml/Pages2/PageSettingsLogging.qml" line="175"/>
<source>Client logs</source>
<translation>Логи приложения</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsLogging.qml" line="176"/>
<source>AmneziaVPN logs</source>
<translation>AmneziaVPN logs</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsLogging.qml" line="142"/>
@@ -2581,12 +2516,12 @@ Already installed containers were found on the server. All installed containers
<message>
<location filename="../ui/qml/Pages2/PageSettingsLogging.qml" line="204"/>
<source>Service logs</source>
<translation>Логи службы</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsLogging.qml" line="205"/>
<source>AmneziaVPN-service logs</source>
<translation>AmneziaVPN-service logs</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsLogging.qml" line="78"/>
@@ -3071,7 +3006,7 @@ It&apos;s okay as long as it&apos;s from someone you trust.</source>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardConfigSource.qml" line="109"/>
<source>Support tag</source>
<translation>Support tag</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardConfigSource.qml" line="120"/>
@@ -3659,7 +3594,7 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="726"/>
<source>Allowed IPs: %1</source>
<translation>Разрешенные подсети: %1</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Creation date: </source>
@@ -4111,58 +4046,38 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<source>Server error: Package manager error</source>
<translation>Ошибка сервера: Ошибка менеджера пакетов</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="25"/>
<source>The sudo package is not pre-installed on the server</source>
<translation>Пакет sudo не установлен на сервере по умолчанию</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="26"/>
<source>The server user&apos;s home directory is not accessible</source>
<translation>Домашний каталог пользователя сервера недоступен</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="27"/>
<source>Action not allowed in sudoers</source>
<translation>Действие не разрешено в sudoers</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="28"/>
<source>The user&apos;s password is required</source>
<translation>Требуется пароль пользователя</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="31"/>
<source>SSH request was denied</source>
<translation>SSH-запрос был отклонён</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="32"/>
<location filename="../core/errorstrings.cpp" line="28"/>
<source>SSH request was interrupted</source>
<translation>SSH-запрос был прерван</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="33"/>
<location filename="../core/errorstrings.cpp" line="29"/>
<source>SSH internal error</source>
<translation>Внутренняя ошибка SSH</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="34"/>
<location filename="../core/errorstrings.cpp" line="30"/>
<source>Invalid private key or invalid passphrase entered</source>
<translation>Введен неверный закрытый ключ или неверная парольная фраза</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="35"/>
<location filename="../core/errorstrings.cpp" line="31"/>
<source>The selected private key format is not supported, use openssh ED25519 key types or PEM key types</source>
<translation>Выбранный формат закрытого ключа не поддерживается, используйте типы ключей openssh ED25519 или PEM</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="36"/>
<location filename="../core/errorstrings.cpp" line="32"/>
<source>Timeout connecting to server</source>
<translation>Тайм-аут подключения к серверу</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="39"/>
<location filename="../core/errorstrings.cpp" line="35"/>
<source>SCP error: Generic failure</source>
<translation>Ошибка SCP: общий сбой</translation>
</message>
@@ -4219,23 +4134,23 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="vanished">Sftp error: No media was in remote drive</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="57"/>
<location filename="../core/errorstrings.cpp" line="53"/>
<source>The config does not contain any containers and credentials for connecting to the server</source>
<translation>Конфигурация не содержит каких-либо контейнеров и учетных данных для подключения к серверу</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="65"/>
<location filename="../core/errorstrings.cpp" line="74"/>
<location filename="../core/errorstrings.cpp" line="61"/>
<location filename="../core/errorstrings.cpp" line="70"/>
<source>Error when retrieving configuration from API</source>
<translation>Ошибка при получении конфигурации из API</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="66"/>
<location filename="../core/errorstrings.cpp" line="62"/>
<source>This config has already been added to the application</source>
<translation>Данная конфигурация уже была добавлена в приложение</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="89"/>
<location filename="../core/errorstrings.cpp" line="85"/>
<source>ErrorCode: %1. </source>
<translation>Код ошибки: %1. </translation>
</message>
@@ -4244,139 +4159,139 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="vanished">Failed to save config to disk</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="42"/>
<location filename="../core/errorstrings.cpp" line="38"/>
<source>OpenVPN config missing</source>
<translation>Отсутствует конфигурация OpenVPN</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="43"/>
<location filename="../core/errorstrings.cpp" line="39"/>
<source>OpenVPN management server error</source>
<translation>Серверная ошибка управлением OpenVPN</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="46"/>
<location filename="../core/errorstrings.cpp" line="42"/>
<source>OpenVPN executable missing</source>
<translation>Отсутствует исполняемый файл OpenVPN</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="47"/>
<location filename="../core/errorstrings.cpp" line="43"/>
<source>Shadowsocks (ss-local) executable missing</source>
<translation>Отсутствует исполняемый файл Shadowsocks (ss-local)</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="48"/>
<location filename="../core/errorstrings.cpp" line="44"/>
<source>Cloak (ck-client) executable missing</source>
<translation>Отсутствует исполняемый файл Cloak (ck-client)</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="49"/>
<location filename="../core/errorstrings.cpp" line="45"/>
<source>Amnezia helper service error</source>
<translation>Ошибка вспомогательной службы Amnezia</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="50"/>
<location filename="../core/errorstrings.cpp" line="46"/>
<source>OpenSSL failed</source>
<translation>Ошибка OpenSSL</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="53"/>
<location filename="../core/errorstrings.cpp" line="49"/>
<source>Can&apos;t connect: another VPN connection is active</source>
<translation>Невозможно подключиться: активно другое VPN-соединение</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="54"/>
<location filename="../core/errorstrings.cpp" line="50"/>
<source>Can&apos;t setup OpenVPN TAP network adapter</source>
<translation>Невозможно настроить сетевой адаптер OpenVPN TAP</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="55"/>
<location filename="../core/errorstrings.cpp" line="51"/>
<source>VPN pool error: no available addresses</source>
<translation>Ошибка пула VPN: нет доступных адресов</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="58"/>
<location filename="../core/errorstrings.cpp" line="54"/>
<source>Unable to open config file</source>
<translation>Не удалось открыть файл конфигурации</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="59"/>
<location filename="../core/errorstrings.cpp" line="55"/>
<source>VPN Protocols is not installed.
Please install VPN container at first</source>
<translation>VPN-протоколы не установлены.
Пожалуйста, установите протокол</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="62"/>
<location filename="../core/errorstrings.cpp" line="58"/>
<source>VPN connection error</source>
<translation>Ошибка VPN-соединения</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="67"/>
<location filename="../core/errorstrings.cpp" line="63"/>
<source>In the response from the server, an empty config was received</source>
<translation>В ответе от сервера была получена пустая конфигурация</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="68"/>
<location filename="../core/errorstrings.cpp" line="64"/>
<source>SSL error occurred</source>
<translation>Произошла ошибка SSL</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="69"/>
<location filename="../core/errorstrings.cpp" line="65"/>
<source>Server response timeout on api request</source>
<translation>Тайм-аут ответа сервера на запрос API</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="70"/>
<location filename="../core/errorstrings.cpp" line="66"/>
<source>Missing AGW public key</source>
<translation>Отсутствует публичный ключ AGW</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="71"/>
<location filename="../core/errorstrings.cpp" line="67"/>
<source>Failed to decrypt response payload</source>
<translation></translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="72"/>
<location filename="../core/errorstrings.cpp" line="68"/>
<source>Missing list of available services</source>
<translation>Отсутствует список доступных сервисов</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="73"/>
<location filename="../core/errorstrings.cpp" line="69"/>
<source>The limit of allowed configurations per subscription has been exceeded</source>
<translation>Превышен лимит разрешенных конфигураций для одной подписки</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="77"/>
<location filename="../core/errorstrings.cpp" line="73"/>
<source>QFile error: The file could not be opened</source>
<translation>Ошибка QFile: не удалось открыть файл</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="78"/>
<location filename="../core/errorstrings.cpp" line="74"/>
<source>QFile error: An error occurred when reading from the file</source>
<translation>Ошибка QFile: произошла ошибка при чтении из файла</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="79"/>
<location filename="../core/errorstrings.cpp" line="75"/>
<source>QFile error: The file could not be accessed</source>
<translation>Ошибка QFile: не удалось получить доступ к файлу</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="80"/>
<location filename="../core/errorstrings.cpp" line="76"/>
<source>QFile error: An unspecified error occurred</source>
<translation>Ошибка QFile: произошла неизвестная ошибка</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="81"/>
<location filename="../core/errorstrings.cpp" line="77"/>
<source>QFile error: A fatal error occurred</source>
<translation>Ошибка QFile: произошла фатальная ошибка</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="82"/>
<location filename="../core/errorstrings.cpp" line="78"/>
<source>QFile error: The operation was aborted</source>
<translation>Ошибка QFile: операция была прервана</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="86"/>
<location filename="../core/errorstrings.cpp" line="82"/>
<source>Internal error</source>
<translation>Внутренняя ошибка</translation>
</message>
@@ -5138,37 +5053,37 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<translation>Имя хоста не похоже на IP-адрес или доменное имя</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="66"/>
<location filename="../ui/controllers/sitesController.cpp" line="67"/>
<source>New site added: %1</source>
<translation>Добавлен новый сайт: %1</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="78"/>
<location filename="../ui/controllers/sitesController.cpp" line="80"/>
<source>Site removed: %1</source>
<translation>Сайт удален: %1</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="85"/>
<location filename="../ui/controllers/sitesController.cpp" line="87"/>
<source>Can&apos;t open file: %1</source>
<translation>Невозможно открыть файл: %1</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="91"/>
<location filename="../ui/controllers/sitesController.cpp" line="93"/>
<source>Failed to parse JSON data from file: %1</source>
<translation>Не удалось разобрать JSON-данные из файла: %1</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="96"/>
<location filename="../ui/controllers/sitesController.cpp" line="98"/>
<source>The JSON data is not an array in file: %1</source>
<translation>JSON-данные не являются массивом в файле: %1</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="126"/>
<location filename="../ui/controllers/sitesController.cpp" line="129"/>
<source>Import completed</source>
<translation>Импорт завершен</translation>
</message>
<message>
<location filename="../ui/controllers/sitesController.cpp" line="145"/>
<location filename="../ui/controllers/sitesController.cpp" line="148"/>
<source>Export completed</source>
<translation>Экспорт завершен</translation>
</message>
@@ -5217,7 +5132,7 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<context>
<name>VpnConnection</name>
<message>
<location filename="../vpnconnection.cpp" line="421"/>
<location filename="../vpnconnection.cpp" line="415"/>
<source>Mbps</source>
<translation>Мбит/с</translation>
</message>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -310,7 +310,7 @@ bool ApiConfigsController::deactivateDevice()
auto serverConfigObject = m_serversModel->getServerConfig(serverIndex);
auto apiConfigObject = serverConfigObject.value(configKey::apiConfig).toObject();
if (!apiUtils::isPremiumServer(serverConfigObject)) {
if (apiUtils::getConfigType(serverConfigObject) != apiDefs::ConfigType::AmneziaPremiumV2) {
return true;
}
@@ -345,7 +345,7 @@ bool ApiConfigsController::deactivateExternalDevice(const QString &uuid, const Q
auto serverConfigObject = m_serversModel->getServerConfig(serverIndex);
auto apiConfigObject = serverConfigObject.value(configKey::apiConfig).toObject();
if (!apiUtils::isPremiumServer(serverConfigObject)) {
if (apiUtils::getConfigType(serverConfigObject) != apiDefs::ConfigType::AmneziaPremiumV2) {
return true;
}

View File

@@ -62,7 +62,7 @@ bool ApiSettingsController::getAccountInfo(bool reload)
QByteArray responseBody;
if (apiUtils::isPremiumServer(serverConfig)) {
if (apiUtils::getConfigType(serverConfig) == apiDefs::ConfigType::AmneziaPremiumV2) {
ErrorCode errorCode = gatewayController.post(QString("%1v1/account_info"), apiPayload, responseBody);
if (errorCode != ErrorCode::NoError) {
emit errorOccurred(errorCode);

View File

@@ -56,7 +56,7 @@ namespace
} else if ((config.contains(xrayConfigPatternInbound)) && (config.contains(xrayConfigPatternOutbound))) {
return ConfigTypes::Xray;
} else if (config.contains(openVpnConfigPatternCli)
&& (config.contains(openVpnConfigPatternDriver1) || config.contains(openVpnConfigPatternDriver2))) {
&& (config.contains(openVpnConfigPatternDriver1) || config.contains(openVpnConfigPatternDriver2))) {
return ConfigTypes::OpenVpn;
}
return ConfigTypes::Invalid;
@@ -94,8 +94,6 @@ bool ImportController::extractConfigFromFile(const QString &fileName)
bool ImportController::extractConfigFromData(QString data)
{
m_maliciousWarningText.clear();
QString config = data;
QString prefix;
QString errormsg;
@@ -660,7 +658,6 @@ void ImportController::checkForMaliciousStrings(const QJsonObject &serverConfig)
if ((containerName == ContainerProps::containerToString(DockerContainer::OpenVpn))
|| (containerName == ContainerProps::containerToString(DockerContainer::Cloak))
|| (containerName == ContainerProps::containerToString(DockerContainer::ShadowSocks))) {
QString protocolConfig =
containerConfig[ProtocolProps::protoToString(Proto::OpenVpn)].toObject()[config_key::last_config].toString();
QString protocolConfigJson = QJsonDocument::fromJson(protocolConfig.toUtf8()).object()[config_key::config].toString();
@@ -682,11 +679,8 @@ void ImportController::checkForMaliciousStrings(const QJsonObject &serverConfig)
}
}
m_maliciousWarningText = tr("This configuration contains an OpenVPN setup. OpenVPN configurations can include malicious "
"scripts, so only add it if you fully trust the provider of this config. ");
if (maliciousStrings.size() >= dangerousTagsMaxCount) {
m_maliciousWarningText.push_back(tr("<br>In the imported configuration, potentially dangerous lines were found:"));
m_maliciousWarningText = tr("In the imported configuration, potentially dangerous lines were found:");
for (const auto &string : maliciousStrings) {
m_maliciousWarningText.push_back(QString("<br><i>%1</i>").arg(string));
}

View File

@@ -370,8 +370,17 @@ ErrorCode InstallController::getAlreadyInstalledContainers(const ServerCredentia
containerConfig.insert(config_key::transport_proto, transportProto);
if (protocol == Proto::Awg) {
QString serverConfigPath;
if (container == DockerContainer::Awg) {
if (serverController->isNewAwgContainer(credentials)) {
serverConfigPath = amnezia::protocols::awg::serverConfigPath;
} else {
serverConfigPath = "/opt/amnezia/awg/wg0.conf";
}
}
QString serverConfig = serverController->getTextFileFromContainer(container, credentials,
protocols::awg::serverConfigPath, errorCode);
serverConfigPath, errorCode);
QMap<QString, QString> serverConfigMap;
auto serverConfigLines = serverConfig.split("\n");

View File

@@ -48,19 +48,15 @@ QVariant ApiAccountInfoModel::data(const QModelIndex &index, int role) const
}
case ServiceDescriptionRole: {
if (m_accountInfoData.configType == apiDefs::ConfigType::AmneziaPremiumV2) {
return tr("Classic VPN for seamless work, downloading large files, and watching videos. Access all websites and online "
"resources. "
return tr("Classic VPN for seamless work, downloading large files, and watching videos. Access all websites and online resources. "
"Speeds up to 200 Mbps");
} else if (m_accountInfoData.configType == apiDefs::ConfigType::AmneziaFreeV3) {
return tr("Free unlimited access to a basic set of websites such as Facebook, Instagram, Twitter (X), Discord, Telegram and "
"more. YouTube is not included in the free plan.");
} else {
return "";
}
}
case IsComponentVisibleRole: {
return m_accountInfoData.configType == apiDefs::ConfigType::AmneziaPremiumV2
|| m_accountInfoData.configType == apiDefs::ConfigType::ExternalPremium;
return m_accountInfoData.configType == apiDefs::ConfigType::AmneziaPremiumV2;
}
case HasExpiredWorkerRole: {
for (int i = 0; i < m_issuedConfigsInfo.size(); i++) {
@@ -97,8 +93,6 @@ void ApiAccountInfoModel::updateModel(const QJsonObject &accountInfoObject, cons
m_accountInfoData = accountInfoData;
m_supportInfo = accountInfoObject.value(apiDefs::key::supportInfo).toObject();
endResetModel();
}
@@ -127,27 +121,12 @@ QJsonArray ApiAccountInfoModel::getIssuedConfigsInfo()
QString ApiAccountInfoModel::getTelegramBotLink()
{
return m_supportInfo.value(apiDefs::key::telegram).toString();
}
QString ApiAccountInfoModel::getEmailLink()
{
return m_supportInfo.value(apiDefs::key::email).toString();
}
QString ApiAccountInfoModel::getBillingEmailLink()
{
return m_supportInfo.value(apiDefs::key::billingEmail).toString();
}
QString ApiAccountInfoModel::getSiteLink()
{
return m_supportInfo.value(apiDefs::key::websiteName).toString();
}
QString ApiAccountInfoModel::getFullSiteLink()
{
return m_supportInfo.value(apiDefs::key::website).toString();
if (m_accountInfoData.configType == apiDefs::ConfigType::AmneziaFreeV3) {
return tr("amnezia_free_support_bot");
} else if (m_accountInfoData.configType == apiDefs::ConfigType::AmneziaPremiumV2) {
return tr("amnezia_premium_support_bot");
}
return "";
}
QHash<int, QByteArray> ApiAccountInfoModel::roleNames() const

View File

@@ -33,12 +33,7 @@ public slots:
QJsonArray getAvailableCountries();
QJsonArray getIssuedConfigsInfo();
QString getTelegramBotLink();
QString getEmailLink();
QString getBillingEmailLink();
QString getSiteLink();
QString getFullSiteLink();
protected:
QHash<int, QByteArray> roleNames() const override;
@@ -56,7 +51,6 @@ private:
AccountInfoData m_accountInfoData;
QJsonArray m_availableCountries;
QJsonArray m_issuedConfigsInfo;
QJsonObject m_supportInfo;
};
#endif // APIACCOUNTINFOMODEL_H

View File

@@ -209,7 +209,8 @@ ErrorCode ClientManagementModel::getWireGuardClients(const DockerContainer conta
{
ErrorCode error = ErrorCode::NoError;
const QString wireGuardConfigFile = QString("opt/amnezia/%1/wg0.conf").arg(container == DockerContainer::WireGuard ? "wireguard" : "awg");
const QString wireGuardConfigFile =
DockerContainer::WireGuard ? amnezia::protocols::wireguard::serverConfigPath : amnezia::protocols::awg::serverConfigPath;
const QString wireguardConfigString = serverController->getTextFileFromContainer(container, credentials, wireGuardConfigFile, error);
if (error != ErrorCode::NoError) {
logger.error() << "Failed to get the wg conf file from the server";
@@ -736,8 +737,17 @@ ErrorCode ClientManagementModel::revokeWireGuard(const int row, const DockerCont
{
ErrorCode error = ErrorCode::NoError;
const QString wireGuardConfigFile =
QString("/opt/amnezia/%1/wg0.conf").arg(container == DockerContainer::WireGuard ? "wireguard" : "awg");
QString wireGuardConfigFile;
if (container == DockerContainer::Awg) {
if (serverController->isNewAwgContainer(credentials)) {
wireGuardConfigFile = amnezia::protocols::awg::serverConfigPath;
} else {
wireGuardConfigFile = "/opt/amnezia/awg/wg0.conf";
}
} else {
wireGuardConfigFile = amnezia::protocols::wireguard::serverConfigPath;
}
const QString wireguardConfigString = serverController->getTextFileFromContainer(container, credentials, wireGuardConfigFile, error);
if (error != ErrorCode::NoError) {
logger.error() << "Failed to get the wg conf file from the server";
@@ -780,7 +790,11 @@ ErrorCode ClientManagementModel::revokeWireGuard(const int row, const DockerCont
return error;
}
const QString script = "sudo docker exec -i $CONTAINER_NAME bash -c 'wg syncconf wg0 <(wg-quick strip %1)'";
QString interfaceName = DockerContainer::WireGuard ? protocols::wireguard::interfaceName : protocols::awg::interfaceName;
QString wgBinaryName = DockerContainer::WireGuard ? protocols::wireguard::wgBinaryName : protocols::awg::wgBinaryName;
QString wgQuickBinaryName = DockerContainer::WireGuard ? protocols::wireguard::wgQuickBinaryName : protocols::awg::wgQuickBinaryName;
QString script = QString("sudo docker exec -i $CONTAINER_NAME bash -c '%4 syncconf %2 <(%3 strip %1)'")
.arg(wireGuardConfigFile, interfaceName, wgQuickBinaryName, wgBinaryName);
error = serverController->runScript(
credentials,
serverController->replaceVars(script.arg(wireGuardConfigFile), serverController->genVarsForScript(credentials, container)));

View File

@@ -1,11 +1,13 @@
#include "languageModel.h"
LanguageModel::LanguageModel(std::shared_ptr<Settings> settings, QObject *parent) : m_settings(settings), QAbstractListModel(parent)
LanguageModel::LanguageModel(std::shared_ptr<Settings> settings, QObject *parent)
: m_settings(settings), QAbstractListModel(parent)
{
QMetaEnum metaEnum = QMetaEnum::fromType<LanguageSettings::AvailableLanguageEnum>();
for (int i = 0; i < metaEnum.keyCount(); i++) {
m_availableLanguages.push_back(LanguageModelData { getLocalLanguageName(static_cast<LanguageSettings::AvailableLanguageEnum>(i)),
static_cast<LanguageSettings::AvailableLanguageEnum>(i) });
m_availableLanguages.push_back(
LanguageModelData {getLocalLanguageName(static_cast<LanguageSettings::AvailableLanguageEnum>(i)),
static_cast<LanguageSettings::AvailableLanguageEnum>(i) });
}
}
@@ -48,7 +50,8 @@ QString LanguageModel::getLocalLanguageName(const LanguageSettings::AvailableLan
case LanguageSettings::AvailableLanguageEnum::Burmese: strLanguage = "မြန်မာဘာသာ"; break;
case LanguageSettings::AvailableLanguageEnum::Urdu: strLanguage = "اُرْدُوْ"; break;
case LanguageSettings::AvailableLanguageEnum::Hindi: strLanguage = "हिन्दी"; break;
default: break;
default:
break;
}
return strLanguage;
@@ -101,12 +104,11 @@ QString LanguageModel::getCurrentLanguageName()
return m_availableLanguages[getCurrentLanguageIndex()].name;
}
QString LanguageModel::getCurrentSiteUrl(const QString &path)
QString LanguageModel::getCurrentSiteUrl()
{
auto language = static_cast<LanguageSettings::AvailableLanguageEnum>(getCurrentLanguageIndex());
switch (language) {
case LanguageSettings::AvailableLanguageEnum::Russian:
return "https://storage.googleapis.com/amnezia/amnezia.org" + (path.isEmpty() ? "" : (QString("?m-path=/%1").arg(path)));
default: return QString("https://amnezia.org") + (path.isEmpty() ? "" : (QString("/%1").arg(path)));
case LanguageSettings::AvailableLanguageEnum::Russian: return "https://storage.googleapis.com/amnezia/amnezia.org";
default: return "https://amnezia.org";
}
}

View File

@@ -59,7 +59,7 @@ public slots:
int getCurrentLanguageIndex();
int getLineHeightAppend();
QString getCurrentLanguageName();
QString getCurrentSiteUrl(const QString &path = "");
QString getCurrentSiteUrl();
signals:
void updateTranslations(const QLocale &locale);

View File

@@ -29,7 +29,7 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onClicked: function() {
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl("premium"))
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl() + "/premium")
}
}

View File

@@ -252,7 +252,7 @@ PageType {
text: qsTr("Privacy Policy")
clickedFunc: function() {
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl("policy"))
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl() + "/policy")
}
}
}

View File

@@ -28,24 +28,24 @@ PageType {
id: techSupport
readonly property string title: qsTr("Email")
readonly property string description: ApiAccountInfoModel.getEmailLink()
readonly property string link: "mailto:" + ApiAccountInfoModel.getEmailLink()
readonly property string description: qsTr("support@amnezia.org")
readonly property string link: "mailto:support@amnezia.org"
}
QtObject {
id: paymentSupport
readonly property string title: qsTr("Email Billing & Orders")
readonly property string description: ApiAccountInfoModel.getBillingEmailLink()
readonly property string link: "mailto:" + ApiAccountInfoModel.getBillingEmailLink()
readonly property string description: qsTr("help@vpnpay.io")
readonly property string link: "mailto:help@vpnpay.io"
}
QtObject {
id: site
readonly property string title: qsTr("Website")
readonly property string description: ApiAccountInfoModel.getSiteLink()
readonly property string link: ApiAccountInfoModel.getFullSiteLink()
readonly property string description: qsTr("amnezia.org")
readonly property string link: LanguageModel.getCurrentSiteUrl()
}
property list<QtObject> supportModel: [

View File

@@ -3,8 +3,6 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Dialogs
import QtCore
import PageEnum 1.0
import Style 1.0
@@ -103,34 +101,6 @@ PageType {
}
}
LabelWithButtonType {
Layout.fillWidth: true
text: qsTr("Export client logs")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
visible: PageController.isStartPageVisible()
clickedFunction: function() {
var fileName = ""
if (GC.isMobile()) {
fileName = "AmneziaVPN.log"
} else {
fileName = SystemController.getFileName(qsTr("Save"),
qsTr("Logs files (*.log)"),
StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN",
true,
".log")
}
if (fileName !== "") {
PageController.showBusyIndicator(true)
SettingsController.exportLogsFile(fileName)
PageController.showBusyIndicator(false)
PageController.showNotificationMessage(qsTr("Logs file saved"))
}
}
}
LabelWithButtonType {
id: supportUuid
Layout.fillWidth: true

View File

@@ -175,7 +175,7 @@ PageType {
leftImageSource: "qrc:/images/controls/help-circle.svg"
onClicked: {
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl("starter-guide"))
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl() + "/starter-guide")
}
}
}

View File

@@ -78,7 +78,7 @@ PageType {
height: containers.contentItem.height
spacing: 16
currentIndex: 0
currentIndex: 1
clip: true
interactive: false
model: proxyContainersModel

View File

@@ -351,10 +351,8 @@ void VpnConnection::appendSplitTunnelingConfig()
sitesJsonArray.append(site);
}
if (sitesJsonArray.isEmpty()) {
sitesRouteMode = Settings::RouteMode::VpnAllSites;
} else if (sitesRouteMode == Settings::VpnOnlyForwardSites) {
// Allow traffic to Amnezia DNS
// Allow traffic to Amnezia DNS
if (sitesRouteMode == Settings::VpnOnlyForwardSites) {
sitesJsonArray.append(m_vpnConfiguration.value(config_key::dns1).toString());
sitesJsonArray.append(m_vpnConfiguration.value(config_key::dns2).toString());
}
@@ -373,10 +371,6 @@ void VpnConnection::appendSplitTunnelingConfig()
for (const auto &app : apps) {
appsJsonArray.append(app.appPath.isEmpty() ? app.packageName : app.appPath);
}
if (appsJsonArray.isEmpty()) {
appsRouteMode = Settings::AppsRouteMode::VpnAllApps;
}
}
m_vpnConfiguration.insert(config_key::appSplitTunnelType, appsRouteMode);

View File

@@ -2,33 +2,13 @@
APP_NAME=AmneziaVPN
PLIST_NAME=$APP_NAME.plist
LAUNCH_DAEMONS_PLIST_NAME="/Library/LaunchDaemons/$PLIST_NAME"
APP_PATH="/Applications/$APP_NAME.app"
USER_APP_SUPPORT="$HOME/Library/Application Support/$APP_NAME"
SYSTEM_APP_SUPPORT="/Library/Application Support/$APP_NAME"
LOG_FOLDER="/var/log/$APP_NAME"
CACHES_FOLDER="$HOME/Library/Caches/$APP_NAME"
LAUNCH_DAEMONS_PLIST_NAME=/Library/LaunchDaemons/$PLIST_NAME
# Stop the running service if it exists
if pgrep -x "${APP_NAME}-service" > /dev/null; then
sudo killall -9 "${APP_NAME}-service"
if launchctl list "$APP_NAME-service" &> /dev/null; then
launchctl unload $LAUNCH_DAEMONS_PLIST_NAME
rm -f $LAUNCH_DAEMONS_PLIST_NAME
fi
# Unload the service if loaded and remove its plist file regardless
if launchctl list "${APP_NAME}-service" &> /dev/null; then
sudo launchctl unload "$LAUNCH_DAEMONS_PLIST_NAME"
fi
sudo rm -f "$LAUNCH_DAEMONS_PLIST_NAME"
# Remove the entire application bundle
sudo rm -rf "$APP_PATH"
# Remove Application Support folders (user and system, if they exist)
rm -rf "$USER_APP_SUPPORT"
sudo rm -rf "$SYSTEM_APP_SUPPORT"
# Remove the log folder
sudo rm -rf "$LOG_FOLDER"
# Remove any caches left behind
rm -rf "$CACHES_FOLDER"
rm -rf "$HOME/Library/Application Support/$APP_NAME"
rm -rf /var/log/$APP_NAME
rm -rf /Applications/$APP_NAME.app/Contents

View File

@@ -1,38 +0,0 @@
#!/bin/sh
set -e
VERSION=$1
if [[ $VERSION = '' ]]; then
echo '::error::VERSION does not set. Exiting with error...'
exit 1
fi
mkdir -p dist
cd dist
echo $VERSION >> VERSION
curl -s https://api.github.com/repos/amnezia-vpn/amnezia-client/releases/tags/$VERSION | jq -r .body | tr -d '\r' > CHANGELOG
if [[ $(cat CHANGELOG) = null ]]; then
echo '::error::Release does not exists. Exiting with error...'
exit 1
fi
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android8+_arm64-v8a.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android8+_armeabi-v7a.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android8+_x86.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android8+_x86_64.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android_7_arm64-v8a.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android_7_armeabi-v7a.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android_7_x86.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_android_7_x86_64.apk
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_linux.tar.zip
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_macos.dmg
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_macos_old.dmg
wget -q https://github.com/amnezia-vpn/amnezia-client/releases/download/${VERSION}/AmneziaVPN_${VERSION}_x64.exe
cd ../
rclone sync ./dist/ r2:/updates/