Compare commits

..

3 Commits

Author SHA1 Message Date
vladimir.kuznetsov 4911aa5eaa Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD 2024-01-10 20:51:34 +07:00
vladimir.kuznetsov f18dbc1e15 remove unnecessary mutexes 2024-01-10 20:50:35 +07:00
vladimir.kuznetsov 9753c3feb6 Now value and setValue of secureQSettings are always called in the main thread 2024-01-06 10:48:29 +07:00
38 changed files with 619 additions and 550 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
set(PROJECT AmneziaVPN)
project(${PROJECT} VERSION 4.2.0.1
project(${PROJECT} VERSION 4.1.0.1
DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/"
)
+1 -1
View File
@@ -361,7 +361,7 @@ void AmneziaApplication::initControllers()
m_settings, m_configurator));
m_engine->rootContext()->setContextProperty("ExportController", m_exportController.get());
m_settingsController.reset(new SettingsController(m_serversModel, m_containersModel, m_languageModel, m_sitesModel, m_settings));
m_settingsController.reset(new SettingsController(m_serversModel, m_containersModel, m_languageModel, m_settings));
m_engine->rootContext()->setContextProperty("SettingsController", m_settingsController.get());
if (m_settingsController->isAutoConnectEnabled() && m_serversModel->getDefaultServerIndex() >= 0) {
QTimer::singleShot(1000, this, [this]() { m_connectionController->openConnection(); });
+1
View File
@@ -22,6 +22,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- Enable when VPN-per-app mode will be implemented -->
<!-- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> -->
@@ -2,7 +2,6 @@ package org.amnezia.vpn
import android.content.ComponentName
import android.content.Intent
import android.content.Intent.EXTRA_MIME_TYPES
import android.content.Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
import android.content.ServiceConnection
import android.net.Uri
@@ -13,13 +12,11 @@ import android.os.IBinder
import android.os.Looper
import android.os.Message
import android.os.Messenger
import android.webkit.MimeTypeMap
import android.widget.Toast
import androidx.annotation.MainThread
import androidx.core.content.ContextCompat
import java.io.IOException
import kotlin.LazyThreadSafetyMode.NONE
import kotlin.text.RegexOption.IGNORE_CASE
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -38,7 +35,6 @@ private const val TAG = "AmneziaActivity"
private const val CHECK_VPN_PERMISSION_ACTION_CODE = 1
private const val CREATE_FILE_ACTION_CODE = 2
private const val OPEN_FILE_ACTION_CODE = 3
private const val BIND_SERVICE_TIMEOUT = 1000L
class AmneziaActivity : QtActivity() {
@@ -205,15 +201,6 @@ class AmneziaActivity : QtActivity() {
}
}
OPEN_FILE_ACTION_CODE -> {
when (resultCode) {
RESULT_OK -> data?.data?.toString() ?: ""
else -> ""
}.let { uri ->
QtAndroidController.onFileOpened(uri)
}
}
CHECK_VPN_PERMISSION_ACTION_CODE -> {
when (resultCode) {
RESULT_OK -> {
@@ -383,36 +370,6 @@ class AmneziaActivity : QtActivity() {
}
}
@Suppress("unused")
fun openFile(filter: String?) {
Log.v(TAG, "Open file with filter: $filter")
val mimeTypes = if (!filter.isNullOrEmpty()) {
val extensionRegex = "\\*\\.[a-z .]+".toRegex(IGNORE_CASE)
val mime = MimeTypeMap.getSingleton()
extensionRegex.findAll(filter).map {
mime.getMimeTypeFromExtension(it.value.drop(2))
}.filterNotNull().toSet()
} else emptySet()
Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
Log.d(TAG, "File mimyType filter: $mimeTypes")
when (mimeTypes.size) {
1 -> type = mimeTypes.first()
in 2..Int.MAX_VALUE -> {
type = "*/*"
putExtra(EXTRA_MIME_TYPES, mimeTypes.toTypedArray())
}
else -> type = "*/*"
}
}.also {
startActivityForResult(it, OPEN_FILE_ACTION_CODE)
}
}
@Suppress("unused")
fun setNotificationText(title: String, message: String, timerSec: Int) {
Log.v(TAG, "Set notification text")
@@ -15,8 +15,6 @@ object QtAndroidController {
external fun onVpnReconnecting()
external fun onStatisticsUpdate(rxBytes: Long, txBytes: Long)
external fun onFileOpened(uri: String)
external fun onConfigImported(data: String)
external fun decodeQrCode(data: String): Boolean
+1 -1
View File
@@ -90,7 +90,7 @@ include_directories(
${LIBSSH_ROOT_DIR}/include
${CLIENT_ROOT_DIR}/3rd/libssh/include
${CLIENT_ROOT_DIR}/3rd/QSimpleCrypto/include
${CLIENT_ROOT_DIR}/3rd/qtkeychain/qtkeychain
${CLIENT_ROOT_DIR}/3rd/qtkeychain
${CMAKE_CURRENT_BINARY_DIR}/3rd/qtkeychain
${CMAKE_CURRENT_BINARY_DIR}/3rd/libssh/include
)
+2 -2
View File
@@ -27,7 +27,7 @@ link_directories(${CMAKE_CURRENT_SOURCE_DIR}/platforms/android)
set(HEADERS ${HEADERS}
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_controller.h
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_notificationhandler.h
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_utils.h
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/androidutils.h
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/authResultReceiver.h
${CMAKE_CURRENT_SOURCE_DIR}/protocols/android_vpnprotocol.h
)
@@ -35,7 +35,7 @@ set(HEADERS ${HEADERS}
set(SOURCES ${SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_controller.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_notificationhandler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/androidutils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/authResultReceiver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/protocols/android_vpnprotocol.cpp
)
+20 -33
View File
@@ -1,10 +1,8 @@
#include <QCoreApplication>
#include <QJniEnvironment>
#include <QJsonDocument>
#include <QQmlFile>
#include <QEventLoop>
#include "android_controller.h"
#include "android_utils.h"
#include "ui/controllers/importController.h"
namespace
@@ -108,7 +106,6 @@ bool AndroidController::initialize()
{"onVpnDisconnected", "()V", reinterpret_cast<void *>(onVpnDisconnected)},
{"onVpnReconnecting", "()V", reinterpret_cast<void *>(onVpnReconnecting)},
{"onStatisticsUpdate", "(JJ)V", reinterpret_cast<void *>(onStatisticsUpdate)},
{"onFileOpened", "(Ljava/lang/String;)V", reinterpret_cast<void *>(onFileOpened)},
{"onConfigImported", "(Ljava/lang/String;)V", reinterpret_cast<void *>(onConfigImported)},
{"decodeQrCode", "(Ljava/lang/String;)Z", reinterpret_cast<bool *>(decodeQrCode)}
};
@@ -130,7 +127,7 @@ auto AndroidController::callActivityMethod(const char *methodName, const char *s
const std::function<Ret()> &defValue, Args &&...args)
{
qDebug() << "Call activity method:" << methodName;
QJniObject activity = AndroidUtils::getActivity();
QJniObject activity = QNativeInterface::QAndroidApplication::context();
if (activity.isValid()) {
return activity.callMethod<Ret>(methodName, signature, std::forward<Args>(args)...);
} else {
@@ -168,24 +165,6 @@ void AndroidController::saveFile(const QString &fileName, const QString &data)
QJniObject::fromString(data).object<jstring>());
}
QString AndroidController::openFile(const QString &filter)
{
QEventLoop wait;
QString fileName;
connect(this, &AndroidController::fileOpened, this,
[&fileName, &wait](const QString &uri) {
qDebug() << "Android event: file opened; uri:" << uri;
fileName = QQmlFile::urlToLocalFileOrQrc(uri);
qDebug() << "Android opened filename:" << fileName;
wait.quit();
},
static_cast<Qt::ConnectionType>(Qt::QueuedConnection | Qt::SingleShotConnection));
callActivityMethod("openFile", "(Ljava/lang/String;)V",
QJniObject::fromString(filter).object<jstring>());
wait.exec();
return fileName;
}
void AndroidController::setNotificationText(const QString &title, const QString &message, int timerSec)
{
callActivityMethod("setNotificationText", "(Ljava/lang/String;Ljava/lang/String;I)V",
@@ -305,20 +284,21 @@ void AndroidController::onStatisticsUpdate(JNIEnv *env, jobject thiz, jlong rxBy
emit AndroidController::instance()->statisticsUpdated((quint64) rxBytes, (quint64) txBytes);
}
// static
void AndroidController::onFileOpened(JNIEnv *env, jobject thiz, jstring uri)
{
Q_UNUSED(thiz);
emit AndroidController::instance()->fileOpened(AndroidUtils::convertJString(env, uri));
}
// static
void AndroidController::onConfigImported(JNIEnv *env, jobject thiz, jstring data)
{
Q_UNUSED(env);
Q_UNUSED(thiz);
emit AndroidController::instance()->configImported(AndroidUtils::convertJString(env, data));
const char *buffer = env->GetStringUTFChars(data, nullptr);
if (!buffer) {
return;
}
QString config(buffer);
env->ReleaseStringUTFChars(data, buffer);
emit AndroidController::instance()->configImported(config);
}
// static
@@ -326,5 +306,12 @@ bool AndroidController::decodeQrCode(JNIEnv *env, jobject thiz, jstring data)
{
Q_UNUSED(thiz);
return ImportController::decodeQrCode(AndroidUtils::convertJString(env, data));
const char *buffer = env->GetStringUTFChars(data, nullptr);
if (!buffer) {
return false;
}
QString code(buffer);
env->ReleaseStringUTFChars(data, buffer);
return ImportController::decodeQrCode(code);
}
@@ -18,8 +18,7 @@ public:
bool initialize();
// keep synchronized with org.amnezia.vpn.protocol.ProtocolState
enum class ConnectionState
{
enum class ConnectionState {
CONNECTED,
CONNECTING,
DISCONNECTED,
@@ -31,8 +30,7 @@ public:
ErrorCode start(const QJsonObject &vpnConfig);
void stop();
void setNotificationText(const QString &title, const QString &message, int timerSec);
void saveFile(const QString &fileName, const QString &data);
QString openFile(const QString &filter);
void saveFile(const QString& fileName, const QString &data);
void startQrReaderActivity();
signals:
@@ -45,7 +43,6 @@ signals:
void vpnDisconnected();
void vpnReconnecting();
void statisticsUpdated(quint64 rxBytes, quint64 txBytes);
void fileOpened(QString uri);
void configImported(QString config);
void importConfigFromOutside(QString config);
void initConnectionState(Vpn::ConnectionState state);
@@ -68,7 +65,6 @@ private:
static void onVpnReconnecting(JNIEnv *env, jobject thiz);
static void onStatisticsUpdate(JNIEnv *env, jobject thiz, jlong rxBytes, jlong txBytes);
static void onConfigImported(JNIEnv *env, jobject thiz, jstring data);
static void onFileOpened(JNIEnv *env, jobject thiz, jstring uri);
static bool decodeQrCode(JNIEnv *env, jobject thiz, jstring data);
template <typename Ret, typename ...Args>
@@ -1,30 +0,0 @@
#include <QCoreApplication>
#include "android_utils.h"
namespace AndroidUtils
{
QJniObject getActivity()
{
return QNativeInterface::QAndroidApplication::context();
}
QString convertJString(JNIEnv *env, jstring data)
{
int len = env->GetStringLength(data);
QString res(len, Qt::Uninitialized);
env->GetStringRegion(data, 0, len, reinterpret_cast<jchar *>(res.data()));
return res;
}
void runOnAndroidThreadSync(const std::function<void()> &runnable)
{
QNativeInterface::QAndroidApplication::runOnAndroidMainThread(runnable).waitForFinished();
}
void runOnAndroidThreadAsync(const std::function<void()> &runnable)
{
QNativeInterface::QAndroidApplication::runOnAndroidMainThread(runnable);
}
}
-16
View File
@@ -1,16 +0,0 @@
#ifndef ANDROID_UTILS_H
#define ANDROID_UTILS_H
#include <QJniObject>
namespace AndroidUtils
{
QJniObject getActivity();
QString convertJString(JNIEnv *env, jstring data);
void runOnAndroidThreadSync(const std::function<void()> &runnable);
void runOnAndroidThreadAsync(const std::function<void()> &runnable);
};
#endif // ANDROID_UTILS_H
+183
View File
@@ -0,0 +1,183 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "androidutils.h"
#include <QGuiApplication>
#include <QJniEnvironment>
#include <QJniObject>
#include <QJsonDocument>
#include <QJsonObject>
#include <QNetworkCookieJar>
#include <QTimer>
#include <QUrlQuery>
#include "jni.h"
namespace
{
AndroidUtils *s_instance = nullptr;
} // namespace
// static
QString AndroidUtils::GetDeviceName()
{
QJniEnvironment env;
jclass BUILD = env->FindClass("android/os/Build");
jfieldID model = env->GetStaticFieldID(BUILD, "MODEL", "Ljava/lang/String;");
jstring value = (jstring)env->GetStaticObjectField(BUILD, model);
if (!value) {
return QString("Android Device");
}
const char *buffer = env->GetStringUTFChars(value, nullptr);
if (!buffer) {
return QString("Android Device");
}
QString res(buffer);
env->ReleaseStringUTFChars(value, buffer);
return res;
};
// static
AndroidUtils *AndroidUtils::instance()
{
if (!s_instance) {
Q_ASSERT(qApp);
s_instance = new AndroidUtils(qApp);
}
return s_instance;
}
AndroidUtils::AndroidUtils(QObject *parent) : QObject(parent)
{
Q_ASSERT(!s_instance);
s_instance = this;
}
AndroidUtils::~AndroidUtils()
{
Q_ASSERT(s_instance == this);
s_instance = nullptr;
}
// static
void AndroidUtils::dispatchToMainThread(std::function<void()> callback)
{
QTimer *timer = new QTimer();
timer->moveToThread(qApp->thread());
timer->setSingleShot(true);
QObject::connect(timer, &QTimer::timeout, [=]() {
callback();
timer->deleteLater();
});
QMetaObject::invokeMethod(timer, "start", Qt::QueuedConnection);
}
// static
QByteArray AndroidUtils::getQByteArrayFromJString(JNIEnv *env, jstring data)
{
const char *buffer = env->GetStringUTFChars(data, nullptr);
if (!buffer) {
qDebug() << "getQByteArrayFromJString - failed to parse data.";
return QByteArray();
}
QByteArray out(buffer);
env->ReleaseStringUTFChars(data, buffer);
return out;
}
// static
QString AndroidUtils::getQStringFromJString(JNIEnv *env, jstring data)
{
const char *buffer = env->GetStringUTFChars(data, nullptr);
if (!buffer) {
qDebug() << "getQStringFromJString - failed to parse data.";
return QString();
}
QString out(buffer);
env->ReleaseStringUTFChars(data, buffer);
return out;
}
// static
QJsonObject AndroidUtils::getQJsonObjectFromJString(JNIEnv *env, jstring data)
{
QByteArray raw(getQByteArrayFromJString(env, data));
QJsonParseError jsonError;
QJsonDocument json = QJsonDocument::fromJson(raw, &jsonError);
if (QJsonParseError::NoError != jsonError.error) {
qDebug() << "getQJsonObjectFromJstring - error parsing json. Code: " << jsonError.error
<< "Offset: " << jsonError.offset << "Message: " << jsonError.errorString() << "Data: " << raw;
return QJsonObject();
}
if (!json.isObject()) {
qDebug() << "getQJsonObjectFromJString - object expected.";
return QJsonObject();
}
return json.object();
}
QJniObject AndroidUtils::getActivity()
{
return QNativeInterface::QAndroidApplication::context();
}
int AndroidUtils::GetSDKVersion()
{
QJniEnvironment env;
jclass versionClass = env->FindClass("android/os/Build$VERSION");
jfieldID sdkIntFieldID = env->GetStaticFieldID(versionClass, "SDK_INT", "I");
int sdk = env->GetStaticIntField(versionClass, sdkIntFieldID);
return sdk;
}
QString AndroidUtils::GetManufacturer()
{
QJniEnvironment env;
jclass buildClass = env->FindClass("android/os/Build");
jfieldID manuFacturerField = env->GetStaticFieldID(buildClass, "MANUFACTURER", "Ljava/lang/String;");
jstring value = (jstring)env->GetStaticObjectField(buildClass, manuFacturerField);
const char *buffer = env->GetStringUTFChars(value, nullptr);
if (!buffer) {
qDebug() << "Failed to fetch MANUFACTURER";
return QByteArray();
}
QString res(buffer);
qDebug() << "MANUFACTURER: " << res;
env->ReleaseStringUTFChars(value, buffer);
return res;
}
void AndroidUtils::runOnAndroidThreadSync(const std::function<void()> runnable)
{
QNativeInterface::QAndroidApplication::runOnAndroidMainThread(runnable).waitForFinished();
}
void AndroidUtils::runOnAndroidThreadAsync(const std::function<void()> runnable)
{
QNativeInterface::QAndroidApplication::runOnAndroidMainThread(runnable);
}
// Static
// Creates a copy of the passed QByteArray in the JVM and passes back a ref
jbyteArray AndroidUtils::tojByteArray(const QByteArray &data)
{
QJniEnvironment env;
jbyteArray out = env->NewByteArray(data.size());
env->SetByteArrayRegion(out, 0, data.size(), reinterpret_cast<const jbyte *>(data.constData()));
return out;
}
+49
View File
@@ -0,0 +1,49 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ANDROIDUTILS_H
#define ANDROIDUTILS_H
#include <jni.h>
#include <QJniEnvironment>
#include <QJniObject>
#include <QObject>
#include <QString>
#include <QUrl>
class AndroidUtils final : public QObject
{
Q_OBJECT
Q_DISABLE_COPY_MOVE(AndroidUtils)
public:
static QString GetDeviceName();
static int GetSDKVersion();
static QString GetManufacturer();
static AndroidUtils* instance();
static void dispatchToMainThread(std::function<void()> callback);
static QByteArray getQByteArrayFromJString(JNIEnv* env, jstring data);
static jbyteArray tojByteArray(const QByteArray& data);
static QString getQStringFromJString(JNIEnv* env, jstring data);
static QJsonObject getQJsonObjectFromJString(JNIEnv* env, jstring data);
static QJniObject getActivity();
static void runOnAndroidThreadSync(const std::function<void()> runnable);
static void runOnAndroidThreadAsync(const std::function<void()> runnable);
private:
AndroidUtils(QObject* parent);
~AndroidUtils();
};
#endif // ANDROIDUTILS_H
+15 -15
View File
@@ -25,7 +25,8 @@ SecureQSettings::SecureQSettings(const QString &organization, const QString &app
if (encryptionRequired() && !encrypted) {
for (const QString &key : m_settings.allKeys()) {
if (encryptedKeys.contains(key)) {
const QVariant &val = value(key);
QVariant val;
value(key, val);
setValue(key, val);
}
}
@@ -34,16 +35,18 @@ SecureQSettings::SecureQSettings(const QString &organization, const QString &app
}
}
QVariant SecureQSettings::value(const QString &key, const QVariant &defaultValue) const
void SecureQSettings::value(const QString &key, QVariant &returnValue, const QVariant &defaultValue) const
{
QMutexLocker locker(&mutex);
if (m_cache.contains(key)) {
return m_cache.value(key);
returnValue = m_cache.value(key);
return;
}
if (!m_settings.contains(key)) {
returnValue = defaultValue;
return;
}
if (!m_settings.contains(key))
return defaultValue;
QVariant retVal;
@@ -54,7 +57,7 @@ QVariant SecureQSettings::value(const QString &key, const QVariant &defaultValue
if (getEncKey().isEmpty() || getEncIv().isEmpty()) {
qCritical() << "SecureQSettings::setValue Decryption requested, but key is empty";
return {};
return;
}
QByteArray encryptedValue = retVal.toByteArray().mid(magicString.size());
@@ -75,13 +78,11 @@ QVariant SecureQSettings::value(const QString &key, const QVariant &defaultValue
}
m_cache.insert(key, retVal);
return retVal;
returnValue = retVal;
}
void SecureQSettings::setValue(const QString &key, const QVariant &value)
{
QMutexLocker locker(&mutex);
if (encryptionRequired() && encryptedKeys.contains(key)) {
if (!getEncKey().isEmpty() && !getEncIv().isEmpty()) {
QByteArray decryptedValue;
@@ -107,8 +108,6 @@ void SecureQSettings::setValue(const QString &key, const QVariant &value)
void SecureQSettings::remove(const QString &key)
{
QMutexLocker locker(&mutex);
m_settings.remove(key);
m_cache.remove(key);
@@ -125,7 +124,9 @@ QByteArray SecureQSettings::backupAppConfig() const
QJsonObject cfg;
for (const QString &key : m_settings.allKeys()) {
cfg.insert(key, QJsonValue::fromVariant(value(key)));
QVariant v;
value(key, v);
cfg.insert(key, QJsonValue::fromVariant(v));
}
return QJsonDocument(cfg).toJson();
@@ -253,7 +254,6 @@ void SecureQSettings::setSecTag(const QString &tag, const QByteArray &data)
void SecureQSettings::clearSettings()
{
QMutexLocker locker(&mutex);
m_settings.clear();
m_cache.clear();
sync();
+2 -1
View File
@@ -20,8 +20,9 @@ public:
explicit SecureQSettings(const QString &organization, const QString &application = QString(),
QObject *parent = nullptr);
Q_INVOKABLE QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
Q_INVOKABLE void value(const QString &key, QVariant &eturnValue, const QVariant &defaultValue = QVariant()) const;
Q_INVOKABLE void setValue(const QString &key, const QVariant &value);
void remove(const QString &key);
void sync();
@@ -1,6 +1,5 @@
if which apt-get > /dev/null 2>&1; then LOCK_FILE="/var/lib/dpkg/lock-frontend";\
elif which dnf > /dev/null 2>&1; then LOCK_FILE="/var/run/dnf.pid";\
elif which yum > /dev/null 2>&1; then LOCK_FILE="/var/run/yum.pid";\
elif which pacman > /dev/null 2>&1; then LOCK_FILE="/var/lib/pacman/db.lck";\
else echo "Packet manager not found"; echo "Internal error"; exit 1; fi;\
if command -v fuser > /dev/null 2>&1; then sudo fuser $LOCK_FILE 2>/dev/null; else echo "fuser not installed"; fi
if command -v fuser > /dev/null 2>&1; then sudo fuser $LOCK_FILE 2>/dev/null; else echo "fuser not installed"; fi
-1
View File
@@ -1,7 +1,6 @@
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="> /dev/null 2>&1"; 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, Docker pkg: $docker_pkg";\
if [ "$dist" = "debian" ]; then export DEBIAN_FRONTEND=noninteractive; fi;\
+25 -17
View File
@@ -39,12 +39,12 @@ Settings::Settings(QObject *parent) : QObject(parent), m_settings(ORGANIZATION_N
}
}
int Settings::serversCount() const
int Settings::serversCount()
{
return serversArray().size();
}
QJsonObject Settings::server(int index) const
QJsonObject Settings::server(int index)
{
const QJsonArray &servers = serversArray();
if (index >= servers.size())
@@ -88,12 +88,12 @@ void Settings::setDefaultContainer(int serverIndex, DockerContainer container)
editServer(serverIndex, s);
}
DockerContainer Settings::defaultContainer(int serverIndex) const
DockerContainer Settings::defaultContainer(int serverIndex)
{
return ContainerProps::containerFromString(defaultContainerName(serverIndex));
}
QString Settings::defaultContainerName(int serverIndex) const
QString Settings::defaultContainerName(int serverIndex)
{
QString name = server(serverIndex).value(config_key::defaultContainer).toString();
if (name.isEmpty()) {
@@ -102,7 +102,7 @@ QString Settings::defaultContainerName(int serverIndex) const
return name;
}
QMap<DockerContainer, QJsonObject> Settings::containers(int serverIndex) const
QMap<DockerContainer, QJsonObject> Settings::containers(int serverIndex)
{
const QJsonArray &containers = server(serverIndex).value(config_key::containers).toArray();
@@ -186,7 +186,7 @@ void Settings::clearLastConnectionConfig(int serverIndex, DockerContainer contai
setProtocolConfig(serverIndex, container, proto, c);
}
bool Settings::haveAuthData(int serverIndex) const
bool Settings::haveAuthData(int serverIndex)
{
if (serverIndex < 0)
return false;
@@ -194,7 +194,7 @@ bool Settings::haveAuthData(int serverIndex) const
return (!cred.hostName.isEmpty() && !cred.userName.isEmpty() && !cred.secretData.isEmpty());
}
QString Settings::nextAvailableServerName() const
QString Settings::nextAvailableServerName()
{
int i = 0;
bool nameExist = false;
@@ -226,7 +226,7 @@ void Settings::setSaveLogs(bool enabled)
emit saveLogsChanged();
}
QString Settings::routeModeString(RouteMode mode) const
QString Settings::routeModeString(RouteMode mode)
{
switch (mode) {
case VpnAllSites: return "AllSites";
@@ -235,7 +235,7 @@ QString Settings::routeModeString(RouteMode mode) const
}
}
Settings::RouteMode Settings::routeMode() const
Settings::RouteMode Settings::routeMode()
{
return static_cast<RouteMode>(value("Conf/routeMode", 0).toInt());
}
@@ -267,7 +267,7 @@ void Settings::addVpnSites(RouteMode mode, const QMap<QString, QString> &sites)
setVpnSites(mode, allSites);
}
QStringList Settings::getVpnIps(RouteMode mode) const
QStringList Settings::getVpnIps(RouteMode mode)
{
QStringList ips;
const QVariantMap &m = vpnSites(mode);
@@ -323,12 +323,12 @@ void Settings::removeAllVpnSites(RouteMode mode)
setVpnSites(mode, QVariantMap());
}
QString Settings::primaryDns() const
QString Settings::primaryDns()
{
return value("Conf/primaryDns", cloudFlareNs1).toString();
}
QString Settings::secondaryDns() const
QString Settings::secondaryDns()
{
return value("Conf/secondaryDns", cloudFlareNs2).toString();
}
@@ -338,12 +338,12 @@ void Settings::clearSettings()
m_settings.clearSettings();
}
ServerCredentials Settings::defaultServerCredentials() const
ServerCredentials Settings::defaultServerCredentials()
{
return serverCredentials(defaultServerIndex());
}
ServerCredentials Settings::serverCredentials(int index) const
ServerCredentials Settings::serverCredentials(int index)
{
const QJsonObject &s = server(index);
@@ -356,18 +356,26 @@ ServerCredentials Settings::serverCredentials(int index) const
return credentials;
}
QVariant Settings::value(const QString &key, const QVariant &defaultValue) const
QVariant Settings::value(const QString &key, const QVariant &defaultValue)
{
QVariant returnValue;
// if (defaultValue.isNull() || !defaultValue.isValid()) {
// QMetaObject::invokeMethod(&m_settings, "value",
// Qt::QueuedConnection,
// Q_ARG(const QString&, key),
// Q_ARG(QVariant, returnValue));
// } else {
if (QThread::currentThread() == QCoreApplication::instance()->thread()) {
returnValue = m_settings.value(key, defaultValue);
m_settings.value(key, returnValue, defaultValue);
} else {
QMetaObject::invokeMethod(&m_settings, "value",
Qt::BlockingQueuedConnection,
Q_RETURN_ARG(QVariant, returnValue),
Q_ARG(const QString&, key),
Q_ARG(QVariant&, returnValue),
Q_ARG(const QVariant&, defaultValue));
}
// }
return returnValue;
}
+29 -29
View File
@@ -24,10 +24,10 @@ class Settings : public QObject
public:
explicit Settings(QObject *parent = nullptr);
ServerCredentials defaultServerCredentials() const;
ServerCredentials serverCredentials(int index) const;
ServerCredentials defaultServerCredentials();
ServerCredentials serverCredentials(int index);
QJsonArray serversArray() const
QJsonArray serversArray()
{
return QJsonDocument::fromJson(value("Servers/serversList").toByteArray()).array();
}
@@ -37,13 +37,13 @@ public:
}
// Servers section
int serversCount() const;
QJsonObject server(int index) const;
int serversCount();
QJsonObject server(int index);
void addServer(const QJsonObject &server);
void removeServer(int index);
bool editServer(int index, const QJsonObject &server);
int defaultServerIndex() const
int defaultServerIndex()
{
return value("Servers/defaultServerIndex", 0).toInt();
}
@@ -51,16 +51,16 @@ public:
{
setValue("Servers/defaultServerIndex", index);
}
QJsonObject defaultServer() const
QJsonObject defaultServer()
{
return server(defaultServerIndex());
}
void setDefaultContainer(int serverIndex, DockerContainer container);
DockerContainer defaultContainer(int serverIndex) const;
QString defaultContainerName(int serverIndex) const;
DockerContainer defaultContainer(int serverIndex);
QString defaultContainerName(int serverIndex);
QMap<DockerContainer, QJsonObject> containers(int serverIndex) const;
QMap<DockerContainer, QJsonObject> containers(int serverIndex);
void setContainers(int serverIndex, const QMap<DockerContainer, QJsonObject> &containers);
QJsonObject containerConfig(int serverIndex, DockerContainer container);
@@ -72,11 +72,11 @@ public:
void clearLastConnectionConfig(int serverIndex, DockerContainer container, Proto proto = Proto::Any);
bool haveAuthData(int serverIndex) const;
QString nextAvailableServerName() const;
bool haveAuthData(int serverIndex);
QString nextAvailableServerName();
// App settings section
bool isAutoConnect() const
bool isAutoConnect()
{
return value("Conf/autoConnect", false).toBool();
}
@@ -85,7 +85,7 @@ public:
setValue("Conf/autoConnect", enabled);
}
bool isStartMinimized() const
bool isStartMinimized()
{
return value("Conf/startMinimized", false).toBool();
}
@@ -94,7 +94,7 @@ public:
setValue("Conf/startMinimized", enabled);
}
bool isSaveLogs() const
bool isSaveLogs()
{
return value("Conf/saveLogs", false).toBool();
}
@@ -107,12 +107,12 @@ public:
};
Q_ENUM(RouteMode)
QString routeModeString(RouteMode mode) const;
QString routeModeString(RouteMode mode);
RouteMode routeMode() const;
RouteMode routeMode();
void setRouteMode(RouteMode mode) { setValue("Conf/routeMode", mode); }
QVariantMap vpnSites(RouteMode mode) const
QVariantMap vpnSites(RouteMode mode)
{
return value("Conf/" + routeModeString(mode)).toMap();
}
@@ -123,14 +123,14 @@ public:
}
bool addVpnSite(RouteMode mode, const QString &site, const QString &ip = "");
void addVpnSites(RouteMode mode, const QMap<QString, QString> &sites); // map <site, ip>
QStringList getVpnIps(RouteMode mode) const;
QStringList getVpnIps(RouteMode mode);
void removeVpnSite(RouteMode mode, const QString &site);
void addVpnIps(RouteMode mode, const QStringList &ip);
void removeVpnSites(RouteMode mode, const QStringList &sites);
void removeAllVpnSites(RouteMode mode);
bool useAmneziaDns() const
bool useAmneziaDns()
{
return value("Conf/useAmneziaDns", true).toBool();
}
@@ -139,16 +139,16 @@ public:
setValue("Conf/useAmneziaDns", enabled);
}
QString primaryDns() const;
QString secondaryDns() const;
QString primaryDns();
QString secondaryDns();
// QString primaryDns() const { return m_primaryDns; }
// QString primaryDns() { return m_primaryDns; }
void setPrimaryDns(const QString &primaryDns)
{
setValue("Conf/primaryDns", primaryDns);
}
// QString secondaryDns() const { return m_secondaryDns; }
// QString secondaryDns() { return m_secondaryDns; }
void setSecondaryDns(const QString &secondaryDns)
{
setValue("Conf/secondaryDns", secondaryDns);
@@ -160,7 +160,7 @@ public:
// static constexpr char openNicNs5[] = "94.103.153.176";
// static constexpr char openNicNs13[] = "144.76.103.143";
QByteArray backupAppConfig() const
QByteArray backupAppConfig()
{
return m_settings.backupAppConfig();
}
@@ -178,7 +178,7 @@ public:
setValue("Conf/appLanguage", locale);
};
bool isScreenshotsEnabled() const
bool isScreenshotsEnabled()
{
return value("Conf/screenshotsEnabled", false).toBool();
}
@@ -193,10 +193,10 @@ signals:
void saveLogsChanged();
private:
QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
void setValue(const QString &key, const QVariant &value);
SecureQSettings m_settings;
mutable SecureQSettings m_settings;
QVariant value(const QString &key, const QVariant &defaultValue = QVariant());
void setValue(const QString &key, const QVariant &value);
};
#endif // SETTINGS_H
+71 -79
View File
@@ -946,11 +946,6 @@ Already installed containers were found on the server. All installed containers
<source>Show other methods on Github</source>
<translation>نمایش متد‎های دیگر در گیت هاب</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsAbout.qml" line="104"/>
<source>https://github.com/amnezia-vpn/amnezia-client#donate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsAbout.qml" line="113"/>
<source>Contacts</source>
@@ -1859,11 +1854,6 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<source>I have nothing</source>
<translation>من هیچی ندارم</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardStart.qml" line="138"/>
<source>https://amnezia.org/instructions/0_starter-guide</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PageSetupWizardTextKey</name>
@@ -2188,38 +2178,38 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::DeletePasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="104"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="104"/>
<source>Password entry not found</source>
<translation>Password entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="108"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="108"/>
<source>Could not decrypt data</source>
<translation>Could not decrypt data</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="585"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="593"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="552"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="560"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="614"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="578"/>
<source>Could not open wallet: %1; %2</source>
<translation>Could not open wallet: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="177"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="177"/>
<source>Password not found</source>
<translation>Password not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="173"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="173"/>
<source>Could not open keystore</source>
<translation>Could not open keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="179"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="179"/>
<source>Could not remove private key from keystore</source>
<translation>Could not remove private key from keystore</translation>
</message>
@@ -2227,12 +2217,12 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::JobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="295"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="265"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="542"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="509"/>
<source>Access to keychain denied</source>
<translation>Access to keychain denied</translation>
</message>
@@ -2240,27 +2230,27 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::PlainTextStore</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="65"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="65"/>
<source>Could not store data in settings: access error</source>
<translation>Could not store data in settings: access error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="67"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="67"/>
<source>Could not store data in settings: format error</source>
<translation>Could not store data in settings: format error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="85"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="85"/>
<source>Could not delete data from settings: access error</source>
<translation>Could not delete data from settings: access error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="87"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="87"/>
<source>Could not delete data from settings: format error</source>
<translation>Could not delete data from settings: format error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="104"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="104"/>
<source>Entry not found</source>
<translation>Entry not found</translation>
</message>
@@ -2268,80 +2258,80 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::ReadPasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="32"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="32"/>
<source>Password entry not found</source>
<translation>Password entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="36"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="139"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="36"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="139"/>
<source>Could not decrypt data</source>
<translation>Could not decrypt data</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="205"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="178"/>
<source>D-Bus is not running</source>
<translation>D-Bus is not running</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="214"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="224"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="187"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="197"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="316"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="286"/>
<source>No keychain service available</source>
<translation>No keychain service available</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="318"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="288"/>
<source>Could not open wallet: %1; %2</source>
<translation>Could not open wallet: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="363"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="333"/>
<source>Access to keychain denied</source>
<translation>Access to keychain denied</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="384"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="354"/>
<source>Could not determine data type: %1; %2</source>
<translation>Could not determine data type: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="393"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="52"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="363"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="52"/>
<source>Entry not found</source>
<translation>Entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="402"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="372"/>
<source>Unsupported entry type &apos;Map&apos;</source>
<translation>Unsupported entry type &apos;Map&apos;</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="405"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="375"/>
<source>Unknown kwallet entry type &apos;%1&apos;</source>
<translation>Unknown kwallet entry type &apos;%1&apos;</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="96"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="96"/>
<source>Password not found</source>
<translation>Password not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="60"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="60"/>
<source>Could not open keystore</source>
<translation>Could not open keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="68"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="68"/>
<source>Could not retrieve private key from keystore</source>
<translation>Could not retrieve private key from keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="75"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="75"/>
<source>Could not create decryption cipher</source>
<translation>Could not create decryption cipher</translation>
</message>
@@ -2349,73 +2339,73 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::WritePasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="78"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="78"/>
<source>Credential size exceeds maximum size of %1</source>
<translation>Credential size exceeds maximum size of %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="87"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="87"/>
<source>Credential key exceeds maximum size of %1</source>
<translation>Credential key exceeds maximum size of %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="92"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="92"/>
<source>Writing credentials failed: Win32 error code %1</source>
<translation>Writing credentials failed: Win32 error code %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="162"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="162"/>
<source>Encryption failed</source>
<translation>Encryption failed</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="445"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="415"/>
<source>D-Bus is not running</source>
<translation>D-Bus is not running</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="455"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="482"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="425"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="452"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="501"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="468"/>
<source>Could not open wallet: %1; %2</source>
<translation>Could not open wallet: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="144"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="144"/>
<source>Password not found</source>
<translation>Password not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="95"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="95"/>
<source>Could not open keystore</source>
<translation>Could not open keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="124"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="124"/>
<source>Could not create private key generator</source>
<translation>Could not create private key generator</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="131"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="131"/>
<source>Could not generate new private key</source>
<translation>Could not generate new private key</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="139"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="139"/>
<source>Could not retrieve private key from keystore</source>
<translation>Could not retrieve private key from keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="147"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="147"/>
<source>Could not create encryption cipher</source>
<translation>Could not create encryption cipher</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="155"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="155"/>
<source>Could not encrypt data</source>
<translation>Could not encrypt data</translation>
</message>
@@ -2865,72 +2855,74 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<translation>سرویس Sftp</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/libsecret.cpp" line="119"/>
<location filename="../3rd/qtkeychain/libsecret.cpp" line="119"/>
<source>Entry not found</source>
<translation>Entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="255"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="225"/>
<source>Access to keychain denied</source>
<translation>Access to keychain denied</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="257"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="227"/>
<source>No keyring daemon</source>
<translation>No keyring daemon</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="259"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="229"/>
<source>Already unlocked</source>
<translation>Already unlocked</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="261"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="231"/>
<source>No such keyring</source>
<translation>No such keyring</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="263"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="233"/>
<source>Bad arguments</source>
<translation>Bad arguments</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="265"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="235"/>
<source>I/O error</source>
<translation>I/O error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="267"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="237"/>
<source>Cancelled</source>
<translation>Cancelled</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="269"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="239"/>
<source>Keyring already exists</source>
<translation>Keyring already exists</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="271"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="241"/>
<source>No match</source>
<translation>No match</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="276"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="246"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="72"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="72"/>
<source>error 0x%1: %2</source>
<translation>error 0x%1: %2</translation>
</message>
<message>
<location filename="../3rd/wireguard-tools/contrib/highlighter/gui/highlight.cpp" line="39"/>
<source>WireGuard Configuration Highlighter</source>
<translation type="vanished">هایلایتر پیکربندی WireGuard</translation>
<translation>هایلایتر پیکربندی WireGuard</translation>
</message>
<message>
<location filename="../3rd/wireguard-tools/contrib/highlighter/gui/highlight.cpp" line="82"/>
<source>&amp;Randomize colors</source>
<translation type="vanished">رنگ‎های تصادفی</translation>
<translation>رنگ‎های تصادفی</translation>
</message>
</context>
<context>
@@ -2944,13 +2936,13 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<context>
<name>Settings</name>
<message>
<location filename="../settings.cpp" line="30"/>
<location filename="../settings.cpp" line="26"/>
<source>Server #1</source>
<translation>Server #1</translation>
</message>
<message>
<location filename="../settings.cpp" line="206"/>
<location filename="../settings.cpp" line="213"/>
<location filename="../settings.cpp" line="202"/>
<location filename="../settings.cpp" line="209"/>
<source>Server</source>
<translation>Server</translation>
</message>
@@ -2958,22 +2950,22 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<context>
<name>SettingsController</name>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="26"/>
<location filename="../ui/controllers/settingsController.cpp" line="25"/>
<source>Software version</source>
<translation>نسخه نرم‎افزار</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="139"/>
<location filename="../ui/controllers/settingsController.cpp" line="137"/>
<source>All settings have been reset to default values</source>
<translation>تمام تنظیمات به مقادیر پیش فرض ریست شد</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="145"/>
<location filename="../ui/controllers/settingsController.cpp" line="143"/>
<source>Cached profiles cleared</source>
<translation>پروفایل ذخیره شده پاک شد</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="123"/>
<location filename="../ui/controllers/settingsController.cpp" line="122"/>
<source>Backup file is corrupted</source>
<translation>فایل بک‎آپ خراب شده است</translation>
</message>
+95 -113
View File
@@ -15,13 +15,15 @@
<context>
<name>AndroidController</name>
<message>
<location filename="../platforms/android/android_controller.cpp" line="236"/>
<source>AmneziaVPN</source>
<translation type="vanished">AmneziaVPN</translation>
<translation>AmneziaVPN</translation>
</message>
<message>
<location filename="../platforms/android/android_controller.cpp" line="239"/>
<source>VPN Connected</source>
<extracomment>Refers to the app - which is currently running the background and waiting</extracomment>
<translation type="vanished">VPN Подключен</translation>
<translation>VPN Подключен</translation>
</message>
</context>
<context>
@@ -149,7 +151,7 @@
<context>
<name>ImportController</name>
<message>
<location filename="../ui/controllers/importController.cpp" line="411"/>
<location filename="../ui/controllers/importController.cpp" line="435"/>
<source>Scanned %1 of %2.</source>
<translation>Отсканировано %1 из%2.</translation>
</message>
@@ -944,11 +946,6 @@ Already installed containers were found on the server. All installed containers
<source>Show other methods on Github</source>
<translation>Показать другие способы на Github</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsAbout.qml" line="104"/>
<source>https://github.com/amnezia-vpn/amnezia-client#donate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsAbout.qml" line="113"/>
<source>Contacts</source>
@@ -1431,22 +1428,22 @@ Already installed containers were found on the server. All installed containers
<translation>Имя сервера</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="111"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="110"/>
<source>Save</source>
<translation>Сохранить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="142"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="137"/>
<source>Protocols</source>
<translation>Протоколы</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="148"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="143"/>
<source>Services</source>
<translation>Сервисы</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="152"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="147"/>
<source>Data</source>
<translation>Данные</translation>
</message>
@@ -1857,11 +1854,6 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<source>I have nothing</source>
<translation>У меня ничего нет</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardStart.qml" line="138"/>
<source>https://amnezia.org/instructions/0_starter-guide</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PageSetupWizardTextKey</name>
@@ -1949,8 +1941,8 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="vanished">Доступ к управлению сервером. Пользователь, с которым вы делитесь полным доступом к соединению, сможет добавлять и удалять ваши протоколы и службы на сервере, а также изменять настройки.</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="279"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="280"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="281"/>
<source>Server</source>
<translation>Сервер</translation>
</message>
@@ -2025,7 +2017,7 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="231"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="486"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="483"/>
<source>Users</source>
<translation type="unfinished">Пользователи</translation>
</message>
@@ -2035,52 +2027,47 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="unfinished">Имя пользователя</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="502"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="499"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="584"/>
<source>Creation date: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="598"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="595"/>
<source>Rename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="627"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="624"/>
<source>Client name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="636"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="632"/>
<source>Save</source>
<translation type="unfinished">Сохранить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="668"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="660"/>
<source>Revoke</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="671"/>
<source>Revoke the config for a user - %1?</source>
<location filename="../ui/qml/Pages2/PageShare.qml" line="663"/>
<source>Revoke the config for a user - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="672"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="664"/>
<source>The user will no longer be able to connect to your server.</source>
<translation type="unfinished">Пользователь больше не сможет подключаться к вашему серверу</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="673"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="665"/>
<source>Continue</source>
<translation type="unfinished">Продолжить</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="674"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="666"/>
<source>Cancel</source>
<translation type="unfinished">Отменить</translation>
</message>
@@ -2094,20 +2081,20 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation>Поделиться доступом к VPN, без возможности управления сервером</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="331"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="332"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="333"/>
<source>Protocol</source>
<translation>Протокол</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="429"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="430"/>
<source>Connection format</source>
<translation>Формат подключения</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="186"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="469"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="468"/>
<source>Share</source>
<translation>Поделиться</translation>
</message>
@@ -2137,12 +2124,12 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="unfinished">Сервер</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="100"/>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="102"/>
<source>Accessing </source>
<translation type="unfinished">Доступ </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="101"/>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="103"/>
<source>File with accessing settings to </source>
<translation type="unfinished"></translation>
</message>
@@ -2173,38 +2160,38 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::DeletePasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="104"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="104"/>
<source>Password entry not found</source>
<translation>Password entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="108"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="108"/>
<source>Could not decrypt data</source>
<translation>Could not decrypt data</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="585"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="593"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="552"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="560"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="614"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="578"/>
<source>Could not open wallet: %1; %2</source>
<translation>Could not open wallet: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="177"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="177"/>
<source>Password not found</source>
<translation>Password not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="173"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="173"/>
<source>Could not open keystore</source>
<translation>Could not open keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="179"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="179"/>
<source>Could not remove private key from keystore</source>
<translation>Could not remove private key from keystore</translation>
</message>
@@ -2212,12 +2199,12 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::JobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="295"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="265"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="542"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="509"/>
<source>Access to keychain denied</source>
<translation>Access to keychain denied</translation>
</message>
@@ -2225,27 +2212,27 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::PlainTextStore</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="65"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="65"/>
<source>Could not store data in settings: access error</source>
<translation>Could not store data in settings: access error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="67"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="67"/>
<source>Could not store data in settings: format error</source>
<translation>Could not store data in settings: format error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="85"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="85"/>
<source>Could not delete data from settings: access error</source>
<translation>Could not delete data from settings: access error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="87"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="87"/>
<source>Could not delete data from settings: format error</source>
<translation>Could not delete data from settings: format error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="104"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="104"/>
<source>Entry not found</source>
<translation>Entry not found</translation>
</message>
@@ -2253,80 +2240,80 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::ReadPasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="32"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="32"/>
<source>Password entry not found</source>
<translation>Password entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="36"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="139"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="36"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="139"/>
<source>Could not decrypt data</source>
<translation>Could not decrypt data</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="205"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="178"/>
<source>D-Bus is not running</source>
<translation>D-Bus is not running</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="214"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="224"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="187"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="197"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="316"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="286"/>
<source>No keychain service available</source>
<translation>No keychain service available</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="318"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="288"/>
<source>Could not open wallet: %1; %2</source>
<translation>Could not open wallet: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="363"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="333"/>
<source>Access to keychain denied</source>
<translation>Access to keychain denied</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="384"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="354"/>
<source>Could not determine data type: %1; %2</source>
<translation>Could not determine data type: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="393"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="52"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="363"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="52"/>
<source>Entry not found</source>
<translation>Entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="402"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="372"/>
<source>Unsupported entry type &apos;Map&apos;</source>
<translation>Unsupported entry type &apos;Map&apos;</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="405"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="375"/>
<source>Unknown kwallet entry type &apos;%1&apos;</source>
<translation>Unknown kwallet entry type &apos;%1&apos;</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="96"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="96"/>
<source>Password not found</source>
<translation>Password not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="60"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="60"/>
<source>Could not open keystore</source>
<translation>Could not open keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="68"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="68"/>
<source>Could not retrieve private key from keystore</source>
<translation>Could not retrieve private key from keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="75"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="75"/>
<source>Could not create decryption cipher</source>
<translation>Could not create decryption cipher</translation>
</message>
@@ -2334,73 +2321,73 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::WritePasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="78"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="78"/>
<source>Credential size exceeds maximum size of %1</source>
<translation>Credential size exceeds maximum size of %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="87"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="87"/>
<source>Credential key exceeds maximum size of %1</source>
<translation>Credential key exceeds maximum size of %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="92"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="92"/>
<source>Writing credentials failed: Win32 error code %1</source>
<translation>Writing credentials failed: Win32 error code %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="162"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="162"/>
<source>Encryption failed</source>
<translation>Encryption failed</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="445"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="415"/>
<source>D-Bus is not running</source>
<translation>D-Bus is not running</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="455"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="482"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="425"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="452"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="501"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="468"/>
<source>Could not open wallet: %1; %2</source>
<translation>Could not open wallet: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="144"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="144"/>
<source>Password not found</source>
<translation>Password not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="95"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="95"/>
<source>Could not open keystore</source>
<translation>Could not open keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="124"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="124"/>
<source>Could not create private key generator</source>
<translation>Could not create private key generator</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="131"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="131"/>
<source>Could not generate new private key</source>
<translation>Could not generate new private key</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="139"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="139"/>
<source>Could not retrieve private key from keystore</source>
<translation>Could not retrieve private key from keystore</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="147"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="147"/>
<source>Could not create encryption cipher</source>
<translation>Could not create encryption cipher</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="155"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="155"/>
<source>Could not encrypt data</source>
<translation>Could not encrypt data</translation>
</message>
@@ -2607,12 +2594,7 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation>VPN pool error: no available addresses</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="63"/>
<source>VPN connection error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="67"/>
<location filename="../core/errorstrings.cpp" line="64"/>
<source>Internal error</source>
<translation>Internal error</translation>
</message>
@@ -2840,62 +2822,62 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<translation>Сервис SFTP</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/libsecret.cpp" line="119"/>
<location filename="../3rd/qtkeychain/libsecret.cpp" line="119"/>
<source>Entry not found</source>
<translation>Entry not found</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="255"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="225"/>
<source>Access to keychain denied</source>
<translation>Access to keychain denied</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="257"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="227"/>
<source>No keyring daemon</source>
<translation>No keyring daemon</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="259"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="229"/>
<source>Already unlocked</source>
<translation>Already unlocked</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="261"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="231"/>
<source>No such keyring</source>
<translation>No such keyring</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="263"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="233"/>
<source>Bad arguments</source>
<translation>Bad arguments</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="265"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="235"/>
<source>I/O error</source>
<translation>I/O error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="267"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="237"/>
<source>Cancelled</source>
<translation>Cancelled</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="269"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="239"/>
<source>Keyring already exists</source>
<translation>Keyring already exists</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="271"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="241"/>
<source>No match</source>
<translation>No match</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="276"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="246"/>
<source>Unknown error</source>
<translation>Unknown error</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="72"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="72"/>
<source>error 0x%1: %2</source>
<translation>error 0x%1: %2</translation>
</message>
@@ -2911,13 +2893,13 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<context>
<name>Settings</name>
<message>
<location filename="../settings.cpp" line="30"/>
<location filename="../settings.cpp" line="26"/>
<source>Server #1</source>
<translation>Server #1</translation>
</message>
<message>
<location filename="../settings.cpp" line="206"/>
<location filename="../settings.cpp" line="213"/>
<location filename="../settings.cpp" line="202"/>
<location filename="../settings.cpp" line="209"/>
<source>Server</source>
<translation>Server</translation>
</message>
@@ -2925,22 +2907,22 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<context>
<name>SettingsController</name>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="26"/>
<location filename="../ui/controllers/settingsController.cpp" line="25"/>
<source>Software version</source>
<translation>Версия ПО</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="139"/>
<location filename="../ui/controllers/settingsController.cpp" line="137"/>
<source>All settings have been reset to default values</source>
<translation>Все настройки были сброшены к значению &quot;По умолчанию&quot;</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="145"/>
<location filename="../ui/controllers/settingsController.cpp" line="143"/>
<source>Cached profiles cleared</source>
<translation>Кэш профиля очищен</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="123"/>
<location filename="../ui/controllers/settingsController.cpp" line="122"/>
<source>Backup file is corrupted</source>
<translation>Backup файл поврежден</translation>
</message>
@@ -3072,7 +3054,7 @@ This means that AmneziaWG keeps the fast performance of the original while addin
<context>
<name>VpnConnection</name>
<message>
<location filename="../vpnconnection.cpp" line="432"/>
<location filename="../vpnconnection.cpp" line="429"/>
<source>Mbps</source>
<translation>Mbps</translation>
</message>
+98 -112
View File
@@ -11,9 +11,15 @@
<context>
<name>AndroidController</name>
<message>
<location filename="../platforms/android/android_controller.cpp" line="236"/>
<source>AmneziaVPN</source>
<translation></translation>
</message>
<message>
<location filename="../platforms/android/android_controller.cpp" line="239"/>
<source>VPN Connected</source>
<extracomment>Refers to the app - which is currently running the background and waiting</extracomment>
<translation type="vanished">VPN已连接</translation>
<translation>VPN已连接</translation>
</message>
</context>
<context>
@@ -152,7 +158,7 @@
<context>
<name>ImportController</name>
<message>
<location filename="../ui/controllers/importController.cpp" line="411"/>
<location filename="../ui/controllers/importController.cpp" line="435"/>
<source>Scanned %1 of %2.</source>
<translation>扫描 %1 of %2.</translation>
</message>
@@ -991,11 +997,6 @@ And if you don&apos;t like the app, all the more support it - the donation will
<source>Show other methods on Github</source>
<translation>其他捐款途径</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsAbout.qml" line="104"/>
<source>https://github.com/amnezia-vpn/amnezia-client#donate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsAbout.qml" line="113"/>
<source>Contacts</source>
@@ -1510,22 +1511,22 @@ And if you don&apos;t like the app, all the more support it - the donation will
<translation>服务器名</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="111"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="110"/>
<source>Save</source>
<translation>保存</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="142"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="137"/>
<source>Protocols</source>
<translation>协议</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="148"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="143"/>
<source>Services</source>
<translation>服务</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="152"/>
<location filename="../ui/qml/Pages2/PageSettingsServerInfo.qml" line="147"/>
<source>Data</source>
<translation>数据</translation>
</message>
@@ -1956,11 +1957,6 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<source>I have nothing</source>
<translation>我没有</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardStart.qml" line="138"/>
<source>https://amnezia.org/instructions/0_starter-guide</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PageSetupWizardTextKey</name>
@@ -2082,7 +2078,7 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="231"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="486"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="483"/>
<source>Users</source>
<translation type="unfinished"></translation>
</message>
@@ -2092,52 +2088,47 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation>共享 VPN 访问,无需管理服务器</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="502"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="499"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="584"/>
<source>Creation date: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="598"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="595"/>
<source>Rename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="627"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="624"/>
<source>Client name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="636"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="632"/>
<source>Save</source>
<translation type="unfinished">保存</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="668"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="660"/>
<source>Revoke</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="671"/>
<source>Revoke the config for a user - %1?</source>
<location filename="../ui/qml/Pages2/PageShare.qml" line="663"/>
<source>Revoke the config for a user - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="672"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="664"/>
<source>The user will no longer be able to connect to your server.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="673"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="665"/>
<source>Continue</source>
<translation type="unfinished">继续</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="674"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="666"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
</message>
@@ -2179,8 +2170,8 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="obsolete">服务器</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="279"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="280"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="281"/>
<source>Server</source>
<translation>服务器</translation>
</message>
@@ -2202,8 +2193,8 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="obsolete">协议</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="331"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="332"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="333"/>
<source>Protocol</source>
<translation>协议</translation>
</message>
@@ -2223,14 +2214,14 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="428"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="429"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="430"/>
<source>Connection format</source>
<translation>连接格式</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShare.qml" line="186"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="469"/>
<location filename="../ui/qml/Pages2/PageShare.qml" line="468"/>
<source>Share</source>
<translation>共享</translation>
</message>
@@ -2260,12 +2251,12 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="unfinished">服务器</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="100"/>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="102"/>
<source>Accessing </source>
<translation type="unfinished">访问</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="101"/>
<location filename="../ui/qml/Pages2/PageShareFullAccess.qml" line="103"/>
<source>File with accessing settings to </source>
<translation type="unfinished">访问配置文件的内容为:</translation>
</message>
@@ -2296,38 +2287,38 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::DeletePasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="104"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="104"/>
<source>Password entry not found</source>
<translation>未发现秘密</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="108"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="108"/>
<source>Could not decrypt data</source>
<translation>数据无法加密</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="585"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="593"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="552"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="560"/>
<source>Unknown error</source>
<translation>未知错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="614"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="578"/>
<source>Could not open wallet: %1; %2</source>
<translation>无法打开钱包: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="177"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="177"/>
<source>Password not found</source>
<translation>未发现密码</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="173"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="173"/>
<source>Could not open keystore</source>
<translation>无法打开密钥库</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="179"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="179"/>
<source>Could not remove private key from keystore</source>
<translation>无法从密钥库中删除私钥</translation>
</message>
@@ -2335,12 +2326,12 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::JobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="295"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="265"/>
<source>Unknown error</source>
<translation>未知错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="542"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="509"/>
<source>Access to keychain denied</source>
<translation>访问钥匙串被拒绝</translation>
</message>
@@ -2348,27 +2339,27 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::PlainTextStore</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="65"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="65"/>
<source>Could not store data in settings: access error</source>
<translation>无法在配置中存储数据:访问错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="67"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="67"/>
<source>Could not store data in settings: format error</source>
<translation>无法在陪置中存储数据:格式错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="85"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="85"/>
<source>Could not delete data from settings: access error</source>
<translation>无法在配置中删除数据:访问错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="87"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="87"/>
<source>Could not delete data from settings: format error</source>
<translation>无法在配置中删除数据:格式错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/plaintextstore.cpp" line="104"/>
<location filename="../3rd/qtkeychain/plaintextstore.cpp" line="104"/>
<source>Entry not found</source>
<translation>未找到条目</translation>
</message>
@@ -2376,80 +2367,80 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::ReadPasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="32"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="32"/>
<source>Password entry not found</source>
<translation>未发现密码</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="36"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="139"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="36"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="139"/>
<source>Could not decrypt data</source>
<translation>数据无法加密</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="205"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="178"/>
<source>D-Bus is not running</source>
<translation>D-Bus未运行</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="214"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="224"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="187"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="197"/>
<source>Unknown error</source>
<translation>未知错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="316"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="286"/>
<source>No keychain service available</source>
<translation>没有有效的钥匙串服务</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="318"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="288"/>
<source>Could not open wallet: %1; %2</source>
<translation>无法打开钱包: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="363"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="333"/>
<source>Access to keychain denied</source>
<translation>访问钥匙串被拒绝</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="384"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="354"/>
<source>Could not determine data type: %1; %2</source>
<translation>无法确定数据类型: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="393"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="52"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="363"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="52"/>
<source>Entry not found</source>
<translation>未找到记录</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="402"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="372"/>
<source>Unsupported entry type &apos;Map&apos;</source>
<translation>不支持的记录类型 &apos;Map&apos;</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="405"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="375"/>
<source>Unknown kwallet entry type &apos;%1&apos;</source>
<translation>未知钱包类型 &apos;%1&apos;</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="96"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="96"/>
<source>Password not found</source>
<translation>未发现密码</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="60"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="60"/>
<source>Could not open keystore</source>
<translation>无法打开密钥库</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="68"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="68"/>
<source>Could not retrieve private key from keystore</source>
<translation>无法从密钥存储库中检索私钥</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="75"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="75"/>
<source>Could not create decryption cipher</source>
<translation>无法创建解密算法</translation>
</message>
@@ -2457,73 +2448,73 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<context>
<name>QKeychain::WritePasswordJobPrivate</name>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="78"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="78"/>
<source>Credential size exceeds maximum size of %1</source>
<translation>证书大小超过上限,最大为: %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="87"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="87"/>
<source>Credential key exceeds maximum size of %1</source>
<translation>凭证密钥大小超过上限,最大为: %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="92"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="92"/>
<source>Writing credentials failed: Win32 error code %1</source>
<translation>写入凭证失败,Win32错误码: %1</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_win.cpp" line="162"/>
<location filename="../3rd/qtkeychain/keychain_win.cpp" line="162"/>
<source>Encryption failed</source>
<translation>加密失败</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="445"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="415"/>
<source>D-Bus is not running</source>
<translation>D-Bus未运行</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="455"/>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="482"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="425"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="452"/>
<source>Unknown error</source>
<translation>未知错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="501"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="468"/>
<source>Could not open wallet: %1; %2</source>
<translation>无法打开钱包: %1; %2</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="144"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="144"/>
<source>Password not found</source>
<translation>未发现密码</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="95"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="95"/>
<source>Could not open keystore</source>
<translation>无法打开密钥库</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="124"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="124"/>
<source>Could not create private key generator</source>
<translation>无法创建私钥生成器</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="131"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="131"/>
<source>Could not generate new private key</source>
<translation>无法生成新的私钥</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="139"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="139"/>
<source>Could not retrieve private key from keystore</source>
<translation>无法从密钥库检索私钥</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="147"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="147"/>
<source>Could not create encryption cipher</source>
<translation>无法创建加密密码</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_android.cpp" line="155"/>
<location filename="../3rd/qtkeychain/keychain_android.cpp" line="155"/>
<source>Could not encrypt data</source>
<translation>无法加密数据</translation>
</message>
@@ -2675,11 +2666,6 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<source>Sftp error: No media was in remote drive</source>
<translation>Sftp 错误: 远程驱动器中没有媒介</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="63"/>
<source>VPN connection error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to save config to disk</source>
<translation type="vanished">配置保存到磁盘失败</translation>
@@ -2744,7 +2730,7 @@ and will not be shared or disclosed to the Amnezia or any third parties</source>
<translation type="vanished">该配置不包含任何用于连接到服务器的容器和凭据。</translation>
</message>
<message>
<location filename="../core/errorstrings.cpp" line="67"/>
<location filename="../core/errorstrings.cpp" line="64"/>
<source>Internal error</source>
<translation>内部错误</translation>
</message>
@@ -2984,62 +2970,62 @@ While it offers a blend of security, stability, and speed, it&apos;s essential t
<translation>Sftp 文件共享服务 - 安全的 FTP 服务</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/libsecret.cpp" line="119"/>
<location filename="../3rd/qtkeychain/libsecret.cpp" line="119"/>
<source>Entry not found</source>
<translation>未找到记录</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="255"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="225"/>
<source>Access to keychain denied</source>
<translation>访问钥匙串被拒绝</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="257"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="227"/>
<source>No keyring daemon</source>
<translation>没有密钥环守护进程</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="259"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="229"/>
<source>Already unlocked</source>
<translation>已经解锁</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="261"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="231"/>
<source>No such keyring</source>
<translation>没有这样的密钥环</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="263"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="233"/>
<source>Bad arguments</source>
<translation>错误参数</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="265"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="235"/>
<source>I/O error</source>
<translation>I/O错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="267"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="237"/>
<source>Cancelled</source>
<translation>已取消</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="269"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="239"/>
<source>Keyring already exists</source>
<translation>密匙环已经存在</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="271"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="241"/>
<source>No match</source>
<translation>不匹配</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_unix.cpp" line="276"/>
<location filename="../3rd/qtkeychain/keychain_unix.cpp" line="246"/>
<source>Unknown error</source>
<translation>未知错误</translation>
</message>
<message>
<location filename="../3rd/qtkeychain/qtkeychain/keychain_haiku.cpp" line="72"/>
<location filename="../3rd/qtkeychain/keychain_haiku.cpp" line="72"/>
<source>error 0x%1: %2</source>
<translation>错误 0x%1: %2</translation>
</message>
@@ -3055,13 +3041,13 @@ While it offers a blend of security, stability, and speed, it&apos;s essential t
<context>
<name>Settings</name>
<message>
<location filename="../settings.cpp" line="30"/>
<location filename="../settings.cpp" line="26"/>
<source>Server #1</source>
<translation></translation>
</message>
<message>
<location filename="../settings.cpp" line="206"/>
<location filename="../settings.cpp" line="213"/>
<location filename="../settings.cpp" line="202"/>
<location filename="../settings.cpp" line="209"/>
<source>Server</source>
<translation>服务器</translation>
</message>
@@ -3069,22 +3055,22 @@ While it offers a blend of security, stability, and speed, it&apos;s essential t
<context>
<name>SettingsController</name>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="26"/>
<location filename="../ui/controllers/settingsController.cpp" line="25"/>
<source>Software version</source>
<translation>软件版本</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="123"/>
<location filename="../ui/controllers/settingsController.cpp" line="122"/>
<source>Backup file is corrupted</source>
<translation>备份文件已损坏</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="139"/>
<location filename="../ui/controllers/settingsController.cpp" line="137"/>
<source>All settings have been reset to default values</source>
<translation>所配置恢复为默认值</translation>
</message>
<message>
<location filename="../ui/controllers/settingsController.cpp" line="145"/>
<location filename="../ui/controllers/settingsController.cpp" line="143"/>
<source>Cached profiles cleared</source>
<translation>缓存的配置文件已清除</translation>
</message>
@@ -3220,7 +3206,7 @@ While it offers a blend of security, stability, and speed, it&apos;s essential t
<context>
<name>VpnConnection</name>
<message>
<location filename="../vpnconnection.cpp" line="432"/>
<location filename="../vpnconnection.cpp" line="429"/>
<source>Mbps</source>
<translation></translation>
</message>
+1 -1
View File
@@ -15,7 +15,7 @@
#include "core/errorstrings.h"
#include "systemController.h"
#ifdef Q_OS_ANDROID
#include "platforms/android/android_utils.h"
#include "platforms/android/androidutils.h"
#endif
#include "qrcodegen.hpp"
+1 -1
View File
@@ -7,7 +7,7 @@
#endif
#ifdef Q_OS_ANDROID
#include "platforms/android/android_utils.h"
#include "../../platforms/android/androidutils.h"
#include <QJniObject>
#endif
#if defined Q_OS_MAC
+2 -4
View File
@@ -7,20 +7,19 @@
#include "ui/qautostart.h"
#include "version.h"
#ifdef Q_OS_ANDROID
#include "platforms/android/android_utils.h"
#include "../../platforms/android/android_controller.h"
#include "../../platforms/android/androidutils.h"
#include <QJniObject>
#endif
SettingsController::SettingsController(const QSharedPointer<ServersModel> &serversModel,
const QSharedPointer<ContainersModel> &containersModel,
const QSharedPointer<LanguageModel> &languageModel,
const QSharedPointer<SitesModel> &sitesModel,
const std::shared_ptr<Settings> &settings, QObject *parent)
: QObject(parent),
m_serversModel(serversModel),
m_containersModel(containersModel),
m_languageModel(languageModel),
m_sitesModel(sitesModel),
m_settings(settings)
{
m_appVersion = QString("%1: %2 (%3)").arg(tr("Software version"), QString(APP_VERSION), __DATE__);
@@ -135,7 +134,6 @@ void SettingsController::clearSettings()
m_serversModel->resetModel();
m_languageModel->changeLanguage(
static_cast<LanguageSettings::AvailableLanguageEnum>(m_languageModel->getCurrentLanguageIndex()));
m_sitesModel->setRouteMode(Settings::RouteMode::VpnAllSites);
emit changeSettingsFinished(tr("All settings have been reset to default values"));
}
@@ -6,7 +6,6 @@
#include "ui/models/containers_model.h"
#include "ui/models/languageModel.h"
#include "ui/models/servers_model.h"
#include "ui/models/sites_model.h"
class SettingsController : public QObject
{
@@ -15,7 +14,6 @@ public:
explicit SettingsController(const QSharedPointer<ServersModel> &serversModel,
const QSharedPointer<ContainersModel> &containersModel,
const QSharedPointer<LanguageModel> &languageModel,
const QSharedPointer<SitesModel> &sitesModel,
const std::shared_ptr<Settings> &settings, QObject *parent = nullptr);
Q_PROPERTY(QString primaryDns READ getPrimaryDns WRITE setPrimaryDns NOTIFY primaryDnsChanged)
@@ -78,7 +76,6 @@ private:
QSharedPointer<ServersModel> m_serversModel;
QSharedPointer<ContainersModel> m_containersModel;
QSharedPointer<LanguageModel> m_languageModel;
QSharedPointer<SitesModel> m_sitesModel;
std::shared_ptr<Settings> m_settings;
QString m_appVersion;
+14 -5
View File
@@ -60,11 +60,6 @@ QString SystemController::getFileName(const QString &acceptLabel, const QString
const QString &selectedFile, const bool isSaveMode, const QString &defaultSuffix)
{
QString fileName;
#ifdef Q_OS_ANDROID
Q_ASSERT(!isSaveMode);
return AndroidController::instance()->openFile(nameFilter);
#endif
#ifdef Q_OS_IOS
MobileUtils mobileUtils;
@@ -113,6 +108,20 @@ QString SystemController::getFileName(const QString &acceptLabel, const QString
}
fileName = mainFileDialog->property("selectedFile").toString();
#ifdef Q_OS_ANDROID
// patch for files containing spaces etc
const QString sep { "raw%3A%2F" };
if (fileName.startsWith("content://") && fileName.contains(sep)) {
QString contentUrl = fileName.split(sep).at(0);
QString rawUrl = fileName.split(sep).at(1);
rawUrl.replace(" ", "%20");
fileName = contentUrl + sep + rawUrl;
}
return fileName;
#endif
return QUrl(fileName).toLocalFile();
}
+1 -1
View File
@@ -231,7 +231,7 @@ ErrorCode ClientManagementModel::appendClient(const QString &clientId, const QSt
}
}
beginInsertRows(QModelIndex(), rowCount(), rowCount() + 1);
beginInsertRows(QModelIndex(), rowCount(), 1);
QJsonObject client;
client[configKey::clientId] = clientId;
-5
View File
@@ -15,10 +15,6 @@ ServersModel::ServersModel(std::shared_ptr<Settings> settings, QObject *parent)
auto defaultContainer = ContainerProps::containerFromString(m_servers.at(serverIndex).toObject().value(config_key::defaultContainer).toString());
emit ServersModel::defaultContainerChanged(defaultContainer);
});
connect(this, &ServersModel::currentlyProcessedServerIndexChanged, this, [this](const int serverIndex) {
auto defaultContainer = ContainerProps::containerFromString(m_servers.at(serverIndex).toObject().value(config_key::defaultContainer).toString());
emit ServersModel::defaultContainerChanged(defaultContainer);
});
}
int ServersModel::rowCount(const QModelIndex &parent) const
@@ -273,7 +269,6 @@ void ServersModel::removeServer()
if (m_settings->serversCount() == 0) {
setDefaultServerIndex(-1);
}
setCurrentlyProcessedServerIndex(m_defaultServerIndex);
endResetModel();
}
@@ -26,22 +26,6 @@ ListView {
id: containersRadioButtonGroup
}
Connections {
target: ServersModel
function onCurrentlyProcessedServerIndexChanged() {
menuContent.checkCurrentItem()
}
}
function checkCurrentItem() {
var item = menuContent.itemAtIndex(currentIndex)
if (item !== null) {
var radioButton = item.children[0].children[0]
radioButton.checked = true
}
}
delegate: Item {
implicitWidth: rootWidth
implicitHeight: content.implicitHeight
-1
View File
@@ -31,7 +31,6 @@ PageType {
containersDropDown.rootButtonClickedFunction()
}
}
function onForceCloseDrawer() {
buttonContent.state = "collapsed"
}
+1 -1
View File
@@ -101,7 +101,7 @@ PageType {
text: qsTr("Show other methods on Github")
onClicked: Qt.openUrlExternally(qsTr("https://github.com/amnezia-vpn/amnezia-client#donate"))
onClicked: Qt.openUrlExternally("https://github.com/amnezia-vpn/amnezia-client#donate")
}
ParagraphTextType {
@@ -42,7 +42,6 @@ PageType {
function onInstallServerFinished(finishedMessage) {
if (!ConnectionController.isConnected) {
ServersModel.setDefaultServerIndex(ServersModel.getServersCount() - 1);
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
}
PageController.goToStartPage()
@@ -135,7 +135,7 @@ PageType {
text: qsTr("I have nothing")
onClicked: Qt.openUrlExternally(qsTr("https://amnezia.org/instructions/0_starter-guide"))
onClicked: Qt.openUrlExternally("https://amnezia.org/instructions/0_starter-guide")
}
}
@@ -26,7 +26,6 @@ PageType {
function onImportFinished() {
if (!ConnectionController.isConnected) {
ServersModel.setDefaultServerIndex(ServersModel.getServersCount() - 1);
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
}
PageController.goToStartPage()
-3
View File
@@ -65,7 +65,6 @@ void VpnConnection::onConnectionStateChanged(Vpn::ConnectionState state)
IpcClient::Interface()->flushDns();
if (m_settings->routeMode() != Settings::VpnAllSites) {
qDebug() << "1";
IpcClient::Interface()->routeDeleteList(m_vpnProtocol->vpnGateway(), QStringList() << "0.0.0.0");
// qDebug() << "VpnConnection::onConnectionStateChanged :: adding custom routes, count:" << forwardIps.size();
}
@@ -75,11 +74,9 @@ void VpnConnection::onConnectionStateChanged(Vpn::ConnectionState state)
IpcClient::Interface()->routeAddList(m_vpnProtocol->vpnGateway(), QStringList() << dns1 << dns2);
if (m_settings->routeMode() == Settings::VpnOnlyForwardSites) {
qDebug() << "2";
QTimer::singleShot(1000, m_vpnProtocol.data(),
[this]() { addSitesRoutes(m_vpnProtocol->vpnGateway(), m_settings->routeMode()); });
} else if (m_settings->routeMode() == Settings::VpnAllExceptSites) {
qDebug() << "3";
IpcClient::Interface()->routeAddList(m_vpnProtocol->vpnGateway(), QStringList() << "0.0.0.0/1");
IpcClient::Interface()->routeAddList(m_vpnProtocol->vpnGateway(), QStringList() << "128.0.0.0/1");