mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-09 03:43:55 +03:00
Compare commits
9 Commits
text/debug
...
feature/ov
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48379245a5 | ||
|
|
9df1363463 | ||
|
|
eb2d0491be | ||
|
|
a3e4d89a86 | ||
|
|
ed10774eed | ||
|
|
dd7362ad6f | ||
|
|
e9f6b95853 | ||
|
|
6a03eead3f | ||
|
|
9d456dc18e |
@@ -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/"
|
||||
)
|
||||
|
||||
Submodule client/3rd-prebuilt updated: e568e7d0e8...b4156d4d09
2
client/3rd/qtkeychain
vendored
2
client/3rd/qtkeychain
vendored
Submodule client/3rd/qtkeychain updated: 74776e2a3e...8bbaa6d830
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
#include <QDebug>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
|
||||
#include "managementserver.h"
|
||||
|
||||
ManagementServer::ManagementServer(QObject *parent) : QObject(parent),
|
||||
m_tcpServer(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ManagementServer::~ManagementServer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool ManagementServer::isOpen() const
|
||||
{
|
||||
return (m_socket && m_socket->isOpen());
|
||||
}
|
||||
|
||||
void ManagementServer::stop()
|
||||
{
|
||||
if (m_tcpServer) m_tcpServer->close();
|
||||
}
|
||||
|
||||
void ManagementServer::onAcceptError(QAbstractSocket::SocketError socketError)
|
||||
{
|
||||
qDebug().noquote() << QString("Accept error: %1").arg(socketError);
|
||||
}
|
||||
|
||||
qint64 ManagementServer::writeCommand(const QString& message)
|
||||
{
|
||||
if (!isOpen()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const QString command = message + "\n";
|
||||
qint64 bytesWritten = m_socket->write(command.toStdString().c_str());
|
||||
m_socket->flush();
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
void ManagementServer::onNewConnection()
|
||||
{
|
||||
qDebug() << "New incoming connection";
|
||||
|
||||
m_socket = QPointer<QTcpSocket>(m_tcpServer->nextPendingConnection());
|
||||
if (m_tcpServer) m_tcpServer->close();
|
||||
|
||||
QObject::connect(m_socket.data(), &QTcpSocket::disconnected, this, &ManagementServer::onSocketDisconnected);
|
||||
QObject::connect(m_socket.data(), &QTcpSocket::errorOccurred, this, &ManagementServer::onSocketError);
|
||||
QObject::connect(m_socket.data(), &QTcpSocket::readyRead, this, &ManagementServer::onReadyRead);
|
||||
}
|
||||
|
||||
void ManagementServer::onSocketError(QAbstractSocket::SocketError socketError)
|
||||
{
|
||||
Q_UNUSED(socketError)
|
||||
qDebug().noquote() << QString("Management server error: %1").arg(m_socket->errorString());
|
||||
}
|
||||
|
||||
void ManagementServer::onSocketDisconnected()
|
||||
{
|
||||
if (m_socket) m_socket->deleteLater();
|
||||
}
|
||||
|
||||
QPointer<QTcpSocket> ManagementServer::socket() const
|
||||
{
|
||||
if (!isOpen()) {
|
||||
return nullptr;
|
||||
}
|
||||
return m_socket;
|
||||
}
|
||||
|
||||
void ManagementServer::onReadyRead()
|
||||
{
|
||||
emit readyRead();
|
||||
}
|
||||
|
||||
bool ManagementServer::start(const QString& host, unsigned int port)
|
||||
{
|
||||
if (m_tcpServer) m_tcpServer->close();
|
||||
|
||||
m_tcpServer = QSharedPointer<QTcpServer>(new QTcpServer(this), [](QTcpServer *s){
|
||||
if (s) s->deleteLater();
|
||||
});
|
||||
m_tcpServer->setMaxPendingConnections(1);
|
||||
|
||||
connect(m_tcpServer.data(), SIGNAL(acceptError(QAbstractSocket::SocketError)), this, SLOT(onAcceptError(QAbstractSocket::SocketError)));
|
||||
connect(m_tcpServer.data(), SIGNAL(newConnection()), this, SLOT(onNewConnection()));
|
||||
|
||||
if (m_tcpServer->listen(QHostAddress(host), port)) {
|
||||
emit serverStarted();
|
||||
return true;
|
||||
}
|
||||
|
||||
qDebug().noquote() << QString("Can't start TCP server, %1,%2")
|
||||
.arg(m_tcpServer->serverError())
|
||||
.arg(m_tcpServer->errorString());
|
||||
return false;
|
||||
}
|
||||
|
||||
QString ManagementServer::readLine()
|
||||
{
|
||||
if (!isOpen()) {
|
||||
qDebug() << "Socket is not opened";
|
||||
return QString();
|
||||
}
|
||||
|
||||
return m_socket->readLine();
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
#ifndef MANAGEMENTSERVER_H
|
||||
#define MANAGEMENTSERVER_H
|
||||
|
||||
#include <QAbstractSocket>
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
|
||||
class QTcpServer;
|
||||
class QTcpSocket;
|
||||
|
||||
class ManagementServer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ManagementServer(QObject *parent = nullptr);
|
||||
~ManagementServer();
|
||||
|
||||
bool start(const QString& host, unsigned int port);
|
||||
void stop();
|
||||
bool isOpen() const;
|
||||
|
||||
QString readLine();
|
||||
qint64 writeCommand(const QString& message);
|
||||
|
||||
QPointer<QTcpSocket> socket() const;
|
||||
|
||||
signals:
|
||||
void readyRead();
|
||||
void serverStarted();
|
||||
|
||||
protected slots:
|
||||
void onAcceptError(QAbstractSocket::SocketError socketError);
|
||||
void onNewConnection();
|
||||
void onReadyRead();
|
||||
void onSocketDisconnected();
|
||||
void onSocketError(QAbstractSocket::SocketError socketError);
|
||||
|
||||
protected:
|
||||
QSharedPointer<QTcpServer> m_tcpServer;
|
||||
QPointer<QTcpSocket> m_socket;
|
||||
};
|
||||
|
||||
#endif // MANAGEMENTSERVER_H
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
client/platforms/android/androidutils.cpp
Normal file
183
client/platforms/android/androidutils.cpp
Normal 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
client/platforms/android/androidutils.h
Normal file
49
client/platforms/android/androidutils.h
Normal 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
|
||||
@@ -22,6 +22,8 @@ OpenVpnOverCloakProtocol::~OpenVpnOverCloakProtocol()
|
||||
|
||||
ErrorCode OpenVpnOverCloakProtocol::start()
|
||||
{
|
||||
|
||||
#if 0
|
||||
if (!QFileInfo::exists(cloakExecPath())) {
|
||||
setLastError(ErrorCode::CloakExecutableMissing);
|
||||
return lastError();
|
||||
@@ -77,10 +79,12 @@ ErrorCode OpenVpnOverCloakProtocol::start()
|
||||
|
||||
if (m_ckProcess.state() == QProcess::ProcessState::Running) {
|
||||
setConnectionState(Vpn::ConnectionState::Connecting);
|
||||
|
||||
#endif
|
||||
return OpenVpnProtocol::start();
|
||||
#if 0
|
||||
}
|
||||
else return ErrorCode::CloakExecutableMissing;
|
||||
#endif
|
||||
}
|
||||
|
||||
void OpenVpnOverCloakProtocol::stop()
|
||||
@@ -90,16 +94,6 @@ void OpenVpnOverCloakProtocol::stop()
|
||||
|
||||
qDebug() << "OpenVpnOverCloakProtocol::stop()";
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
Utils::signalCtrl(m_ckProcess.processId(), CTRL_C_EVENT);
|
||||
#endif
|
||||
|
||||
m_ckProcess.terminate();
|
||||
|
||||
if (Utils::processIsRunning(Utils::executable("ck-client", false))) {
|
||||
QThread::msleep(1000);
|
||||
Utils::killProcessByName(Utils::executable("ck-client", false));
|
||||
}
|
||||
}
|
||||
|
||||
QString OpenVpnOverCloakProtocol::cloakExecPath()
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
#include "utilities.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
OpenVpnProtocol::OpenVpnProtocol(const QJsonObject &configuration, QObject *parent) : VpnProtocol(configuration, parent)
|
||||
{
|
||||
readOpenVpnConfiguration(configuration);
|
||||
connect(&m_managementServer, &ManagementServer::readyRead, this,
|
||||
&OpenVpnProtocol::onReadyReadDataFromManagementServer);
|
||||
}
|
||||
|
||||
OpenVpnProtocol::~OpenVpnProtocol()
|
||||
@@ -25,7 +24,6 @@ OpenVpnProtocol::~OpenVpnProtocol()
|
||||
|
||||
QString OpenVpnProtocol::defaultConfigFileName()
|
||||
{
|
||||
// qDebug() << "OpenVpnProtocol::defaultConfigFileName" << defaultConfigPath() + QString("/%1.ovpn").arg(APPLICATION_NAME);
|
||||
return defaultConfigPath() + QString("/%1.ovpn").arg(APPLICATION_NAME);
|
||||
}
|
||||
|
||||
@@ -33,25 +31,20 @@ QString OpenVpnProtocol::defaultConfigPath()
|
||||
{
|
||||
QString p = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/config";
|
||||
Utils::initializePath(p);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::stop()
|
||||
{
|
||||
qDebug() << "OpenVpnProtocol::stop()";
|
||||
setConnectionState(Vpn::ConnectionState::Disconnecting);
|
||||
|
||||
// TODO: need refactoring
|
||||
// sendTermSignal() will even return true while server connected ???
|
||||
if ((m_connectionState == Vpn::ConnectionState::Preparing) || (m_connectionState == Vpn::ConnectionState::Connecting)
|
||||
|| (m_connectionState == Vpn::ConnectionState::Connected)
|
||||
|| (m_connectionState == Vpn::ConnectionState::Reconnecting)) {
|
||||
if (!sendTermSignal()) {
|
||||
killOpenVpnProcess();
|
||||
}
|
||||
QThread::msleep(10);
|
||||
m_managementServer.stop();
|
||||
QThread::msleep(10);
|
||||
}
|
||||
setConnectionState(Vpn::ConnectionState::Disconnected);
|
||||
}
|
||||
@@ -86,9 +79,30 @@ void OpenVpnProtocol::readOpenVpnConfiguration(const QJsonObject &configuration)
|
||||
{
|
||||
if (configuration.contains(ProtocolProps::key_proto_config_data(Proto::OpenVpn))) {
|
||||
QJsonObject jConfig = configuration.value(ProtocolProps::key_proto_config_data(Proto::OpenVpn)).toObject();
|
||||
|
||||
QString plainConfig = jConfig.value(config_key::config).toString().toUtf8();
|
||||
if (configuration.contains(ProtocolProps::key_proto_config_data(Proto::Cloak))) {
|
||||
QJsonObject cloakConfig = configuration.value(ProtocolProps::key_proto_config_data(Proto::Cloak)).toObject();
|
||||
cloakConfig["NumConn"] = 1;
|
||||
cloakConfig["ProxyMethod"] = "openvpn";
|
||||
if (cloakConfig.contains("port")) {
|
||||
int portValue = cloakConfig.value("port").toInt();
|
||||
cloakConfig.remove("port");
|
||||
cloakConfig["RemotePort"] = portValue;
|
||||
}
|
||||
if (cloakConfig.contains("remote")) {
|
||||
QString hostValue = cloakConfig.value("remote").toString();
|
||||
cloakConfig.remove("remote");
|
||||
cloakConfig["RemoteHost"] = hostValue;
|
||||
}
|
||||
plainConfig += "\n<cloak>\n";
|
||||
QJsonDocument Doc(cloakConfig);
|
||||
QByteArray ba = Doc.toJson();
|
||||
QString plainCloak = ba;
|
||||
plainConfig += QString::fromLatin1(plainCloak.toUtf8().toBase64().data());
|
||||
plainConfig += "\n</cloak>\n";
|
||||
}
|
||||
m_configFile.open();
|
||||
m_configFile.write(jConfig.value(config_key::config).toString().toUtf8());
|
||||
m_configFile.write(plainConfig.toUtf8());
|
||||
m_configFile.close();
|
||||
m_configFileName = m_configFile.fileName();
|
||||
|
||||
@@ -98,60 +112,69 @@ void OpenVpnProtocol::readOpenVpnConfiguration(const QJsonObject &configuration)
|
||||
|
||||
bool OpenVpnProtocol::openVpnProcessIsRunning() const
|
||||
{
|
||||
return Utils::processIsRunning("openvpn");
|
||||
return Utils::processIsRunning("ovpncli");
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::disconnectFromManagementServer()
|
||||
{
|
||||
m_managementServer.stop();
|
||||
}
|
||||
|
||||
QString OpenVpnProtocol::configPath() const
|
||||
{
|
||||
return m_configFileName;
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::sendManagementCommand(const QString &command)
|
||||
{
|
||||
QIODevice *device = dynamic_cast<QIODevice *>(m_managementServer.socket().data());
|
||||
if (device) {
|
||||
QTextStream stream(device);
|
||||
stream << command << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
uint OpenVpnProtocol::selectMgmtPort()
|
||||
{
|
||||
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
quint32 port = QRandomGenerator::global()->generate();
|
||||
port = (double)(65000 - 15001) * port / UINT32_MAX + 15001;
|
||||
|
||||
QTcpServer s;
|
||||
bool ok = s.listen(QHostAddress::LocalHost, port);
|
||||
if (ok)
|
||||
return port;
|
||||
}
|
||||
|
||||
return m_managementPort;
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::updateRouteGateway(QString line)
|
||||
{
|
||||
// TODO: fix for macos
|
||||
line = line.split("ROUTE_GATEWAY", Qt::SkipEmptyParts).at(1);
|
||||
if (!line.contains("/"))
|
||||
return;
|
||||
m_routeGateway = line.split("/", Qt::SkipEmptyParts).first();
|
||||
m_routeGateway.replace(" ", "");
|
||||
qDebug() << "Set VPN route gateway" << m_routeGateway;
|
||||
const QString substr = "sitnl_route_best_gw result: via ";
|
||||
int start = line.indexOf(substr) + substr.size();
|
||||
int end = line.indexOf(" dev ", start);
|
||||
|
||||
m_routeGateway = line.mid(start, (end-start));
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::handle_cli_message(QString message)
|
||||
{
|
||||
QString line = message;
|
||||
|
||||
if (line.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (line.contains("EVENT: CONNECTED")) {
|
||||
setConnectionState(Vpn::ConnectionState::Connected);
|
||||
} else if (line.contains("EXITING")) {
|
||||
// openVpnStateSigTermHandler();
|
||||
setConnectionState(Vpn::ConnectionState::Disconnecting);
|
||||
} else if (line.contains("RECONNECTING")) {
|
||||
setConnectionState(Vpn::ConnectionState::Reconnecting);
|
||||
}
|
||||
|
||||
if (line.contains("sitnl_route_best_gw")) {
|
||||
updateRouteGateway(line);
|
||||
}
|
||||
|
||||
if (line.contains("[ifconfig]")) {
|
||||
updateVpnGateway(line);
|
||||
}
|
||||
|
||||
// TODO: SET CORRECT STRING
|
||||
if (line.contains("FATAL")) {
|
||||
if (line.contains("tap-windows6 adapters on this system are currently in use or disabled")) {
|
||||
emit protocolError(ErrorCode::OpenVpnAdaptersInUseError);
|
||||
} else {
|
||||
emit protocolError(ErrorCode::OpenVpnUnknownError);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
ErrorCode OpenVpnProtocol::start()
|
||||
{
|
||||
// qDebug() << "Start OpenVPN connection";
|
||||
OpenVpnProtocol::stop();
|
||||
|
||||
qDebug() << " Utils::openVpnExecPath();" << Utils::openVpnExecPath();
|
||||
|
||||
if (!QFileInfo::exists(Utils::openVpnExecPath())) {
|
||||
setLastError(ErrorCode::OpenVpnExecutableMissing);
|
||||
return lastError();
|
||||
@@ -184,23 +207,11 @@ ErrorCode OpenVpnProtocol::start()
|
||||
}
|
||||
#endif
|
||||
|
||||
// QString vpnLogFileNamePath = Utils::systemLogPath() + "/openvpn.log";
|
||||
// Utils::createEmptyFile(vpnLogFileNamePath);
|
||||
|
||||
uint mgmtPort = selectMgmtPort();
|
||||
qDebug() << "OpenVpnProtocol::start mgmt port selected:" << mgmtPort;
|
||||
|
||||
if (!m_managementServer.start(m_managementHost, mgmtPort)) {
|
||||
setLastError(ErrorCode::OpenVpnManagementServerError);
|
||||
return lastError();
|
||||
}
|
||||
|
||||
setConnectionState(Vpn::ConnectionState::Connecting);
|
||||
|
||||
m_openVpnProcess = IpcClient::CreatePrivilegedProcess();
|
||||
|
||||
if (!m_openVpnProcess) {
|
||||
// qWarning() << "IpcProcess replica is not created!";
|
||||
qWarning() << "IpcProcess replica is not created!";
|
||||
setLastError(ErrorCode::AmneziaServiceConnectionFailed);
|
||||
return ErrorCode::AmneziaServiceConnectionFailed;
|
||||
}
|
||||
@@ -212,122 +223,100 @@ ErrorCode OpenVpnProtocol::start()
|
||||
return ErrorCode::AmneziaServiceConnectionFailed;
|
||||
}
|
||||
m_openVpnProcess->setProgram(PermittedProcess::OpenVPN);
|
||||
QStringList arguments({
|
||||
"--config", configPath(), "--management", m_managementHost, QString::number(mgmtPort),
|
||||
"--management-client" /*, "--log", vpnLogFileNamePath */
|
||||
QStringList arguments({ configPath()/*, "--management", m_managementHost, QString::number(mgmtPort),
|
||||
"--management-client" *//*, "--log", vpnLogFileNamePath */
|
||||
});
|
||||
m_openVpnProcess->setArguments(arguments);
|
||||
|
||||
qDebug() << arguments.join(" ");
|
||||
connect(m_openVpnProcess.data(), &PrivilegedProcess::errorOccurred,
|
||||
[&](QProcess::ProcessError error) { qDebug() << "PrivilegedProcess errorOccurred" << error; });
|
||||
[&](QProcess::ProcessError error) {
|
||||
qDebug() << "PrivilegedProcess errorOccurred" << error;
|
||||
setConnectionState(Vpn::ConnectionState::Disconnected);
|
||||
});
|
||||
|
||||
connect(m_openVpnProcess.data(), &PrivilegedProcess::stateChanged,
|
||||
[&](QProcess::ProcessState newState) { qDebug() << "PrivilegedProcess stateChanged" << newState; });
|
||||
connect(m_openVpnProcess.data(), &PrivilegedProcess::stateChanged, [&](QProcess::ProcessState newState) {
|
||||
switch ( newState )
|
||||
{
|
||||
case QProcess::Starting:
|
||||
setConnectionState(Vpn::ConnectionState::Connecting);
|
||||
break;
|
||||
case QProcess::Running:
|
||||
setConnectionState(Vpn::ConnectionState::Connecting);
|
||||
break;
|
||||
default:
|
||||
setConnectionState(Vpn::ConnectionState::Disconnected);
|
||||
}
|
||||
qDebug() << "PrivilegedProcess stateChanged" << newState;
|
||||
});
|
||||
|
||||
connect(m_openVpnProcess.data(), &PrivilegedProcess::finished, this,
|
||||
[&]() { setConnectionState(Vpn::ConnectionState::Disconnected); });
|
||||
|
||||
m_openVpnProcess->start();
|
||||
|
||||
// startTimeoutTimer();
|
||||
connect(m_openVpnProcess.data(), &PrivilegedProcess::readyRead, this, [&] {
|
||||
|
||||
QRemoteObjectPendingReply<QByteArray> call = m_openVpnProcess->readAll();
|
||||
auto *watcher = new QRemoteObjectPendingCallWatcher(call, this);
|
||||
|
||||
auto *timeoutTimer = new QTimer(this);
|
||||
timeoutTimer->setSingleShot(true);
|
||||
m_watchers.insert(watcher, timeoutTimer);
|
||||
|
||||
connect(timeoutTimer, &QTimer::timeout, this, [this, watcher, timeoutTimer]() {
|
||||
qDebug() << "Foo request timed out.";
|
||||
|
||||
m_watchers.remove(watcher);
|
||||
watcher->deleteLater();
|
||||
timeoutTimer->deleteLater();
|
||||
});
|
||||
|
||||
connect(watcher, &QRemoteObjectPendingCallWatcher::finished, [this](QRemoteObjectPendingCallWatcher *self) {
|
||||
QTimer *timer = m_watchers.take(self);
|
||||
if (timer) {
|
||||
timer->stop();
|
||||
timer->deleteLater();
|
||||
}
|
||||
|
||||
QByteArray result = self->returnValue().toByteArray();
|
||||
handle_cli_message(QString(result));
|
||||
self->deleteLater();
|
||||
});
|
||||
|
||||
timeoutTimer->start(30000);
|
||||
|
||||
});
|
||||
|
||||
connect(m_openVpnProcess.data(), QOverload<int, QProcess::ExitStatus>::of(&PrivilegedProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
|
||||
qDebug().noquote() << "OpenVPN finished, exitCode, exiStatus" << exitCode << exitStatus;
|
||||
setConnectionState(Vpn::ConnectionState::Disconnected);
|
||||
if (exitStatus != QProcess::NormalExit) {
|
||||
emit protocolError(amnezia::ErrorCode::ShadowSocksExecutableCrashed);
|
||||
stop();
|
||||
}
|
||||
if (exitCode !=0 ) {
|
||||
emit protocolError(amnezia::ErrorCode::InternalError);
|
||||
stop();
|
||||
}
|
||||
});
|
||||
|
||||
m_openVpnProcess->start();
|
||||
|
||||
return ErrorCode::NoError;
|
||||
}
|
||||
|
||||
bool OpenVpnProtocol::sendTermSignal()
|
||||
{
|
||||
return m_managementServer.writeCommand("signal SIGTERM");
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::sendByteCount()
|
||||
{
|
||||
m_managementServer.writeCommand("bytecount 1");
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::sendInitialData()
|
||||
{
|
||||
m_managementServer.writeCommand("state on");
|
||||
m_managementServer.writeCommand("log on");
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::onReadyReadDataFromManagementServer()
|
||||
{
|
||||
for (;;) {
|
||||
QString line = m_managementServer.readLine().simplified();
|
||||
|
||||
if (line.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!line.contains(">BYTECOUNT")) {
|
||||
qDebug().noquote() << line;
|
||||
}
|
||||
|
||||
if (line.contains(">INFO:OpenVPN Management Interface")) {
|
||||
sendInitialData();
|
||||
} else if (line.startsWith(">STATE")) {
|
||||
if (line.contains("CONNECTED,SUCCESS")) {
|
||||
sendByteCount();
|
||||
stopTimeoutTimer();
|
||||
setConnectionState(Vpn::ConnectionState::Connected);
|
||||
continue;
|
||||
} else if (line.contains("EXITING,SIGTER")) {
|
||||
// openVpnStateSigTermHandler();
|
||||
setConnectionState(Vpn::ConnectionState::Disconnecting);
|
||||
continue;
|
||||
} else if (line.contains("RECONNECTING")) {
|
||||
setConnectionState(Vpn::ConnectionState::Reconnecting);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (line.contains("ROUTE_GATEWAY")) {
|
||||
updateRouteGateway(line);
|
||||
}
|
||||
|
||||
if (line.contains("PUSH: Received control message")) {
|
||||
updateVpnGateway(line);
|
||||
}
|
||||
|
||||
if (line.contains("FATAL")) {
|
||||
if (line.contains("tap-windows6 adapters on this system are currently in use or disabled")) {
|
||||
emit protocolError(ErrorCode::OpenVpnAdaptersInUseError);
|
||||
} else {
|
||||
emit protocolError(ErrorCode::OpenVpnUnknownError);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray data(line.toStdString().c_str());
|
||||
if (data.contains(">BYTECOUNT:")) {
|
||||
int beg = data.lastIndexOf(">BYTECOUNT:");
|
||||
int end = data.indexOf("\n", beg);
|
||||
|
||||
beg += sizeof(">BYTECOUNT:") - 1;
|
||||
QList<QByteArray> count = data.mid(beg, end - beg + 1).split(',');
|
||||
|
||||
quint64 r = static_cast<quint64>(count.at(0).trimmed().toULongLong());
|
||||
quint64 s = static_cast<quint64>(count.at(1).trimmed().toULongLong());
|
||||
|
||||
setBytesChanged(r, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OpenVpnProtocol::updateVpnGateway(const QString &line)
|
||||
{
|
||||
// line looks like
|
||||
// PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.1,topology net30,ping 10,ping-restart
|
||||
// 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-GCM'
|
||||
|
||||
QStringList params = line.split(",");
|
||||
for (const QString &l : params) {
|
||||
if (l.contains("ifconfig")) {
|
||||
// "[ifconfig] [10.8.0.14] [10.8.0.13]"
|
||||
QStringList params = line.split("\n");
|
||||
for (const QString ¶m : params) {
|
||||
if (param.contains("ifconfig")) {
|
||||
QString l = param.right(param.size() - param.indexOf("ifconfig"));
|
||||
if (l.split(" ").size() == 3) {
|
||||
m_vpnLocalAddress = l.split(" ").at(1);
|
||||
m_vpnLocalAddress.remove("[");m_vpnLocalAddress.remove("]");
|
||||
m_vpnGateway = l.split(" ").at(2);
|
||||
|
||||
m_vpnGateway.remove("[");m_vpnGateway.remove("]");
|
||||
qDebug() << QString("Set vpn local address %1, gw %2").arg(m_vpnLocalAddress).arg(vpnGateway());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
|
||||
#include "managementserver.h"
|
||||
#include "vpnprotocol.h"
|
||||
|
||||
#include "core/ipcclient.h"
|
||||
@@ -25,28 +24,21 @@ public:
|
||||
static QString defaultConfigFileName();
|
||||
static QString defaultConfigPath();
|
||||
|
||||
protected slots:
|
||||
void onReadyReadDataFromManagementServer();
|
||||
|
||||
private:
|
||||
QString configPath() const;
|
||||
bool openVpnProcessIsRunning() const;
|
||||
bool sendTermSignal();
|
||||
void readOpenVpnConfiguration(const QJsonObject &configuration);
|
||||
void disconnectFromManagementServer();
|
||||
void handle_cli_message(QString message);
|
||||
void killOpenVpnProcess();
|
||||
void sendByteCount();
|
||||
void sendInitialData();
|
||||
void sendManagementCommand(const QString& command);
|
||||
|
||||
const QString m_managementHost = "127.0.0.1";
|
||||
const unsigned int m_managementPort = 57775;
|
||||
|
||||
ManagementServer m_managementServer;
|
||||
QHash<QRemoteObjectPendingCallWatcher*, QTimer*> m_watchers;
|
||||
QString m_configFileName;
|
||||
QTemporaryFile m_configFile;
|
||||
|
||||
uint selectMgmtPort();
|
||||
|
||||
private:
|
||||
void updateRouteGateway(QString line);
|
||||
|
||||
@@ -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 'Map'</source>
|
||||
<translation>Unsupported entry type 'Map'</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 '%1'</source>
|
||||
<translation>Unknown kwallet entry type '%1'</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>&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>
|
||||
|
||||
@@ -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 'Map'</source>
|
||||
<translation>Unsupported entry type 'Map'</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 '%1'</source>
|
||||
<translation>Unknown kwallet entry type '%1'</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>Все настройки были сброшены к значению "По умолчанию"</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>
|
||||
|
||||
@@ -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'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'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 'Map'</source>
|
||||
<translation>不支持的记录类型 'Map'</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 '%1'</source>
|
||||
<translation>未知钱包类型 '%1'</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'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'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'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'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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,7 +31,6 @@ PageType {
|
||||
containersDropDown.rootButtonClickedFunction()
|
||||
}
|
||||
}
|
||||
|
||||
function onForceCloseDrawer() {
|
||||
buttonContent.state = "collapsed"
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ PageType {
|
||||
function onInstallServerFinished(finishedMessage) {
|
||||
if (!ConnectionController.isConnected) {
|
||||
ServersModel.setDefaultServerIndex(ServersModel.getServersCount() - 1);
|
||||
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
|
||||
}
|
||||
|
||||
PageController.goToStartPage()
|
||||
|
||||
@@ -26,7 +26,6 @@ PageType {
|
||||
function onImportFinished() {
|
||||
if (!ConnectionController.isConnected) {
|
||||
ServersModel.setDefaultServerIndex(ServersModel.getServersCount() - 1);
|
||||
ServersModel.currentlyProcessedIndex = ServersModel.defaultIndex
|
||||
}
|
||||
|
||||
PageController.goToStartPage()
|
||||
|
||||
@@ -226,13 +226,13 @@ QStringList Utils::summarizeRoutes(const QStringList &ips, const QString cidr)
|
||||
QString Utils::openVpnExecPath()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
return Utils::executable("openvpn/openvpn", true);
|
||||
return Utils::executable("openvpn/ovpncli", true);
|
||||
#elif defined Q_OS_LINUX
|
||||
// We have service that runs OpenVPN on Linux. We need to make same
|
||||
// path for client and service.
|
||||
return Utils::executable("../../client/bin/openvpn", true);
|
||||
return Utils::executable("../../client/bin/ovpncli", true);
|
||||
#else
|
||||
return Utils::executable("/openvpn", true);
|
||||
return Utils::executable("/ovpncli", true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ QString TapController::getTapInstallPath()
|
||||
|
||||
QString TapController::getOpenVpnPath()
|
||||
{
|
||||
return qApp->applicationDirPath() + "\\openvpn\\openvpn.exe";
|
||||
return qApp->applicationDirPath() + "\\openvpn\\ovpncli.exe";
|
||||
}
|
||||
|
||||
QString TapController::getTapDriverDir()
|
||||
|
||||
Reference in New Issue
Block a user