diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 220fbd79..be4d068b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -297,24 +297,24 @@ jobs: env: ANDROID_BUILD_PLATFORM: android-34 - QT_VERSION: 6.6.2 + QT_VERSION: 6.7.2 QT_MODULES: 'qtremoteobjects qt5compat qtimageformats qtshadertools' PROD_AGW_PUBLIC_KEY: ${{ secrets.PROD_AGW_PUBLIC_KEY }} steps: - name: 'Install desktop Qt' - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{ env.QT_VERSION }} host: 'linux' target: 'desktop' - arch: 'gcc_64' + arch: 'linux_gcc_64' modules: ${{ env.QT_MODULES }} dir: ${{ runner.temp }} extra: '--external 7z --base ${{ env.QT_MIRROR }}' - name: 'Install android_x86_64 Qt' - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{ env.QT_VERSION }} host: 'linux' @@ -325,7 +325,7 @@ jobs: extra: '--external 7z --base ${{ env.QT_MIRROR }}' - name: 'Install android_x86 Qt' - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{ env.QT_VERSION }} host: 'linux' @@ -336,7 +336,7 @@ jobs: extra: '--external 7z --base ${{ env.QT_MIRROR }}' - name: 'Install android_armv7 Qt' - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{ env.QT_VERSION }} host: 'linux' @@ -347,7 +347,7 @@ jobs: extra: '--external 7z --base ${{ env.QT_MIRROR }}' - name: 'Install android_arm64_v8a Qt' - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{ env.QT_VERSION }} host: 'linux' diff --git a/client/3rd/qtkeychain b/client/3rd/qtkeychain index 74776e2a..7460df6a 160000 --- a/client/3rd/qtkeychain +++ b/client/3rd/qtkeychain @@ -1 +1 @@ -Subproject commit 74776e2a3e2d98d19943e0968901c5b5e04cc1bd +Subproject commit 7460df6a978669290de5b56c2d98b199b61c3f88 diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 0a155b18..6afcf114 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -27,6 +27,9 @@ add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") add_definitions(-DPROD_AGW_PUBLIC_KEY="$ENV{PROD_AGW_PUBLIC_KEY}") add_definitions(-DPROD_PROXY_STORAGE_KEY="$ENV{PROD_PROXY_STORAGE_KEY}") +add_definitions(-DDEV_AGW_PUBLIC_KEY="$ENV{DEV_AGW_PUBLIC_KEY}") +add_definitions(-DDEV_AGW_ENDPOINT="$ENV{DEV_AGW_ENDPOINT}") + if(IOS) set(PACKAGES ${PACKAGES} Multimedia) endif() @@ -110,6 +113,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/3rdparty.cmake) include_directories( ${CMAKE_CURRENT_LIST_DIR}/../ipc + ${CMAKE_CURRENT_LIST_DIR}/../common/logger ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) @@ -131,7 +135,6 @@ set(HEADERS ${HEADERS} ${CMAKE_CURRENT_LIST_DIR}/protocols/protocols_defs.h ${CMAKE_CURRENT_LIST_DIR}/protocols/qml_register_protocols.h ${CMAKE_CURRENT_LIST_DIR}/ui/pages.h - ${CMAKE_CURRENT_LIST_DIR}/ui/property_helper.h ${CMAKE_CURRENT_LIST_DIR}/ui/qautostart.h ${CMAKE_CURRENT_LIST_DIR}/protocols/vpnprotocol.h ${CMAKE_CURRENT_BINARY_DIR}/version.h @@ -140,6 +143,7 @@ set(HEADERS ${HEADERS} ${CMAKE_CURRENT_LIST_DIR}/core/serialization/serialization.h ${CMAKE_CURRENT_LIST_DIR}/core/serialization/transfer.h ${CMAKE_CURRENT_LIST_DIR}/core/enums/apiEnums.h + ${CMAKE_CURRENT_LIST_DIR}/../common/logger/logger.h ) # Mozilla headres @@ -190,6 +194,7 @@ set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/core/serialization/trojan.cpp ${CMAKE_CURRENT_LIST_DIR}/core/serialization/vmess.cpp ${CMAKE_CURRENT_LIST_DIR}/core/serialization/vmess_new.cpp + ${CMAKE_CURRENT_LIST_DIR}/../common/logger/logger.cpp ) # Mozilla sources diff --git a/client/amnezia_application.cpp b/client/amnezia_application.cpp index b8ce5b00..526b9fa9 100644 --- a/client/amnezia_application.cpp +++ b/client/amnezia_application.cpp @@ -164,7 +164,7 @@ void AmneziaApplication::init() bool enabled = m_settings->isSaveLogs(); #ifndef Q_OS_ANDROID if (enabled) { - if (!Logger::init()) { + if (!Logger::init(false)) { qWarning() << "Initialization of debug subsystem failed"; } } diff --git a/client/android/AndroidManifest.xml b/client/android/AndroidManifest.xml index c1c40b52..179def86 100644 --- a/client/android/AndroidManifest.xml +++ b/client/android/AndroidManifest.xml @@ -3,7 +3,6 @@ @@ -46,7 +45,7 @@ android:configChanges="uiMode|screenSize|smallestScreenSize|screenLayout|orientation|density |fontScale|layoutDirection|locale|keyboard|keyboardHidden|navigation|mcc|mnc" android:launchMode="singleInstance" - android:windowSoftInputMode="adjustResize" + android:windowSoftInputMode="stateUnchanged|adjustResize" android:exported="true"> @@ -68,9 +67,6 @@ android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --" /> - + + /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/client/android/gradlew.bat b/client/android/gradlew.bat index 93e3f59f..9d21a218 100644 --- a/client/android/gradlew.bat +++ b/client/android/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/client/android/qt/build.gradle.kts b/client/android/qt/build.gradle.kts index 139adf4f..6b1d3fd1 100644 --- a/client/android/qt/build.gradle.kts +++ b/client/android/qt/build.gradle.kts @@ -21,5 +21,5 @@ android { } dependencies { - implementation(fileTree(mapOf("dir" to "../libs", "include" to listOf("*.jar")))) + api(fileTree(mapOf("dir" to "../libs", "include" to listOf("*.jar")))) } diff --git a/client/android/res/values/styles.xml b/client/android/res/values/styles.xml index 9f4201f8..bc67beb9 100644 --- a/client/android/res/values/styles.xml +++ b/client/android/res/values/styles.xml @@ -1,6 +1,9 @@ + #FF0E0E11 diff --git a/client/android/settings.gradle.kts b/client/android/settings.gradle.kts index 5cfc8314..68426ec8 100644 --- a/client/android/settings.gradle.kts +++ b/client/android/settings.gradle.kts @@ -22,7 +22,7 @@ dependencyResolutionManagement { includeBuild("./gradle/plugins") plugins { - id("com.android.settings") version "8.2.0" + id("com.android.settings") version "8.5.2" id("settings-property-delegate") } diff --git a/client/android/src/org/amnezia/vpn/AmneziaActivity.kt b/client/android/src/org/amnezia/vpn/AmneziaActivity.kt index 8a78750b..9d1c31cb 100644 --- a/client/android/src/org/amnezia/vpn/AmneziaActivity.kt +++ b/client/android/src/org/amnezia/vpn/AmneziaActivity.kt @@ -158,6 +158,10 @@ class AmneziaActivity : QtActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Log.d(TAG, "Create Amnezia activity: $intent") + window.apply { + addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) + statusBarColor = getColor(R.color.black) + } mainScope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) val proto = mainScope.async(Dispatchers.IO) { VpnStateStore.getVpnState().vpnProto @@ -610,6 +614,14 @@ class AmneziaActivity : QtActivity() { } } + @Suppress("unused") + fun setNavigationBarColor(color: Int) { + Log.v(TAG, "Change navigation bar color: ${"#%08X".format(color)}") + mainScope.launch { + window.navigationBarColor = color + } + } + @Suppress("unused") fun minimizeApp() { Log.v(TAG, "Minimize application") @@ -684,6 +696,17 @@ class AmneziaActivity : QtActivity() { .show() } + @Suppress("unused") + fun requestAuthentication() { + Log.v(TAG, "Request authentication") + mainScope.launch { + qtInitialized.await() + Intent(this@AmneziaActivity, AuthActivity::class.java).also { + startActivity(it) + } + } + } + /** * Utils methods */ diff --git a/client/android/src/org/amnezia/vpn/AuthActivity.kt b/client/android/src/org/amnezia/vpn/AuthActivity.kt new file mode 100644 index 00000000..2593315c --- /dev/null +++ b/client/android/src/org/amnezia/vpn/AuthActivity.kt @@ -0,0 +1,97 @@ +package org.amnezia.vpn + +import android.os.Build +import android.os.Bundle +import androidx.biometric.BiometricManager +import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG +import androidx.biometric.BiometricManager.Authenticators.DEVICE_CREDENTIAL +import androidx.biometric.BiometricPrompt +import androidx.biometric.BiometricPrompt.AuthenticationResult +import androidx.core.content.ContextCompat +import androidx.fragment.app.FragmentActivity +import org.amnezia.vpn.qt.QtAndroidController +import org.amnezia.vpn.util.Log + +private const val TAG = "AuthActivity" + +private const val AUTHENTICATORS = BIOMETRIC_STRONG or DEVICE_CREDENTIAL + +class AuthActivity : FragmentActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + val biometricManager = BiometricManager.from(applicationContext) + when (biometricManager.canAuthenticate(AUTHENTICATORS)) { + BiometricManager.BIOMETRIC_SUCCESS -> { + showBiometricPrompt(biometricManager) + return + } + + BiometricManager.BIOMETRIC_STATUS_UNKNOWN -> { + Log.w(TAG, "Unknown biometric status") + showBiometricPrompt(biometricManager) + return + } + + BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED -> { + Log.e(TAG, "The specified options are incompatible with the current Android " + + "version ${Build.VERSION.SDK_INT}") + } + + BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE -> { + Log.w(TAG, "The hardware is unavailable") + } + + BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED -> { + Log.w(TAG, "No biometric or device credential is enrolled") + } + + BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE -> { + Log.w(TAG, "There is no suitable hardware") + } + + BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED -> { + Log.w(TAG, "A security vulnerability has been discovered with one or " + + "more hardware sensors") + } + } + QtAndroidController.onAuthResult(true) + finish() + } + + private fun showBiometricPrompt(biometricManager: BiometricManager) { + val executor = ContextCompat.getMainExecutor(applicationContext) + val biometricPrompt = BiometricPrompt(this, executor, + object : BiometricPrompt.AuthenticationCallback() { + override fun onAuthenticationSucceeded(result: AuthenticationResult) { + super.onAuthenticationSucceeded(result) + Log.d(TAG, "Authentication succeeded") + QtAndroidController.onAuthResult(true) + finish() + } + + override fun onAuthenticationFailed() { + super.onAuthenticationFailed() + Log.w(TAG, "Authentication failed") + } + + override fun onAuthenticationError(errorCode: Int, errString: CharSequence) { + super.onAuthenticationError(errorCode, errString) + Log.e(TAG, "Authentication error $errorCode: $errString") + QtAndroidController.onAuthResult(false) + finish() + } + }) + + + + val promptInfo = BiometricPrompt.PromptInfo.Builder() + .setAllowedAuthenticators(AUTHENTICATORS) + .setTitle("AmneziaVPN") + .setSubtitle(biometricManager.getStrings(AUTHENTICATORS)?.promptMessage) + .build() + + biometricPrompt.authenticate(promptInfo) + } +} diff --git a/client/android/src/org/amnezia/vpn/AuthHelper.java b/client/android/src/org/amnezia/vpn/AuthHelper.java deleted file mode 100644 index 940d03c2..00000000 --- a/client/android/src/org/amnezia/vpn/AuthHelper.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.amnezia.vpn; - -import android.content.Context; -import android.app.KeyguardManager; -import android.content.Intent; -import org.qtproject.qt.android.bindings.QtActivity; - - -import static android.content.Context.KEYGUARD_SERVICE; - -public class AuthHelper extends QtActivity { - - static final String TAG = "AuthHelper"; - - public static Intent getAuthIntent(Context context) { - KeyguardManager mKeyguardManager = (KeyguardManager)context.getSystemService(KEYGUARD_SERVICE); - if (mKeyguardManager.isDeviceSecure()) { - return mKeyguardManager.createConfirmDeviceCredentialIntent(null, null); - } else { - return null; - } - } - -} diff --git a/client/android/src/org/amnezia/vpn/ImportConfigActivity.kt b/client/android/src/org/amnezia/vpn/ImportConfigActivity.kt index cae7ab75..9faa30d0 100644 --- a/client/android/src/org/amnezia/vpn/ImportConfigActivity.kt +++ b/client/android/src/org/amnezia/vpn/ImportConfigActivity.kt @@ -33,10 +33,10 @@ class ImportConfigActivity : ComponentActivity() { intent?.let(::readConfig) } - override fun onNewIntent(intent: Intent?) { + override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) Log.d(TAG, "onNewIntent: $intent") - intent?.let(::readConfig) + intent.let(::readConfig) } private fun readConfig(intent: Intent) { diff --git a/client/android/src/org/amnezia/vpn/qt/QtAndroidController.kt b/client/android/src/org/amnezia/vpn/qt/QtAndroidController.kt index e382b080..4af138a2 100644 --- a/client/android/src/org/amnezia/vpn/qt/QtAndroidController.kt +++ b/client/android/src/org/amnezia/vpn/qt/QtAndroidController.kt @@ -25,5 +25,7 @@ object QtAndroidController { external fun onConfigImported(data: String) + external fun onAuthResult(result: Boolean) + external fun decodeQrCode(data: String): Boolean } \ No newline at end of file diff --git a/client/android/utils/src/main/kotlin/net/NetworkState.kt b/client/android/utils/src/main/kotlin/net/NetworkState.kt index 26d23215..b71bf393 100644 --- a/client/android/utils/src/main/kotlin/net/NetworkState.kt +++ b/client/android/utils/src/main/kotlin/net/NetworkState.kt @@ -88,7 +88,7 @@ class NetworkState( if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { connectivityManager.registerBestMatchingNetworkCallback(networkRequest, networkCallback, handler) } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - val numberAttempts = 3 + val numberAttempts = 300 var attemptCount = 0 while(true) { try { diff --git a/client/cmake/android.cmake b/client/cmake/android.cmake index 13c357bd..c96d9ab8 100644 --- a/client/cmake/android.cmake +++ b/client/cmake/android.cmake @@ -27,7 +27,6 @@ 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_utils.h - ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/authResultReceiver.h ${CMAKE_CURRENT_SOURCE_DIR}/protocols/android_vpnprotocol.h ${CMAKE_CURRENT_SOURCE_DIR}/core/installedAppsImageProvider.h ) @@ -35,7 +34,6 @@ set(HEADERS ${HEADERS} set(SOURCES ${SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_controller.cpp ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/android_utils.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/authResultReceiver.cpp ${CMAKE_CURRENT_SOURCE_DIR}/protocols/android_vpnprotocol.cpp ${CMAKE_CURRENT_SOURCE_DIR}/core/installedAppsImageProvider.cpp ) diff --git a/client/core/controllers/apiController.cpp b/client/core/controllers/apiController.cpp index 8e5f8ed5..3f8684e0 100644 --- a/client/core/controllers/apiController.cpp +++ b/client/core/controllers/apiController.cpp @@ -9,8 +9,8 @@ #include "QRsa.h" #include "amnezia_application.h" -#include "core/enums/apiEnums.h" #include "configurators/wireguard_configurator.h" +#include "core/enums/apiEnums.h" #include "version.h" namespace @@ -42,7 +42,7 @@ namespace constexpr char keyPayload[] = "key_payload"; } - const QStringList proxyStorageUrl = {""}; + const QStringList proxyStorageUrl = { "" }; ErrorCode checkErrors(const QList &sslErrors, QNetworkReply *reply) { @@ -65,7 +65,8 @@ namespace } } -ApiController::ApiController(const QString &gatewayEndpoint, QObject *parent) : QObject(parent), m_gatewayEndpoint(gatewayEndpoint) +ApiController::ApiController(const QString &gatewayEndpoint, bool isDevEnvironment, QObject *parent) + : QObject(parent), m_gatewayEndpoint(gatewayEndpoint), m_isDevEnvironment(isDevEnvironment) { } @@ -143,7 +144,7 @@ QStringList ApiController::getProxyUrls() QEventLoop wait; QList sslErrors; - QNetworkReply* reply; + QNetworkReply *reply; for (const auto &proxyStorageUrl : proxyStorageUrl) { request.setUrl(proxyStorageUrl); @@ -281,7 +282,7 @@ ErrorCode ApiController::getServicesList(QByteArray &responseBody) request.setUrl(QString("%1v1/services").arg(m_gatewayEndpoint)); - QNetworkReply* reply; + QNetworkReply *reply; reply = amnApp->manager()->get(request); QEventLoop wait; @@ -300,7 +301,8 @@ ErrorCode ApiController::getServicesList(QByteArray &responseBody) QObject::connect(reply, &QNetworkReply::finished, &wait, &QEventLoop::quit); connect(reply, &QNetworkReply::sslErrors, [this, &sslErrors](const QList &errors) { sslErrors = errors; }); wait.exec(); - if (reply->error() != QNetworkReply::NetworkError::TimeoutError && reply->error() != QNetworkReply::NetworkError::OperationCanceledError) { + if (reply->error() != QNetworkReply::NetworkError::TimeoutError + && reply->error() != QNetworkReply::NetworkError::OperationCanceledError) { break; } reply->deleteLater(); @@ -355,7 +357,7 @@ ErrorCode ApiController::getConfigForService(const QString &installationUuid, co EVP_PKEY *publicKey = nullptr; try { - QByteArray key = PROD_AGW_PUBLIC_KEY; + QByteArray key = m_isDevEnvironment ? DEV_AGW_PUBLIC_KEY : PROD_AGW_PUBLIC_KEY; QSimpleCrypto::QRsa rsa; publicKey = rsa.getPublicKeyFromByteArray(key); } catch (...) { @@ -375,7 +377,7 @@ ErrorCode ApiController::getConfigForService(const QString &installationUuid, co requestBody[configKey::keyPayload] = QString(encryptedKeyPayload.toBase64()); requestBody[configKey::apiPayload] = QString(encryptedApiPayload.toBase64()); - QNetworkReply* reply = manager.post(request, QJsonDocument(requestBody).toJson()); + QNetworkReply *reply = manager.post(request, QJsonDocument(requestBody).toJson()); QEventLoop wait; connect(reply, &QNetworkReply::finished, &wait, &QEventLoop::quit); @@ -395,7 +397,8 @@ ErrorCode ApiController::getConfigForService(const QString &installationUuid, co QObject::connect(reply, &QNetworkReply::finished, &wait, &QEventLoop::quit); connect(reply, &QNetworkReply::sslErrors, [this, &sslErrors](const QList &errors) { sslErrors = errors; }); wait.exec(); - if (reply->error() != QNetworkReply::NetworkError::TimeoutError && reply->error() != QNetworkReply::NetworkError::OperationCanceledError) { + if (reply->error() != QNetworkReply::NetworkError::TimeoutError + && reply->error() != QNetworkReply::NetworkError::OperationCanceledError) { break; } reply->deleteLater(); diff --git a/client/core/controllers/apiController.h b/client/core/controllers/apiController.h index 6cfde983..a094233b 100644 --- a/client/core/controllers/apiController.h +++ b/client/core/controllers/apiController.h @@ -14,7 +14,7 @@ class ApiController : public QObject Q_OBJECT public: - explicit ApiController(const QString &gatewayEndpoint, QObject *parent = nullptr); + explicit ApiController(const QString &gatewayEndpoint, bool isDevEnvironment, QObject *parent = nullptr); public slots: void updateServerConfigFromApi(const QString &installationUuid, const int serverIndex, QJsonObject serverConfig); @@ -44,6 +44,7 @@ private: QString m_gatewayEndpoint; QStringList m_proxyUrls; + bool m_isDevEnvironment; }; #endif // APICONTROLLER_H diff --git a/client/core/controllers/serverController.cpp b/client/core/controllers/serverController.cpp index 233d66d4..9a745e3d 100644 --- a/client/core/controllers/serverController.cpp +++ b/client/core/controllers/serverController.cpp @@ -83,7 +83,6 @@ ErrorCode ServerController::runScript(const ServerCredentials &credentials, QStr } qDebug().noquote() << lineToExec; - Logger::appendSshLog("Run command:" + lineToExec); error = m_sshClient.executeCommand(lineToExec, cbReadStdOut, cbReadStdErr); if (error != ErrorCode::NoError) { @@ -100,7 +99,6 @@ ErrorCode ServerController::runContainerScript(const ServerCredentials &credenti const std::function &cbReadStdErr) { QString fileName = "/opt/amnezia/" + Utils::getRandomString(16) + ".sh"; - Logger::appendSshLog("Run container script for " + ContainerProps::containerToString(container) + ":\n" + script); ErrorCode e = uploadTextFileToContainer(container, credentials, script, fileName); if (e) diff --git a/client/logger.h b/client/logger.h deleted file mode 100644 index 0dcbd35c..00000000 --- a/client/logger.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef LOGGER_H -#define LOGGER_H - -#include -#include -#include -#include -#include - -#include "ui/property_helper.h" - -#include "mozilla/shared/loglevel.h" - -class Logger : public QObject -{ - Q_OBJECT - AUTO_PROPERTY(QString, sshLog) - AUTO_PROPERTY(QString, allLog) - -public: - static Logger& Instance(); - - static void appendSshLog(const QString &log); - static void appendAllLog(const QString &log); - - - static bool init(); - static void deInit(); - static bool setServiceLogsEnabled(bool enabled); - static bool openLogsFolder(); - static bool openServiceLogsFolder(); - static QString appLogFileNamePath(); - static void clearLogs(); - static void clearServiceLogs(); - static void cleanUp(); - - static QString userLogsFilePath(); - static QString getLogFile(); - - // compat with Mozilla logger - Logger(const QString &className) { m_className = className; } - const QString& className() const { return m_className; } - - class Log { - public: - Log(Logger* logger, LogLevel level); - ~Log(); - - Log& operator<<(uint64_t t); - Log& operator<<(const char* t); - Log& operator<<(const QString& t); - Log& operator<<(const QStringList& t); - Log& operator<<(const QByteArray& t); - Log& operator<<(const QJsonObject& t); - Log& operator<<(QTextStreamFunction t); - Log& operator<<(const void* t); - - // Q_ENUM - template - typename std::enable_if::Value, Log&>::type - operator<<(T t) { - const QMetaObject* meta = qt_getEnumMetaObject(t); - const char* name = qt_getEnumName(t); - addMetaEnum(typename QFlags::Int(t), meta, name); - return *this; - } - - private: - void addMetaEnum(quint64 value, const QMetaObject* meta, const char* name); - - Logger* m_logger; - LogLevel m_logLevel; - - struct Data { - Data() : m_ts(&m_buffer, QIODevice::WriteOnly) {} - - QString m_buffer; - QTextStream m_ts; - }; - - Data* m_data; - }; - - Log error(); - Log warning(); - Log info(); - Log debug(); - QString sensitive(const QString& input); - -private: - Logger() {} - Logger(Logger const &) = delete; - Logger& operator= (Logger const&) = delete; - - static QString userLogsDir(); - - static QFile m_file; - static QTextStream m_textStream; - static QString m_logFileName; - - friend void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg); - - // compat with Mozilla logger - QString m_className; -}; - -#endif // LOGGER_H diff --git a/client/platforms/android/android_controller.cpp b/client/platforms/android/android_controller.cpp index c9ee3cfd..2790eb1b 100644 --- a/client/platforms/android/android_controller.cpp +++ b/client/platforms/android/android_controller.cpp @@ -98,6 +98,7 @@ bool AndroidController::initialize() {"onStatisticsUpdate", "(JJ)V", reinterpret_cast(onStatisticsUpdate)}, {"onFileOpened", "(Ljava/lang/String;)V", reinterpret_cast(onFileOpened)}, {"onConfigImported", "(Ljava/lang/String;)V", reinterpret_cast(onConfigImported)}, + {"onAuthResult", "(Z)V", reinterpret_cast(onAuthResult)}, {"decodeQrCode", "(Ljava/lang/String;)Z", reinterpret_cast(decodeQrCode)} }; @@ -210,6 +211,11 @@ void AndroidController::setScreenshotsEnabled(bool enabled) callActivityMethod("setScreenshotsEnabled", "(Z)V", enabled); } +void AndroidController::setNavigationBarColor(unsigned int color) +{ + callActivityMethod("setNavigationBarColor", "(I)V", color); +} + void AndroidController::minimizeApp() { callActivityMethod("minimizeApp", "()V"); @@ -265,6 +271,22 @@ void AndroidController::requestNotificationPermission() callActivityMethod("requestNotificationPermission", "()V"); } +bool AndroidController::requestAuthentication() +{ + QEventLoop wait; + bool result; + connect(this, &AndroidController::authenticationResult, this, + [&result, &wait](const bool &authResult){ + qDebug() << "Android authentication result:" << authResult; + result = authResult; + wait.quit(); + }, + static_cast(Qt::QueuedConnection | Qt::SingleShotConnection)); + callActivityMethod("requestAuthentication", "()V"); + wait.exec(); + return result; +} + // Moving log processing to the Android side jclass AndroidController::log; jmethodID AndroidController::logDebug; @@ -462,6 +484,14 @@ void AndroidController::onConfigImported(JNIEnv *env, jobject thiz, jstring data emit AndroidController::instance()->configImported(AndroidUtils::convertJString(env, data)); } +// static +void AndroidController::onAuthResult(JNIEnv *env, jobject thiz, jboolean result) +{ + Q_UNUSED(thiz); + + emit AndroidController::instance()->authenticationResult(result); +} + // static bool AndroidController::decodeQrCode(JNIEnv *env, jobject thiz, jstring data) { diff --git a/client/platforms/android/android_controller.h b/client/platforms/android/android_controller.h index 1041c31f..759c9c3f 100644 --- a/client/platforms/android/android_controller.h +++ b/client/platforms/android/android_controller.h @@ -41,11 +41,13 @@ public: void exportLogsFile(const QString &fileName); void clearLogs(); void setScreenshotsEnabled(bool enabled); + void setNavigationBarColor(unsigned int color); void minimizeApp(); QJsonArray getAppList(); QPixmap getAppIcon(const QString &package, QSize *size, const QSize &requestedSize); bool isNotificationPermissionGranted(); void requestNotificationPermission(); + bool requestAuthentication(); static bool initLogging(); static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message); @@ -63,6 +65,7 @@ signals: void configImported(QString config); void importConfigFromOutside(QString config); void initConnectionState(Vpn::ConnectionState state); + void authenticationResult(bool result); private: bool isWaitingStatus = true; @@ -89,6 +92,7 @@ private: 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 void onAuthResult(JNIEnv *env, jobject thiz, jboolean result); static bool decodeQrCode(JNIEnv *env, jobject thiz, jstring data); template diff --git a/client/platforms/android/authResultReceiver.cpp b/client/platforms/android/authResultReceiver.cpp deleted file mode 100644 index 21e838a2..00000000 --- a/client/platforms/android/authResultReceiver.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "authResultReceiver.h" - -AuthResultReceiver::AuthResultReceiver(QSharedPointer ¬ifier) : m_notifier(notifier) -{ -} - -void AuthResultReceiver::handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data) -{ - qDebug() << "receiverRequestCode" << receiverRequestCode << "resultCode" << resultCode; - - if (resultCode == -1) { // ResultOK - emit m_notifier->authSuccessful(); - } else { - emit m_notifier->authFailed(); - } -} diff --git a/client/platforms/android/authResultReceiver.h b/client/platforms/android/authResultReceiver.h deleted file mode 100644 index 9a88dcf5..00000000 --- a/client/platforms/android/authResultReceiver.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef AUTHRESULTRECEIVER_H -#define AUTHRESULTRECEIVER_H - -#include - -#include - -class AuthResultNotifier : public QObject -{ - Q_OBJECT - -public: - AuthResultNotifier(QObject *parent = nullptr) : QObject(parent) {}; - -signals: - void authFailed(); - void authSuccessful(); -}; - -/* Auth result handler for Android */ -class AuthResultReceiver final : public QAndroidActivityResultReceiver -{ -public: - AuthResultReceiver(QSharedPointer ¬ifier); - - void handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data) override; - -private: - QSharedPointer m_notifier; -}; - -#endif // AUTHRESULTRECEIVER_H diff --git a/client/secure_qsettings.cpp b/client/secure_qsettings.cpp index 1e2a2273..88c0242b 100644 --- a/client/secure_qsettings.cpp +++ b/client/secure_qsettings.cpp @@ -174,13 +174,25 @@ bool SecureQSettings::restoreAppConfig(const QByteArray &json) QByteArray SecureQSettings::encryptText(const QByteArray &value) const { QSimpleCrypto::QBlockCipher cipher; - return cipher.encryptAesBlockCipher(value, getEncKey(), getEncIv()); + QByteArray result; + try { + result = cipher.encryptAesBlockCipher(value, getEncKey(), getEncIv()); + } catch (...) { // todo change error handling in QSimpleCrypto? + qCritical() << "error when encrypting the settings value"; + } + return result; } QByteArray SecureQSettings::decryptText(const QByteArray &ba) const { QSimpleCrypto::QBlockCipher cipher; - return cipher.decryptAesBlockCipher(ba, getEncKey(), getEncIv()); + QByteArray result; + try { + result = cipher.decryptAesBlockCipher(ba, getEncKey(), getEncIv()); + } catch (...) { // todo change error handling in QSimpleCrypto? + qCritical() << "error when decrypting the settings value"; + } + return result; } bool SecureQSettings::encryptionRequired() const diff --git a/client/settings.cpp b/client/settings.cpp index 490ede52..7a572a13 100644 --- a/client/settings.cpp +++ b/client/settings.cpp @@ -227,7 +227,7 @@ void Settings::setSaveLogs(bool enabled) if (!isSaveLogs()) { Logger::deInit(); } else { - if (!Logger::init()) { + if (!Logger::init(false)) { qWarning() << "Initialization of debug subsystem failed"; } } @@ -519,7 +519,22 @@ void Settings::setGatewayEndpoint(const QString &endpoint) m_gatewayEndpoint = endpoint; } +void Settings::setDevGatewayEndpoint() +{ + m_gatewayEndpoint = DEV_AGW_ENDPOINT; +} + QString Settings::getGatewayEndpoint() { return m_gatewayEndpoint; } + +bool Settings::isDevGatewayEnv() +{ + return m_isDevGatewayEnv; +} + +void Settings::toggleDevGatewayEnv(bool enabled) +{ + m_isDevGatewayEnv = enabled; +} diff --git a/client/settings.h b/client/settings.h index ee10c3b8..c0ab0559 100644 --- a/client/settings.h +++ b/client/settings.h @@ -183,7 +183,7 @@ public: bool isScreenshotsEnabled() const { - return value("Conf/screenshotsEnabled", false).toBool(); + return value("Conf/screenshotsEnabled", true).toBool(); } void setScreenshotsEnabled(bool enabled) { @@ -217,7 +217,10 @@ public: void resetGatewayEndpoint(); void setGatewayEndpoint(const QString &endpoint); + void setDevGatewayEndpoint(); QString getGatewayEndpoint(); + bool isDevGatewayEnv(); + void toggleDevGatewayEnv(bool enabled); signals: void saveLogsChanged(bool enabled); @@ -234,6 +237,7 @@ private: mutable SecureQSettings m_settings; QString m_gatewayEndpoint; + bool m_isDevGatewayEnv; }; #endif // SETTINGS_H diff --git a/client/translations/amneziavpn_ar_EG.ts b/client/translations/amneziavpn_ar_EG.ts index 42ea2720..be37275f 100644 --- a/client/translations/amneziavpn_ar_EG.ts +++ b/client/translations/amneziavpn_ar_EG.ts @@ -6,47 +6,47 @@ Classic VPN for comfortable work, downloading large files and watching videos. Works for any sites. Speed up to %1 MBit/s - + شبكة VPN كلاسيكية للعمل المريح وتنزيل الملفات الكبيرة ومشاهدة مقاطع الفيديو. تعمل مع أي موقع. تصل السرعة إلى %1 ميجابت/ثانية VPN to access blocked sites in regions with high levels of Internet censorship. - + شبكة VPN للولوج للمواقع المحظورة في بلاد ذو مستوي عالي من الرقابة علي الانترنت. Amnezia Premium - A classic VPN for comfortable work, downloading large files, and watching videos in high resolution. It works for all websites, even in countries with the highest level of internet censorship. - + Amenzia Premium - شبكة VPN للعمل المريح, تحميل ملفات كبيرة الحجم, ومشاهدة مقاطع الفيديو ب جودة عالية. تعمل لجميع المواقع, حتي في البلاد ذو مستوي عالي من الرقابة علي الانترنت Amnezia Free is a free VPN to bypass blocking in countries with high levels of internet censorship - + Amnezia Free هو VPN مجاني لتخطي الحظر في البلاد ذو مستوي عالي من الرقابة علي الانترنت %1 MBit/s - + %1 ميجابت/ثانية %1 days - + %1 ايام VPN will open only popular sites blocked in your region, such as Instagram, Facebook, Twitter and others. Other sites will be opened from your real IP address, <a href="%1/free" style="color: #FBB26A;">more details on the website.</a> - + سيقوم VPN فقط بفتح المواقع المشهورة المحظورة في بلدك, مثل Instagram, Facebook, Twitter و مواقع اخري. المواقع الاخري ستٌفتح من عنوان ال IP الحقيقي الخاص بك, <a href="%1/free" style="color: #FBB26A;">معلومات اخري علي الموقع.</a> Free - + مجاني %1 $/month - + %1 دولار/الشهر @@ -325,7 +325,7 @@ Already installed containers were found on the server. All installed containers Api config removed - + تم حذف تكوين Api @@ -345,17 +345,17 @@ Already installed containers were found on the server. All installed containers %1 installed successfully. - + تم تحميل %1 بنجاح API config reloaded - + تمت إعادة تحميل تكوين API Successfully changed the country of connection to %1 - + تم تغيير بلد الاتصال بنجاح إلى %1 @@ -441,7 +441,7 @@ Already installed containers were found on the server. All installed containers Gateway endpoint - + نقطة نهاية البوابة @@ -507,47 +507,47 @@ Already installed containers were found on the server. All installed containers Jc - Junk packet count - + Jc - عدد الحزم غير المرغوب فيها Jmin - Junk packet minimum size - + Jmin - الحجم الادني للحزم الغير مرغوب فيها Jmax - Junk packet maximum size - + Jmax - الحجم الاقصي للحزم الغير مرغوب فيها S1 - Init packet junk size - + S1 - حجم حزمة البيانات العشوائية الأولية S2 - Response packet junk size - + S2 - حجم حزمة الاستجابة غير المرغوب فيها H1 - Init packet magic header - + H1 - حزمة رأس سحرية مبدئية H2 - Response packet magic header - + H2 - رأس حزمة الاستجابة السحرية H4 - Transport packet magic header - + H4 - رأس حزمة النقل السحرية H3 - Underload packet magic header - + H3 - رأس حزمة السحر غير المحمل @@ -1164,7 +1164,7 @@ Already installed containers were found on the server. All installed containers Dev console - + وحدة تحكم التطوير @@ -1250,74 +1250,74 @@ Already installed containers were found on the server. All installed containers For the region - + للمنطقة Price - + السعر Work period - + مدة العمل Speed - + السرعة Support tag - + علامة الدعم Copied - + تم النسخ Reload API config - + إعادة تحميل تكوين API Reload API config? - + إعادة تحميل تكوين API Continue - واصل + واصل Cancel - إلغاء + إلغاء Cannot reload API config during active connection - + لا يمكن إعادة تحميل تكوين API اثناء تواجد اتصال نشط Remove from application - + احذف من التطبيق Remove from application? - + احذف من التطبيق؟ Cannot remove server during active connection - لا يمكن إزالة الخادم أثناء الاتصال النشط + لا يمكن إزالة الخادم أثناء الاتصال النشط @@ -1769,7 +1769,7 @@ Already installed containers were found on the server. All installed containers No new installed containers found - لم يتم العثور علي اي حاويات جديدة مٌثبتة + لم يتم العثور علي اي خدمات مٌثبتة سابقاً @@ -1941,7 +1941,7 @@ Already installed containers were found on the server. All installed containers Remove %1 from server? - + احذف %1 من الخادم؟ @@ -2080,32 +2080,32 @@ Already installed containers were found on the server. All installed containers For the region - + للمنطقة Price - + السعر Work period - + مدة العمل Speed - + السرعة Features - + المميزات Connect - اتصل + اتصل @@ -2113,96 +2113,80 @@ Already installed containers were found on the server. All installed containers VPN by Amnezia - + VPN بواسطة Amnezia Choose a VPN service that suits your needs. - + اختر خدمة VPN تلبي احتياجاتك PageSetupWizardConfigSource - - Server connection - اتصال الخادم - - - Do not use connection codes from untrusted sources, as they may be created to intercept your data. - لا تستخدم رموز اتصال من مصادر غير موثوقة, حيث قد يكون تم إنشاؤها لاعتراض بياناتك. - - - What do you have? - ماذا لديك؟ - - - File with connection settings or backup - ملف إعدادات اتصال او نسخ احتياطي - Connection - الاتصال + الاتصال Insert the key, add a configuration file or scan the QR-code - + أدخل المفتاح، أضف ملف تكوين أو امسح رمز الاستجابة السريعة Insert key - + أدخل مفتاح Insert - ادخل + أدخل Continue - واصل + واصل Other connection options - + اختيارات اتصال اخري VPN by Amnezia - + VPN بواسطة Amnezia Connect to classic paid and free VPN services from Amnezia - + اتصل بخدمات VPN الكلاسيكية المدفوعة والمجانية من Amnezia Self-hosted VPN - + VPN ذاتية الاستضافة Configure Amnezia VPN on your own server - + قم بتكوين Amnezia VPN على الخادم الخاص بك Restore from backup - استرجاع من ملف يحتوي علي نسخة احتياطية + استرجاع من ملف يحتوي علي نسخة احتياطية Open backup file - افتح ملف نسخ احتياطي + افتح ملف نسخ احتياطي Backup files (*.backup) - ملفات نٌسخ احتياطية (*.backup) + ملفات نٌسخ احتياطية (*.backup) @@ -2222,11 +2206,7 @@ Already installed containers were found on the server. All installed containers I have nothing - ليس لدي اي شئ - - - Key as text - مفتاح كنص + ليس لدي اي شئ @@ -2269,12 +2249,12 @@ Already installed containers were found on the server. All installed containers How to run your VPN server - + كيف تقوم بتشغيل خادم ال VPN الخاص بك Where to get connection data, step-by-step instructions for buying a VPS - + اين تحصل علي بيانات الاتصال, تعليمات خطوة ب خطوة لشراء VPS @@ -2392,7 +2372,7 @@ Already installed containers were found on the server. All installed containers تثبيت - + The port must be in the range of 1 to 65535 يجب أن يكون المنفذ في النطاق من 1 إلى 65535 @@ -2420,30 +2400,10 @@ Already installed containers were found on the server. All installed containers PageSetupWizardStart - - Settings restored from backup file - تم استرداد الإعدادات من ملف نسخة احتياطية - - - Free service for creating a personal VPN on your server. - خدمة مجانية لأنشاء VPN شخصي علي الخادم الشخصي. - - - Helps you access blocked content without revealing your privacy, even to VPN providers. - يساعدك في الولوج للمحتوي المحظور بدون إظهار خصوصيات, حتي لمزود ال VPN. - - - I have the data to connect - لدي البيانات المطلوبة للأتصال - - - I have nothing - ليس لدي اي شئ - Let's get started - + هيا نبدأ @@ -2777,7 +2737,7 @@ Already installed containers were found on the server. All installed containers Settings restored from backup file - + تم تحميل الإعدادات من ملف نسخة احتياطية @@ -3221,7 +3181,7 @@ Already installed containers were found on the server. All installed containers Missing AGW public key - + مفتاح AGW عام مفقود @@ -3299,7 +3259,7 @@ Already installed containers were found on the server. All installed containers XRay with REALITY - Suitable for countries with the highest level of internet censorship. Traffic masking as web traffic at the TLS level, and protection against detection by active probing methods. - الأشعة السينية مع الواقع - مناسبة للبلدان التي لديها أعلى مستوى من الرقابة على الإنترنت. إخفاء حركة المرور كحركة مرور على الويب على مستوى TLS، والحماية من الكشف عن طريق طرق التحقيق النشطة. + XRay مع REALITY - مناسبة للبلدان التي لديها أعلى مستوى من الرقابة على الإنترنت. إخفاء حركة المرور كحركة مرور على الويب على مستوى TLS، والحماية من الكشف عن طريق طرق التحقيق النشطة. diff --git a/client/translations/amneziavpn_fa_IR.ts b/client/translations/amneziavpn_fa_IR.ts index 5b2c5818..26c4f810 100644 --- a/client/translations/amneziavpn_fa_IR.ts +++ b/client/translations/amneziavpn_fa_IR.ts @@ -6,47 +6,47 @@ Classic VPN for comfortable work, downloading large files and watching videos. Works for any sites. Speed up to %1 MBit/s - + برای کار راحت، دانلود فایل‌های بزرگ و تماشای ویدیوها، از VPN کلاسیک استفاده کنید. این VPN برای هر سایتی کار می‌کند و سرعت آن تا %1 مگابیت بر ثانیه است. VPN to access blocked sites in regions with high levels of Internet censorship. - + وی پی ان برای دسترسی به سایت‌های مسدود شده در مناطق با سانسور شدید اینترنت. Amnezia Premium - A classic VPN for comfortable work, downloading large files, and watching videos in high resolution. It works for all websites, even in countries with the highest level of internet censorship. - + امنزیا پریمیوم - یک وی پی ان کلاسیک برای کار راحت، دانلود فایل‌های بزرگ و تماشای ویدیو با کیفیت بالا. قابل استفاده برای تمامی سایت‌ها، حتی در کشورهایی با بالاترین سطح سانسور اینترنت. Amnezia Free is a free VPN to bypass blocking in countries with high levels of internet censorship - + امنزیا رایگان یک وی پی ان رایگان برای دور زدن مسدودیت‌ها در کشورهایی با سطح بالای سانسور اینترنت است. %1 MBit/s - + %1 MBit/s %1 days - + %1 روز VPN will open only popular sites blocked in your region, such as Instagram, Facebook, Twitter and others. Other sites will be opened from your real IP address, <a href="%1/free" style="color: #FBB26A;">more details on the website.</a> - + وی پی ان فقط سایت‌های محبوبی را که در منطقه شما مسدود شده‌اند، مانند اینستاگرام، فیسبوک، توییتر و غیره باز می‌کند. سایر سایت‌ها با آدرس آی‌پی واقعی شما باز خواهند شد. <a href="%1/free" style="color: #FBB26A;">more details on the website.</a> Free - + رایگان %1 $/month - + %1 $/ماه @@ -54,22 +54,22 @@ Application added: %1 - + برنامه اضافه شد: %1 The application has already been added - + برنامه از قبل اضافه شده است The selected applications have been added - + برنامه‌های انتخاب شده اضافه شدند Application removed: %1 - + برنامه حذف شد: %1 @@ -77,7 +77,7 @@ Unable to disconnect during configuration preparation - + در هنگام آماده‌سازی پیکربندی، نمی‌توان از اتصال خارج شد. @@ -102,7 +102,7 @@ Preparing... - + در حال آماده‌سازی... @@ -118,12 +118,12 @@ The selected protocol is not supported on the current platform - پروتکل انتخاب شده بر روی این پلتفرم پشتیبانی نمی‎‎شود + پروتکل انتخاب‌شده در پلتفرم فعلی پشتیبانی نمی‌شود. unable to create configuration - + نمی‌توان پیکربندی را ایجاد کرد. @@ -256,13 +256,13 @@ Can't be disabled for current server Unable to open file - + نمی‌توان فایل را باز کرد. Invalid configuration file - + فایل پیکربندی نامعتبر است. @@ -272,7 +272,7 @@ Can't be disabled for current server In the imported configuration, potentially dangerous lines were found: - + در پیکربندی وارد شده، خطوطی که ممکن است خطرناک باشند، یافت شدند: @@ -329,12 +329,12 @@ Already installed containers were found on the server. All installed containers Api config removed - + پیکربندی API حذف شد. %1 cached profile cleared - + %1 پروفایل ذخیره شده پاک شد. @@ -349,17 +349,17 @@ Already installed containers were found on the server. All installed containers %1 installed successfully. - + %1 با موفقیت نصب شد. API config reloaded - + پیکربندی API دوباره بارگذاری شد. Successfully changed the country of connection to %1 - + کشور اتصال با موفقیت به %1 تغییر یافت. @@ -367,17 +367,17 @@ Already installed containers were found on the server. All installed containers Choose application - + انتخاب برنامه application name - + نام برنامه Add selected - + اضافه کردن انتخاب شده @@ -453,7 +453,7 @@ Already installed containers were found on the server. All installed containers Logging enabled - + لاگ‌برداری فعال شد @@ -589,7 +589,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. @@ -623,7 +623,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. @@ -794,7 +794,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. Remove OpenVPN @@ -895,7 +895,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. @@ -903,22 +903,22 @@ Already installed containers were found on the server. All installed containers WG settings - + تنظیمات WG Port - پورت + پورت MTU - + Unable change settings while there is an active connection - + نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. All users with whom you shared a connection will no longer be able to connect to it. @@ -939,22 +939,22 @@ Already installed containers were found on the server. All installed containers XRay settings - + تنظیمات XRay Disguised as traffic from - پنهان کردن به عنوان ترافیک از + به‌عنوان ترافیک از طرف زیر نمایش داده می‌شود Save - ذخیره + ذخیره Unable change settings while there is an active connection - + نمی‌توان تنظیمات را تغییر داد در حالی که اتصال فعال است. @@ -1001,7 +1001,7 @@ Already installed containers were found on the server. All installed containers Cannot remove AmneziaDNS from running server - + نمی‌توان AmneziaDNS را از سرور در حال اجرا حذف کرد. @@ -1093,18 +1093,18 @@ Already installed containers were found on the server. All installed containers Settings updated successfully - + تنظیمات با موفقیت به‌روزرسانی شد. SOCKS5 settings - + تنظیمات SOCKS5 Host - هاست + هاستمیزبان @@ -1112,50 +1112,50 @@ Already installed containers were found on the server. All installed containers Copied - کپی شد + کپی شد Port - پورت + پورت User name - نام کاربری + نام کاربری Password - رمز عبور + رمز عبور Username - + نام کاربری Change connection settings - + تغییر تنظیمات اتصال The port must be in the range of 1 to 65535 - + پورت باید در محدوده ۱ تا ۶۵۵۳۵ باشد Password cannot be empty - + رمز عبور نمی‌تواند خالی باشد Username cannot be empty - + نام کاربری نمی‌تواند خالی باشد @@ -1285,7 +1285,7 @@ Already installed containers were found on the server. All installed containers https://t.me/amnezia_vpn_en - https://t.me/amnezia_vpn + https://t.me/amnezia_vpn_ir @@ -1337,22 +1337,22 @@ Already installed containers were found on the server. All installed containers For the region - + برای منطقه Price - + قیمت Work period - + مدت زمان کار Speed - + سرعت @@ -1362,49 +1362,49 @@ Already installed containers were found on the server. All installed containers Copied - کپی شد + کپی شد Reload API config - + بارگذاری مجدد پیکربندی API Reload API config? - + آیا می‌خواهید پیکربندی API را دوباره بارگذاری کنید؟ Continue - + ادامه دهید Cancel - کنسل + لغو Cannot reload API config during active connection - + نمی‌توان پیکربندی API را در حین اتصال فعال دوباره بارگذاری کرد. Remove from application - + حذف از برنامه Remove from application? - + آیا می‌خواهید از برنامه حذف کنید؟ Cannot remove server during active connection - + نمی‌توان سرور را در حین اتصال فعال حذف کرد. @@ -1412,57 +1412,57 @@ Already installed containers were found on the server. All installed containers Cannot change split tunneling settings during active connection - نمی توان تنظیمات تونل تقسیم را در طول اتصال فعال تغییر داد + نمی توان تنظیمات تونل تقسیم را در طول اتصال فعال تغییر دادنمی‌توان تنظیمات تقسیم تونلینگ را در حین اتصال فعال تغییر داد. Only the apps from the list should have access via VPN - + فقط برنامه‌های موجود در لیست باید از طریق VPN دسترسی داشته باشند. Apps from the list should not have access via VPN - + برنامه‌های موجود در لیست نباید از طریق VPN دسترسی داشته باشند. App split tunneling - + تقسیم تونلینگ برنامه‌ها Mode - حالت + حالت Remove - + حذف Continue - + ادامه دهید Cancel - کنسل + کنسل application name - + نام برنامه Open executable file - + فایل اجرایی را باز کنید Executable files (*.*) - + فایل‌های اجرایی (*.*) @@ -1480,12 +1480,12 @@ Already installed containers were found on the server. All installed containers Enable notifications - + فعال کردن اعلان‌ها Enable notifications to show the VPN state in the status bar - + اعلان ها را فعال کنید تا وضعیت VPN را در نوار وضعیت ببینید @@ -1565,7 +1565,7 @@ Already installed containers were found on the server. All installed containers Cannot reset settings during active connection - + نمی‌توان تنظیمات را در حین اتصال فعال بازنشانی کرد. @@ -1644,7 +1644,7 @@ Already installed containers were found on the server. All installed containers Cannot restore backup settings during active connection - + نمی‌توان تنظیمات پشتیبان را در حین اتصال فعال بازیابی کرد. @@ -1682,17 +1682,17 @@ Already installed containers were found on the server. All installed containers KillSwitch - + KillSwitch Disables your internet if your encrypted VPN connection drops out for any reason. - + اگر به هر دلیلی اتصال VPN رمزگذاری شده شما قطع شود، اینترنت شما را غیرفعال می‌کند. Cannot change killSwitch settings during active connection - + نمی‌توان تنظیمات Kill Switch را در حین اتصال فعال تغییر داد. @@ -1778,7 +1778,7 @@ Already installed containers were found on the server. All installed containers Logging is enabled. Note that logs will be automatically disabled after 14 days, and all log files will be deleted. - + ثبت وقایع فعال است. توجه داشته باشید که ثبت وقایع به‌طور خودکار پس از ۱۴ روز غیرفعال شده و تمام فایل‌های ثبت وقایع حذف خواهند شد. @@ -1919,7 +1919,7 @@ Already installed containers were found on the server. All installed containers Cannot reboot server during active connection - + نمی‌توان سرور را در حین اتصال فعال راه‌اندازی مجدد کرد. @@ -1929,7 +1929,7 @@ Already installed containers were found on the server. All installed containers Cannot remove server during active connection - + نمی‌توان سرور را در حین اتصال فعال حذف کرد. @@ -1944,7 +1944,7 @@ Already installed containers were found on the server. All installed containers Cannot clear server from Amnezia software during active connection - + نمی‌توان سرور را در حین اتصال فعال از نرم‌افزار Amnezia پاک کرد. @@ -1959,7 +1959,7 @@ Already installed containers were found on the server. All installed containers Cannot reset API config during active connection - + نمی‌توان پیکربندی API را در حین اتصال فعال بازنشانی کرد. @@ -2015,12 +2015,12 @@ Already installed containers were found on the server. All installed containers Clear %1 profile - + پاک کردن پروفایل %1 Clear %1 profile? - + آیا می‌خواهید پروفایل %1 را پاک کنید؟ @@ -2030,7 +2030,7 @@ Already installed containers were found on the server. All installed containers Unable to clear %1 profile while there is an active connection - + نمی‌توان پروفایل %1 را در حین اتصال فعال پاک کرد. @@ -2050,7 +2050,7 @@ Already installed containers were found on the server. All installed containers Cannot remove active container - + نمی‌توان کانتینر فعال را حذف کرد. @@ -2179,32 +2179,32 @@ Already installed containers were found on the server. All installed containers For the region - + برای منطقه Price - + قیمت Work period - + مدت زمان کار Speed - + سرعت Features - + ویژگی‌ها Connect - اتصال + اتصال @@ -2212,12 +2212,12 @@ Already installed containers were found on the server. All installed containers VPN by Amnezia - + VPN توسط Amnezia Choose a VPN service that suits your needs. - + یک سرویس VPN که مناسب نیازهای شما باشد را انتخاب کنید. @@ -2254,67 +2254,67 @@ It's okay as long as it's from someone you trust. Connection - ارتباط + ارتباط Insert the key, add a configuration file or scan the QR-code - + کلید را وارد کنید، فایل پیکربندی را اضافه کنید یا کد QR را اسکن کنید Insert key - + کلید را وارد کنید Insert - وارد کردن + وارد کردن Continue - + ادامه دهید Other connection options - + گزینه‌های اتصال دیگر VPN by Amnezia - + VPN توسط Amnezia Connect to classic paid and free VPN services from Amnezia - + اتصال به سرویس‌های VPN کلاسیک پولی و رایگان از Amnezia Self-hosted VPN - + Self-hosted VPN Configure Amnezia VPN on your own server - + پیکربندی VPN Amnezia بر روی سرور خودتان Restore from backup - بازیابی از پشتیبان + بازیابی از پشتیبان Open backup file - باز کردن فایل پشتیبان + باز کردن فایل پشتیبان Backup files (*.backup) - Backup files (*.backup) + Backup files (*.backup) @@ -2329,7 +2329,7 @@ It's okay as long as it's from someone you trust. I have nothing - من هیچی ندارم + من هیچی ندارم Key as text @@ -2381,12 +2381,12 @@ It's okay as long as it's from someone you trust. How to run your VPN server - + چگونه سرور VPN خود را اجرا کنید Where to get connection data, step-by-step instructions for buying a VPS - + داده‌های اتصال را از کجا دریافت کنید و دستورالعمل‌های مرحله به مرحله برای خرید یک VPS @@ -2501,7 +2501,7 @@ It's okay as long as it's from someone you trust. The port must be in the range of 1 to 65535 - + پورت باید در محدوده ۱ تا ۶۵۵۳۵ باشد @@ -2550,7 +2550,7 @@ It's okay as long as it's from someone you trust. Let's get started - + بیایید شروع کنیم @@ -2601,7 +2601,7 @@ It's okay as long as it's from someone you trust. Enable WireGuard obfuscation. It may be useful if WireGuard is blocked on your provider. - + فعال‌سازی استتار WireGuard. این ممکن است مفید باشد اگر WireGuard توسط ارائه‌دهنده شما مسدود شده باشد. @@ -2680,7 +2680,7 @@ It's okay as long as it's from someone you trust. Save XRay config - + ذخیره پیکربندی XRay @@ -2705,7 +2705,7 @@ It's okay as long as it's from someone you trust. XRay native format - + فرمت بومی XRay @@ -2741,22 +2741,22 @@ It's okay as long as it's from someone you trust. Creation date: %1 - + تاریخ ایجاد: %1 Latest handshake: %1 - + آخرین ارتباط: %1 Data received: %1 - + داده‌های دریافت شده: %1 Data sent: %1 - + داده‌های ارسال شده: %1 Creation date: @@ -2882,12 +2882,12 @@ It's okay as long as it's from someone you trust. Logging was disabled after 14 days, log files were deleted - + ثبت وقایع پس از ۱۴ روز غیرفعال شد و فایل‌های ثبت وقایع حذف شدند Settings restored from backup file - + تنظیمات از فایل پشتیبان بازیابی شد @@ -3296,17 +3296,17 @@ It's okay as long as it's from someone you trust. Background service is not running - + Background service is not running Server error: Packet manager error - + Server error: Packet manager error SCP error: Generic failure - + SCP error: Generic failure @@ -3356,17 +3356,17 @@ It's okay as long as it's from someone you trust. In the response from the server, an empty config was received - + در پاسخ از سرور، پیکربندی خالی دریافت شد SSL error occurred - + SSL error occurred Server response timeout on api request - + Server response timeout on api request @@ -3426,12 +3426,12 @@ It's okay as long as it's from someone you trust. XRay with REALITY - Suitable for countries with the highest level of internet censorship. Traffic masking as web traffic at the TLS level, and protection against detection by active probing methods. - + XRay با REALITY - مناسب برای کشورهایی با بالاترین سطح سانسور اینترنت. استتار ترافیک به عنوان ترافیک وب در سطح TLS و حفاظت در برابر شناسایی با روش‌های پروب فعال. IKEv2/IPsec - Modern stable protocol, a bit faster than others, restores connection after signal loss. It has native support on the latest versions of Android and iOS. - + IKEv2/IPsec - پروتکل مدرن و پایدار، کمی سریع‌تر از سایرین است و پس از قطع شدن سیگنال، اتصال را بازیابی می‌کند. از پشتیبانی بومی در آخرین نسخه‌های Android و iOS برخوردار است. @@ -3504,7 +3504,11 @@ WireGuard به دلیل امضاهای بسته متمایز خود، بسیار It uniquely identifies censors during the TLS handshake phase, seamlessly operating as a proxy for legitimate clients while diverting censors to genuine websites like google.com, thus presenting an authentic TLS certificate and data. This advanced capability differentiates REALITY from similar technologies by its ability to disguise web traffic as coming from random, legitimate sites without the need for specific configurations. Unlike older protocols such as VMess, VLESS, and the XTLS-Vision transport, REALITY's innovative "friend or foe" recognition at the TLS handshake enhances security and circumvents detection by sophisticated DPI systems employing active probing techniques. This makes REALITY a robust solution for maintaining internet freedom in environments with stringent censorship. - + پروتکل REALITY، یک توسعه پیشگامانه توسط خالقان XRay، به‌طور خاص برای مقابله با بالاترین سطح سانسور اینترنتی طراحی شده است و از رویکرد نوآورانه‌ای برای دور زدن محدودیت‌ها استفاده می‌کند. + +REALITY به‌طور منحصربه‌فردی سانسورچیان را در مرحله دست‌دهی TLS شناسایی می‌کند و به‌صورت یکپارچه به‌عنوان پراکسی برای کاربران قانونی عمل می‌کند، در حالی که سانسورچیان را به سایت‌های معتبر مانند google.com هدایت می‌کند و در نتیجه یک گواهی TLS واقعی و داده‌های اصلی ارائه می‌دهد. + +این قابلیت پیشرفته، REALITY را از فناوری‌های مشابه متمایز می‌کند، زیرا می‌تواند ترافیک وب را بدون نیاز به پیکربندی‌های خاص، به‌عنوان ترافیک از سایت‌های تصادفی و معتبر جا بزند. برخلاف پروتکل‌های قدیمی‌تر مانند VMess، VLESS و انتقال XTLS-Vision، تشخیص نوآورانه "دوست یا دشمن" REALITY در مرحله دست‌دهی TLS امنیت را افزایش داده و از شناسایی توسط سیستم‌های پیشرفته DPI که از تکنیک‌های پروب فعال استفاده می‌کنند، جلوگیری می‌کند. این ویژگی REALITY را به یک راه‌حل قوی برای حفظ آزادی اینترنت در محیط‌هایی با سانسور شدید تبدیل می‌کند. @@ -3665,7 +3669,7 @@ For more detailed information, you can SOCKS5 proxy server - + سرور پروکسی SOCKS5 diff --git a/client/translations/amneziavpn_my_MM.ts b/client/translations/amneziavpn_my_MM.ts index 0a71b0a5..473c97f8 100644 --- a/client/translations/amneziavpn_my_MM.ts +++ b/client/translations/amneziavpn_my_MM.ts @@ -6,47 +6,47 @@ Classic VPN for comfortable work, downloading large files and watching videos. Works for any sites. Speed up to %1 MBit/s - + သက်တောင့်သက်သာအလုပ်လုပ်နိုင်ဖို့အတွက်နှင့် ကြီးမားသောဖိုင်များကိုဒေါင်းလုဒ်လုပ်ခြင်းနှင့် ဗီဒီယိုများကြည့်ရှုခြင်းတို့အတွက် အသုံးပြုနိုင်သော VPN ဖြစ်ပါတယ်။ မည်သည့်ဆိုက်များအတွက်မဆိုအလုပ်လုပ်ပြီး လိုင်းအရှိန် %1 MBit/s အထိအသုံးပြုနိုင်ပါတယ်။ VPN to access blocked sites in regions with high levels of Internet censorship. - + အင်တာနက် ဆင်ဆာဖြတ်တောက်မှု မြင့်မားသော ဒေသများရှိ ပိတ်ဆို့ထားသော ဆိုက်များကို ဝင်ရောက်ရန် VPN။. Amnezia Premium - A classic VPN for comfortable work, downloading large files, and watching videos in high resolution. It works for all websites, even in countries with the highest level of internet censorship. - + Amnezia Premium - သက်တောင့်သက်သာအလုပ်လုပ်နိုင်ဖို့အတွက်နှင့် ကြီးမားသောဖိုင်များကိုဒေါင်းလုဒ်လုပ်ခြင်းနှင့် ဗီဒီယိုများကိုကြည်လင်ပြတ်သားစွာကြည့်ရှုခြင်းတို့အတွက် အသုံးပြုနိုင်သော VPN ဖြစ်ပါတယ်။ အင်တာနက်ဆင်ဆာဖြတ်မှု အဆင့်အမြင့်ဆုံးနိုင်ငံများတွင်ပင် မည်သည့်ဆိုက်များအတွက်မဆို အလုပ်လုပ်ပါသည်။. Amnezia Free is a free VPN to bypass blocking in countries with high levels of internet censorship - + Amnezia Free သည် အင်တာနက်ဆင်ဆာဖြတ်တောက်မှု မြင့်မားသောနိုင်ငံများတွင် ပိတ်ဆို့ခြင်းကို ကျော်ဖြတ်ရန်အတွက် အခမဲ့ VPN တစ်ခုဖြစ်ပါသည်။ %1 MBit/s - + %1 MBit/s %1 days - + %1 ရက် VPN will open only popular sites blocked in your region, such as Instagram, Facebook, Twitter and others. Other sites will be opened from your real IP address, <a href="%1/free" style="color: #FBB26A;">more details on the website.</a> - + ဤ VPN သည် သင့်ဒေသရှိ Instagram၊ Facebook၊ Twitter နှင့် အခြားသော လူကြိုက်များသော ဆိုက်များကိုသာ ဖွင့်ပေးပါမည်။ အခြားဝဘ်ဆိုက်များကိုမူ သင်၏ IP လိပ်စာအစစ်အမှန်ဖြင့်သာ ဖွင့်ပေးပါမည်၊ <a href="%1/free" style="color: #FBB26A;">နောက်ထပ်အသေးစိတ်အချက်အလက်များကို ဝဘ်ဆိုဒ်ပေါ်တွင်ကြည့်ရန်</a> Free - + အခမဲ့ %1 $/month - + %1 $/တစ်လ @@ -54,22 +54,22 @@ Application added: %1 - + အပလီကေးရှင်းထည့်ပြီးပါပြီ: %1 The application has already been added - + အပလီကေးရှင်းကို ထည့်သွင်းသားဖြစ်သည် The selected applications have been added - + ရွေးချယ်ထားသောအပလီကေးရှင်းများကို ထည့်သွင်းပြီးပါပြီ Application removed: %1 - + အပလီကေးရှင်းကို ဖယ်ရှားလိုက်သည်: %1 @@ -77,7 +77,7 @@ Unable to disconnect during configuration preparation - + Configuration ပြင်ဆင်ခြင်းလုပ်ဆောင်နေချိန်အတွင်း ချိတ်ဆက်မှုဖြတ်တောက်၍မရပါ @@ -102,7 +102,7 @@ Preparing... - + ပြင်ဆင်နေသည်... @@ -112,17 +112,17 @@ Settings updated successfully - ဆက်တင်များကို အောင်မြင်စွာ အပ်ဒိတ်လုပ်ပြီးပါပြီ။ + ဆက်တင်များကို အောင်မြင်စွာ အပ်ဒိတ်လုပ်ပြီးပါပြီ The selected protocol is not supported on the current platform - ရွေးချယ်ထားသော ပရိုတိုကောကို လက်ရှိပလက်ဖောင်းပေါ်တွင် အ‌ထောက်အပံ့မပေးထားပါ။ + ရွေးချယ်ထားသော ပရိုတိုကောကို လက်ရှိပလက်ဖောင်းပေါ်တွင် အ‌ထောက်အပံ့မပေးထားပါ unable to create configuration - + configuration ဖန်တီး၍မရပါ @@ -148,17 +148,17 @@ Add new connection - ချိတ်ဆက်မှုအသစ်ထည့်သွင်းပါ။ + ချိတ်ဆက်မှုအသစ်ထည့်သွင်းမည် Configure your server - သင်၏ဆာဗာကို စီစဉ်ချိန်ညှိပါ။ + သင်၏ဆာဗာကို စီစဉ်ချိန်ညှိမည် Open config file, key or QR code - config ဖိုင်၊ key သို့မဟုတ် QR ကုဒ်ကို ဖွင့်ပါ။ + config ဖိုင်၊ key သို့မဟုတ် QR ကုဒ်ကို ဖွင့်မည် @@ -199,10 +199,6 @@ Unable change protocol while there is an active connection လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ပရိုတိုကောကို ပြောင်းလဲ၍မရပါ။ - - The selected protocol is not supported on the current platform - ရွေးချယ်ထားသော ပရိုတိုကောကို လက်ရှိပလက်ဖောင်းပေါ်တွင် အ‌ထောက်အပံ့မပေးထားပါ။ - HomeSplitTunnelingDrawer @@ -256,13 +252,13 @@ Can't be disabled for current server Unable to open file - + ဖိုင်ကိုဖွင့်၍မရပါ Invalid configuration file - + Configuration ဖိုင် မမှန်ကန်ပါ @@ -272,7 +268,7 @@ Can't be disabled for current server In the imported configuration, potentially dangerous lines were found: - + တင်သွင်းသည့် configuration တွင်၊ အန္တရာယ်ရှိနိုင်သည့်စာလိုင်းများကို တွေ့ရှိခဲ့သည်: @@ -329,37 +325,37 @@ Already installed containers were found on the server. All installed containers Api config removed - + Api config ကိုဖယ်ရှားလိုက်သည် %1 cached profile cleared - + ကက်ရှ်လုပ်ထားတဲ့ ပရိုဖိုင် %1 ခုကို ရှင်းပြီးပါပြီ Please login as the user - အသုံးပြုသူအဖြစ် log in ဝင်ရောက်ပါ။ + အသုံးပြုသူအဖြစ် log in ဝင်ရောက်ပါ Server added successfully - ဆာဗာကို အောင်မြင်စွာ ထည့်သွင်းပြီးပါပြီ။ + ဆာဗာကို အောင်မြင်စွာ ထည့်သွင်းပြီးပါပြီ %1 installed successfully. - + %1 ခုကို အောင်မြင်စွာ ထည့်သွင်းပြီးပါပြီ. API config reloaded - + API config ကို ပြန်လည်စတင်လိုက်ပါပြီ Successfully changed the country of connection to %1 - + ချိတ်ဆက်မှုနိုင်ငံကို %1 သို့ အောင်မြင်စွာ ပြောင်းလဲလိုက်ပါပြီ @@ -367,17 +363,17 @@ Already installed containers were found on the server. All installed containers Choose application - + အပလီကေးရှင်းရွေးမည် application name - + အပလီကေးရှင်းအမည် Add selected - + ရွေးချယ်ထားသည်များကိုထည့်မည် @@ -390,7 +386,7 @@ Already installed containers were found on the server. All installed containers Write key failed: %1 - key ရေးမှု မအောင်မြင်ပါ: %1 + key ရေးသားမှု မအောင်မြင်ပါ: %1 @@ -437,7 +433,7 @@ Already installed containers were found on the server. All installed containers Usually it takes no more than 5 minutes - များသောအားဖြင့် 5 မိနစ်ထက်မပိုပါ။ + များသောအားဖြင့် 5 မိနစ်ထက်ပိုမကြာပါ @@ -445,7 +441,7 @@ Already installed containers were found on the server. All installed containers Gateway endpoint - + Gateway အဆုံးမှတ် @@ -453,17 +449,17 @@ Already installed containers were found on the server. All installed containers Logging enabled - + Logging ဖွင့်ထားပါသည် Split tunneling enabled - split tunnelling ဖွင့်ထားပါသည်။ + split tunnelling ဖွင့်ထားပါသည် Split tunneling disabled - split tunnelling ပိတ်ထားပါသည်။ + split tunnelling ပိတ်ထားပါသည် @@ -478,7 +474,7 @@ Already installed containers were found on the server. All installed containers Unable change server while there is an active connection - လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆာဗာကို ပြောင်းလဲ၍မရပါ။ + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆာဗာကို ပြောင်းလဲ၍မရပါ @@ -496,20 +492,12 @@ Already installed containers were found on the server. All installed containers MTU - - - - Remove AmneziaWG - AmneziaWG ကို ဖယ်ရှားမည်။ - - - Remove AmneziaWG from server? - AmneziaWG ကို ဆာဗာမှ ဖယ်ရှားမည်လား? + MTU All users with whom you shared a connection with will no longer be able to connect to it. - သင့်တွင် သင့်ကိုမည်သည့် ချိတ်ဆက်ထားသော အသုံးပြုသူများသည် အကြောင်းအရာသို့ ဆက်သွယ်ရန် မရနိုင်ပါ။ + သင်နှင့်အတူချိတ်ဆက်မှုတစ်ခုကို မျှဝေထားသည့် အသုံးပြုသူအားလုံး ချိတ်ဆက်နိုင်တော့မည်မဟုတ်ပါ. @@ -519,62 +507,62 @@ Already installed containers were found on the server. All installed containers Jc - Junk packet count - + Jc - Junk packet အရေအတွက် Jmin - Junk packet minimum size - + Jmin - Junk packet အသေးငယ်ဆုံးလက်ခံနိုင်မှုအရွယ်အစား Jmax - Junk packet maximum size - + Jmax - Junk packet အကြီးဆုံးလက်ခံနိုင်မှုအရွယ်အစား S1 - Init packet junk size - + S1 - Init packet junk အရွယ်အစား S2 - Response packet junk size - + S2 - Response packet junk အရွယ်အစား H1 - Init packet magic header - + H1 - Init packet magic header H2 - Response packet magic header - + H2 - Response packet magic header H4 - Transport packet magic header - + H4 - Transport packet magic header H3 - Underload packet magic header - + H3 - Underload packet magic header The values of the H1-H4 fields must be unique - + H1-H4 အကွက်များ၏ တန်ဖိုးများသည် အခြားတန်ဖိုးများနှင့်မတူ တမူထူးခြားနေရပါမည် The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) - + အကွက် S1 + မက်ဆေ့ချ် စတင်ခြင်း အရွယ်အစား (148) ၏ တန်ဖိုးသည် S2 + မက်ဆေ့ချ် တုံ့ပြန်မှု အရွယ်အစား (92) နှင့် မညီမျှရပါ Save settings? - သိမ်းဆည်းမည်လား။ + ဆက်တင်များကို သိမ်းဆည်းမည်လား? @@ -589,7 +577,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -623,7 +611,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -794,27 +782,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - - - - Remove OpenVPN - AmneziaWG ကို ဖယ်ရှားမည်။ - - - Remove OpenVPN from server? - AmneziaWG ကို ဆာဗာမှ ဖယ်ရှားမည်လား? - - - All users with whom you shared a connection with will no longer be able to connect to it. - သင့်တွင် သင့်ကိုမည်သည့် ချိတ်ဆက်ထားသော အသုံးပြုသူများသည် အကြောင်းအရာသို့ ဆက်သွယ်ရန် မရနိုင်ပါ။ - - - Continue - ဆက်လက်လုပ်ဆောင်မည် - - - Cancel - ပယ်ဖျက်မည် + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -852,11 +820,7 @@ Already installed containers were found on the server. All installed containers All users with whom you shared a connection with will no longer be able to connect to it. - သင့်တွင် သင့်ကိုမည်သည့် ချိတ်ဆက်ထားသော အသုံးပြုသူများသည် အကြောင်းအရာသို့ ဆက်သွယ်ရန် မရနိုင်ပါ။ - - - All users who you shared a connection with will no longer be able to connect to it. - Все пользователи, с которыми вы поделились этим VPN-протоколом, больше не смогут к нему подключаться. + သင်နှင့်အတူချိတ်ဆက်မှုတစ်ခုကို မျှဝေထားသည့် အသုံးပြုသူအားလုံး ချိတ်ဆက်နိုင်တော့မည်မဟုတ်ပါ. @@ -895,7 +859,7 @@ Already installed containers were found on the server. All installed containers Unable change settings while there is an active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -903,30 +867,22 @@ Already installed containers were found on the server. All installed containers WG settings - + WG ဆက်တင်များ Port - Port + Port MTU - + MTU Unable change settings while there is an active connection - - - - All users with whom you shared a connection will no longer be able to connect to it. - သင်နှင့်အတူချိတ်ဆက်မှုတစ်ခုကို မျှဝေထားသည့် အသုံးပြုသူအားလုံး ဤချိတ်ဆက်မှုကိုချိတ်ဆက်နိုင်တော့မည်မဟုတ်ပါ. - - - Cancel - ပယ်ဖျက်မည် + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -939,29 +895,22 @@ Already installed containers were found on the server. All installed containers XRay settings - + XRay ဆက်တင်များ Disguised as traffic from - traffic အဖြစ် အသွင်ယူထားသည် + traffic အဖြစ် အသွင်ယူထားသည် Save - သိမ်းဆည်းမည် + သိမ်းဆည်းမည် Unable change settings while there is an active connection - - - - - PageServerContainers - - Continue - Продолжить + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -1001,7 +950,7 @@ Already installed containers were found on the server. All installed containers Cannot remove AmneziaDNS from running server - + AmneziaDNS ကို လည်ပတ်နေသည့်ဆာဗာမှ ဖယ်ရှား၍မရပါ @@ -1071,40 +1020,24 @@ Already installed containers were found on the server. All installed containers Detailed instructions အသေးစိတ်ညွှန်ကြားချက်များ - - Remove SFTP and all data stored there - SFTP ဖယ်ရှားပါ - - - Remove SFTP and all data stored there? - SFTP နှင့် ထိုနေရာတွင် သိမ်းဆည်းထားသည့် ဒေတာအားလုံးကို ဖယ်ရှားမည်လား? - - - Continue - ဆက်လက်လုပ်ဆောင်မည် - - - Cancel - ပယ်ဖျက်မည် - PageServiceSocksProxySettings Settings updated successfully - ဆက်တင်များကို အောင်မြင်စွာ အပ်ဒိတ်လုပ်ပြီးပါပြီ။ + ဆက်တင်များကို အောင်မြင်စွာ အပ်ဒိတ်လုပ်ပြီးပါပြီ SOCKS5 settings - + SOCKS5 ဆက်တင်များ Host - Host + Host @@ -1112,50 +1045,50 @@ Already installed containers were found on the server. All installed containers Copied - ကူးယူပြီးပါပြီ + ကူးယူပြီးပါပြီ Port - Port + Port User name - အသုံးပြုသူနာမည် + အသုံးပြုသူနာမည် Password - စကားဝှက် + စကားဝှက် Username - + အသုံးပြုသူနာမည် Change connection settings - + ချက်ဆက်မှုဆက်တင်များကို ပြောင်းလဲမည် The port must be in the range of 1 to 65535 - + Port သည် 1 မှ 65535 အတွင်း ဖြစ်ရမည် Password cannot be empty - + စကားဝှက် သည် ဗလာမဖြစ်ရပါ Username cannot be empty - + အသုံးပြုသူနာမည် သည် ဗလာမဖြစ်ရပါ @@ -1195,22 +1128,6 @@ Already installed containers were found on the server. All installed containers When configuring WordPress set the this onion address as domain. WordPress ကို ချိန်ညှိသည့်အခါ ဤ onion လိပ်စာကို domain အဖြစ် သတ်မှတ်ပါ. - - Remove website - ဝဘ်ဆိုက်ကိုဖယ်ရှားမည် - - - The site with all data will be removed from the tor network. - ဒေတာအားလုံးပါသည့် ဆိုက်ကို tor ကွန်ရက်မှ ဖယ်ရှားပါမည်. - - - Continue - ဆက်လက်လုပ်ဆောင်မည် - - - Cancel - ပယ်ဖျက်မည် - PageSettings @@ -1247,7 +1164,7 @@ Already installed containers were found on the server. All installed containers Dev console - + ဒက်ဗယ်လော်ပါ console @@ -1265,7 +1182,7 @@ Already installed containers were found on the server. All installed containers Amnezia is a free and open-source application. You can support the developers if you like it. - Amnezia သည် အခမဲ့ဖြစ်ပြီး open-source application တစ်ခုဖြစ်သည်။ သင်နှစ်သက်ပါက developer များကို ပံ့ပိုးနိုင်ပါသည်။ + Amnezia သည် အခမဲ့ open-source application တစ်ခုဖြစ်သည်။ သင်နှစ်သက်ပါက developer များကို ပံ့ပိုးနိုင်ပါသည်. @@ -1312,10 +1229,6 @@ Already installed containers were found on the server. All installed containers Website ဝဘ်ဆိုက် - - https://amnezia.org - https://amnezia.org - Software version: %1 @@ -1337,74 +1250,74 @@ Already installed containers were found on the server. All installed containers For the region - + ဒေသအတွက် Price - + စျေးနှုန်း Work period - + အလုပ်လုပ်မည့်ကာလ Speed - + မြန်နှုန်း Support tag - + ကူညီပံ့ပိုးမှု tag Copied - ကူးယူပြီးပါပြီ + ကူးယူပြီးပါပြီ Reload API config - + API config ကို ပြန်လည်စတင်မည် Reload API config? - + API config ကို ပြန်လည်စတင်မည်လား? Continue - + ဆက်လက်လုပ်ဆောင်မည် Cancel - ပယ်ဖျက်မည် + ပယ်ဖျက်မည် Cannot reload API config during active connection - + ချိတ်ဆက်မှုရှိနေချိန်အတွင်း API config ကို ပြန်လည်စတင်၍မရပါ Remove from application - + အပလီကေးရှင်းမှဖယ်ရှားမည် Remove from application? - + အပလီကေးရှင်းမှဖယ်ရှားမည်လား? Cannot remove server during active connection - + ချိတ်ဆက်မှုရှိနေချိန်အတွင်း ဆာဗာကို ဖယ်ရှား၍မရပါ @@ -1412,57 +1325,57 @@ Already installed containers were found on the server. All installed containers Cannot change split tunneling settings during active connection - လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် split tunneling ဆက်တင်များကို ပြောင်းလဲ၍မရပါ + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် split tunneling ဆက်တင်များကို ပြောင်းလဲ၍မရပါ Only the apps from the list should have access via VPN - + စာရင်းတွင်းပါဝင်သောအက်ပ်များသာလျှင် VPN မှတစ်ဆင့် ဝင်ရောက်ခွင့်ရှိလိမ့်မည်ဖြစ်သည် Apps from the list should not have access via VPN - + စာရင်းတွင်းပါဝင်သောအက်ပ်များကို VPN မှတစ်ဆင့် ဝင်ရောက်ခွင့်ရရှိလိမ့်မည်မဟုတ်ပေ App split tunneling - + App split tunneling Mode - Mode + Mode Remove - ဖယ်ရှားမည် + ဖယ်ရှားမည် Continue - + ဆက်လက်လုပ်ဆောင်မည် Cancel - ပယ်ဖျက်မည် + ပယ်ဖျက်မည် application name - + အပလီကေးရှင်းအမည် Open executable file - + စီမံလုပ်ဆောင်နိုင်မှုဖိုင်ကိုဖွင့်မည် Executable files (*.*) - + စီမံလုပ်ဆောင်နိုင်မှုဖိုင်များ (*.*) @@ -1480,12 +1393,12 @@ Already installed containers were found on the server. All installed containers Enable notifications - + နိုတီများဖွင့်မည် Enable notifications to show the VPN state in the status bar - + စတေးတပ်ဘားတွင် VPN အခြေအနေကိုပြသရန် နိုတီများကို ဖွင့်မည် @@ -1515,7 +1428,7 @@ Already installed containers were found on the server. All installed containers Launch application minimized - အက်ပ်စတင်သည့်အခါ minimized ထားပြီးစတင်မည် + အက်ပ်ဖွင့်သည့်အခါ minimized ထားပြီးဖွင့်မည် @@ -1525,7 +1438,7 @@ Already installed containers were found on the server. All installed containers Logging - လော့ဂ်အင် + Logging @@ -1550,7 +1463,7 @@ Already installed containers were found on the server. All installed containers All settings will be reset to default. All installed AmneziaVPN services will still remain on the server. - ဆက်တင်အားလုံးကို မူရင်းအတိုင်း ပြန်လည်သတ်မှတ်ပါမည်. ထည့်သွင်းထားသော AmneziaVPN ဝန်ဆောင်မှုများအားလုံးသည် ဆာဗာပေါ်တွင် ဆက်လက်ရှိနေမည်ဖြစ်သည်. + ဆက်တင်အားလုံးကို မူရင်းအတိုင်း ပြန်လည်သတ်မှတ်ပါမည်။ ထည့်သွင်းထားသော AmneziaVPN ဝန်ဆောင်မှုများအားလုံးသည် ဆာဗာပေါ်တွင် ဆက်လက်ရှိနေမည်ဖြစ်သည်။. @@ -1565,7 +1478,7 @@ Already installed containers were found on the server. All installed containers Cannot reset settings during active connection - + ချိတ်ဆက်မှုရှိနေချိန်အတွင်း ဆက်တင်များကို မူရင်းအတိုင်း ပြန်လည်သတ်မှတ်၍မရပါ @@ -1588,43 +1501,43 @@ Already installed containers were found on the server. All installed containers The backup will contain your passwords and private keys for all servers added to AmneziaVPN. Keep this information in a secure place. - မိတ္တူတွင် AmneziaVPN သို့ ထည့်ထားသော ဆာဗာအားလုံးအတွက် သင့်စကားဝှက်များနှင့် လျှို့ဝှက်သော့များ ပါဝင်ပါမည်။ ဤအချက်အလက်ကို လုံခြုံသောနေရာတွင် ထားပါ။ + အရံဖိုင်တွင် AmneziaVPN သို့ ထည့်ထားသော ဆာဗာအားလုံးအတွက် သင့်စကားဝှက်များနှင့် လျှို့ဝှက်သော့များ ပါဝင်ပါမည်။ ဤအချက်အလက်ကို လုံခြုံသောနေရာတွင် ထားပါ။. Make a backup - အရန်ဖိုင်တစ်ခု ပြုလုပ်မည် + အရံဖိုင်တစ်ခု ပြုလုပ်မည် Save backup file - အရန်ဖိုင်ကို သိမ်းဆည်းမည် + အရံဖိုင်ကို သိမ်းဆည်းမည် Backup files (*.backup) - ဖိုင်များကိုအရန်သိမ်းဆည်းမည် (*.backup) + အရံဖိုင်များ (*.backup) Backup file saved - ဖိုင်များကိုအရန်သိမ်းဆည်းပြီးပါပြီ + အရံဖိုင်ကိုသိမ်းဆည်းပြီးပါပြီ Restore from backup - အရန်သိမ်းထားသည့်ဖိုင်မှ ပြန်လည်ရယူမည် + အရံဖိုင်မှ ပြန်လည်ရယူမည် Open backup file - အရန်သိမ်းထားသည့်ဖိုင်ကို ဖွင့်မည် + အရံဖိုင်ကို ဖွင့်မည် Import settings from a backup file? - ဆက်တင်များကို အရန်ဖိုင်တစ်ခုမှ ပြန်လည်တင်သွင်းမည်လား? + ဆက်တင်များကို အရံဖိုင်တစ်ခုမှ ပြန်လည်တင်သွင်းမည်လား? @@ -1644,7 +1557,7 @@ Already installed containers were found on the server. All installed containers Cannot restore backup settings during active connection - + ချိတ်ဆက်မှုရှိနေချိန်အတွင်း အရံဆက်တင်များကို ပြန်လည်ရယူ၍မရပါ @@ -1682,17 +1595,17 @@ Already installed containers were found on the server. All installed containers KillSwitch - + KillSwitch Disables your internet if your encrypted VPN connection drops out for any reason. - + အကြောင်းတစ်ခုခုကြောင့် VPN ချိတ်ဆက်မှု ပျက်သွားပါက သင့်အင်တာနက်ကို ချက်ချင်းရပ်ဆိုင်းပေးသည်. Cannot change killSwitch settings during active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် killSwitch ဆက်တင်များကို ပြောင်းလဲ၍မရပါ @@ -1715,7 +1628,7 @@ Already installed containers were found on the server. All installed containers Default server does not support custom DNS - မူရင်းဆာဗာသည် စိတ်ကြိုက် DNS ကို အထောက်အပံ့မပေးပါ + မူရင်းဆာဗာသည် စိတ်ကြိုက်ထားနိုင်သည့် DNS ကို အထောက်အပံ့မပေးပါ @@ -1778,17 +1691,17 @@ Already installed containers were found on the server. All installed containers Logging is enabled. Note that logs will be automatically disabled after 14 days, and all log files will be deleted. - + Logging ကို ဖွင့်ထားသည်။ မှတ်တမ်းများကို ၁၄ ရက်အကြာတွင် အလိုအလျောက်ပိတ်ထားမည်ဖြစ်ပြီး မှတ်တမ်းဖိုင်များအားလုံး ပျက်သွားမည်ဖြစ်ကြောင်း သတိပြုပါ။. Logging - လော့ဂ်အင် + Logging Enabling this function will save application's logs automatically. By default, logging functionality is disabled. Enable log saving in case of application malfunction. - ဤလုပ်ဆောင်ချက်ကို ဖွင့်ခြင်းဖြင့် အပလီကေးရှင်း၏ မှတ်တမ်းများကို အလိုအလျောက် သိမ်းဆည်းပေးမည် ဖြစ်ပြီး မူရင်းအတိုင်း၊ မှတ်တမ်းလုပ်ဆောင်ချက်ကို ပိတ်ထားသည်။ အပလီကေးရှင်းချို့ယွင်းချက်ရှိသောအခါ မှတ်တမ်းသိမ်းဆည်းခြင်းကို ဖွင့်ပါ။ + ဤလုပ်ဆောင်ချက်ကို ဖွင့်ခြင်းဖြင့် အပလီကေးရှင်း၏ မှတ်တမ်းများကို အလိုအလျောက် သိမ်းဆည်းပေးမည် ဖြစ်သည်။ ပုံမှန်အတိုင်းဆိုလျှင် Logging လုပ်ဆောင်ချက်ကို ပိတ်ထားမည်ဖြစ်သည်။ အပလီကေးရှင်းချို့ယွင်းချက်ရှိခဲ့ပါသော် မှတ်တမ်းကိုပြန်လည်ကြည့်ရှုနိုင်ရန် မှတ်တမ်းသိမ်းဆည်းမှုကို ဖွင့်ထားလိုက်ပါ။. @@ -1798,7 +1711,7 @@ Already installed containers were found on the server. All installed containers Open folder with logs - မှတ်တမ်းများဖြင့် ဖိုင်တွဲကိုဖွင့်မည် + မှတ်တမ်းများရှိသောဖိုင်တွဲကိုဖွင့်မည် @@ -1854,18 +1767,6 @@ Already installed containers were found on the server. All installed containers All installed containers have been added to the application ထည့်သွင်းထားသည့် ကွန်တိန်နာအားလုံးကို အပလီကေးရှင်းသို့ ပေါင်းထည့်လိုက်ပြီ - - Clear Amnezia cache - Amnezia ကက်ရှ်ဖိုင်များကို ရှင်းလင်းမည် - - - May be needed when changing other settings - အခြားဆက်တင်များကို ပြောင်းလဲသည့်အခါ လိုအပ်နိုင်သည် - - - Clear cached profiles? - ကက်ရှ်ပရိုဖိုင်များကို ရှင်းမည်လား? - No new installed containers found @@ -1920,7 +1821,7 @@ Already installed containers were found on the server. All installed containers Cannot reboot server during active connection - + ချိတ်ဆက်မှုရှိနေချိန်အတွင်း ဆာဗာကို ပြန်လည်စတင်၍မရပါ @@ -1930,7 +1831,7 @@ Already installed containers were found on the server. All installed containers Cannot remove server during active connection - + ချိတ်ဆက်မှုရှိနေချိန်အတွင်း ဆာဗာကို ဖယ်ရှား၍မရပါ @@ -1940,12 +1841,12 @@ Already installed containers were found on the server. All installed containers All users whom you shared a connection with will no longer be able to connect to it. - သင်ချိတ်ဆက်မှုတစ်ခုနှင့် မျှဝေထားသည့် အသုံးပြုသူအားလုံး ၎င်းကို ချိတ်ဆက်နိုင်တော့မည်မဟုတ်ပါ။ + သင်၏ချိတ်ဆက်မှကို မျှဝေထားသည့် အသုံးပြုသူအားလုံး ချိတ်ဆက်နိုင်တော့မည်မဟုတ်ပါ. Cannot clear server from Amnezia software during active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် ဆာဗာကို Amnezia ဆော့ဖ်ဝဲလ်မှ ရှင်းလင်း၍မရပါ @@ -1960,7 +1861,7 @@ Already installed containers were found on the server. All installed containers Cannot reset API config during active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် API config ကို ပြန်လည်သတ်မှတ်၍မရပါ @@ -2016,12 +1917,12 @@ Already installed containers were found on the server. All installed containers Clear %1 profile - + %1 ပရိုဖိုင်ကို ရှင်းလင်းမည် Clear %1 profile? - + %1 ပရိုဖိုင်ကို ရှင်းလင်းမည်လား? @@ -2031,7 +1932,7 @@ Already installed containers were found on the server. All installed containers Unable to clear %1 profile while there is an active connection - + လက်ရှိချိတ်ဆက်မှုတစ်ခုရှိနေချိန်တွင် %1 ပရိုဖိုင်ကို ရှင်းလင်း၍မရပါ @@ -2051,7 +1952,7 @@ Already installed containers were found on the server. All installed containers Cannot remove active container - + Active container ကိုဖယ်ရှား၍မရပါ @@ -2180,32 +2081,32 @@ Already installed containers were found on the server. All installed containers For the region - + ဒေသအတွက် Price - + စျေးနှုန်း Work period - + အလုပ်လုပ်မည့်ကာလ Speed - + မြန်နှုန်း Features - + Feature များ Connect - ချိတ်ဆက်မည် + ချိတ်ဆက်မည် @@ -2213,109 +2114,85 @@ Already installed containers were found on the server. All installed containers VPN by Amnezia - + Amnezia မှ VPN Choose a VPN service that suits your needs. - + သင့်လိုအပ်ချက်များနှင့် ကိုက်ညီသော VPN ဝန်ဆောင်မှုကို ရွေးချယ်ပါ. PageSetupWizardConfigSource - - Server connection - ဆာဗာချိတ်ဆက်မှု - - - Do not use connection code from public sources. It may have been created to intercept your data. - -It's okay as long as it's from someone you trust. - အများသူငှာအသုံးပြုသည့် ရင်းမြစ်များမှ ချိတ်ဆက်ကုဒ်ကို မသုံးပါနှင့်.အဆိုပါကုဒ်များသည် သင့်ဒေတာကို ကြားဖြတ်ရယူရန် ဖန်တီးထားခြင်းဖြစ်နိုင်သည်. - -သင်ယုံကြည်ရတဲ့သူတစ်ယောက်ဆီမှ ရရှိတဲ့ကုဒ်ဖြစ်နေသရွေ့တော့ အဆင်ပြေပါသည်. - - - Do not use connection codes from untrusted sources, as they may be created to intercept your data. - သင့်ဒေတာကို ကြားဖြတ်ရန် ဖန်တီးထားနိုင်သောကြောင့် မယုံကြည်ရသော ရင်းမြစ်များမှ ချိတ်ဆက်ကုဒ်များကို မသုံးပါနှင့်။ - - - What do you have? - သင့်တွင်ဘာရှိပါသလဲ? - File with connection settings ချိတ်ဆက်မှုဆက်တင်များပါဝင်သောဖိုင် - - File with connection settings or backup - ချိတ်ဆက်မှုဆက်တင်များ သို့မဟုတ် အရန်သိမ်းဆည်းထားမှုပါဝင်သောဖိုင် - Connection - ချိတ်ဆက်မှု + ချိတ်ဆက်မှု Insert the key, add a configuration file or scan the QR-code - + Key ကိုထည့်မည်၊ ဖွဲ့စည်းမှုဖိုင်တစ်ခုကိုထည့်မည် သို့မဟုတ် QR-ကုဒ်ကို စကင်န်ဖတ်မည် Insert key - + Key ကိုထည့်သွင်းမည် Insert - ထည်သွင်းမည် + ထည့်သွင်းမည် Continue - + ဆက်လက်လုပ်ဆောင်မည် Other connection options - + အခြားချိတ်ဆက်မှုရွေးချယ်စရာများ VPN by Amnezia - + Amnezia မှ VPN Connect to classic paid and free VPN services from Amnezia - + Amnezia မှ အခပေးနှင့် အခမဲ့ မူလ VPN ဝန်ဆောင်မှုများသို့ ချိတ်ဆက်မည် Self-hosted VPN - + ကိုယ်တိုင် host လုပ်ထားသော VPN Configure Amnezia VPN on your own server - + Amnezia VPN ကို သင်၏ကိုယ်ပိုင်ဆာဗာပေါ်တွင် စီစဥ်ချိန်ညှိမည် Restore from backup - အရန်သိမ်းထားသည့်ဖိုင်မှ ပြန်လည်ရယူမည် + အရံဖိုင်မှ ပြန်လည်ရယူမည် Open backup file - အရန်သိမ်းထားသည့်ဖိုင်ကို ဖွင့်မည် + အရံဖိုင်ကို ဖွင့်မည် Backup files (*.backup) - ဖိုင်များကိုအရန်သိမ်းဆည်းမည် (*.backup) + အရံဖိုင်များ (*.backup) @@ -2330,11 +2207,7 @@ It's okay as long as it's from someone you trust. I have nothing - ကျွန်ုပ်တွင်ဘာမှမရှိပါ - - - Key as text - Key ကိုစာသားအဖြစ် + ကျွန်ုပ်တွင်ဘာမှမရှိပါ @@ -2357,7 +2230,7 @@ It's okay as long as it's from someone you trust. Configure your server - သင်၏ဆာဗာကို စီစဉ်ချိန်ညှိပါ။ + သင်၏ဆာဗာကို စီစဉ်ချိန်ညှိမည် @@ -2382,12 +2255,12 @@ It's okay as long as it's from someone you trust. How to run your VPN server - + သင်၏ဆာဗာကို လည်ပတ်ပုံလည်ပတ်နည်း Where to get connection data, step-by-step instructions for buying a VPS - + ချိတ်ဆက်မှုဒေတာကို ဘယ်မှာရနိုင်မလဲ၊ VPS ဝယ်ယူပုံဝယ်ယူနည်းအတွက် အဆင့်ဆင့် ညွှန်ကြားချက်များ @@ -2415,12 +2288,12 @@ It's okay as long as it's from someone you trust. Choose a VPN protocol - VPN ပရိုတိုကောကို ရွေးပါ။ + VPN ပရိုတိုကောကို ရွေးပါ Skip setup - စနစ်ထည့်သွင်းမှုကို ကျော်သွားပါ။ + စနစ်ထည့်သွင်းမှုကို ကျော်မည် @@ -2464,7 +2337,7 @@ It's okay as long as it's from someone you trust. Usually it takes no more than 5 minutes - များသောအားဖြင့် 5 မိနစ်ထက်မပိုပါ + များသောအားဖြင့် 5 မိနစ်ထက်ပိုမကြာပါ @@ -2472,7 +2345,7 @@ It's okay as long as it's from someone you trust. Installing %1 - ထည့်သွင်းနေသည် %1 + %1 ကိုထည့်သွင်းနေသည် @@ -2500,9 +2373,9 @@ It's okay as long as it's from someone you trust. ထည်သွင်းမည် - + The port must be in the range of 1 to 65535 - + Port သည် 1 မှ 65535 အတွင်း ဖြစ်ရမည် @@ -2515,7 +2388,7 @@ It's okay as long as it's from someone you trust. Choose the one with the highest priority for you. Later, you can install other protocols and additional services, such as DNS proxy and SFTP. - သင့်အတွက် ဦးစားပေးအဖြစ်ဆုံးကို ရွေးချယ်ပါ. နောက်ပိုင်းတွင်၊ သင်သည် DNS proxy နှင့် SFTP ကဲ့သို့သော အခြားပရိုတိုကောများနှင့် ထပ်ဆောင်းဝန်ဆောင်မှုများကို ထည့်သွင်းနိုင်သည်. + သင့်အတွက် ဦးစားပေးအဖြစ်ဆုံးကို ရွေးချယ်ပါ။ နောက်ပိုင်းတွင် DNS proxy နှင့် SFTP ကဲ့သို့သော အခြားပရိုတိုကောများနှင့် ထပ်ဆောင်းဝန်ဆောင်မှုများကို ထည့်သွင်းနိုင်သည်။. @@ -2528,34 +2401,10 @@ It's okay as long as it's from someone you trust. PageSetupWizardStart - - Settings restored from backup file - ဆက်တင်များကို အရန်သိမ်းဆည်းထားသောဖိုင်မှ ပြန်လည်ရယူပြီးပါပြီ - - - Free service for creating a personal VPN on your server. - သင့်ဆာဗာပေါ်တွင် ကိုယ်ပိုင် VPN ဖန်တီးရန်အတွက် အခမဲ့ဝန်ဆောင်မှု. - - - Helps you access blocked content without revealing your privacy, even to VPN providers. - အခြား VPN ဝန်ဆောင်မှုများကိုပင် သင်၏ privacy ကိုမဖော်ပြဘဲ ပိတ်ဆို့ထားသော အကြောင်းအရာများကို သင်ဝင်ရောက်ကြည့်ရှုနိုင်ရန် အကူအညီပေးပါသည်. - - - I have the data to connect - ကျွန်ုပ်တွင်ချိတ်ဆက်ဖို့အတွက်ဒေတာရှိသည် - - - I have nothing - ကျွန်ုပ်တွင်ဘာမှမရှိပါ - - - https://amnezia.org/instructions/0_starter-guide - https://amnezia.org/instructions/0_starter-guide - Let's get started - + စတင်လိုက်ကြရအောင် @@ -2606,12 +2455,12 @@ It's okay as long as it's from someone you trust. Enable WireGuard obfuscation. It may be useful if WireGuard is blocked on your provider. - + WireGuard obfuscation ကိုဖွင့်ထားပါ။ အကယ်၍ သင်၏အင်တာနက်ဝန်ဆောင်မှုပေးသောကုမ္ပဏီက WireGuard ပိတ်ဆို့ထားသော် ၎င်းကိုဖွင့်ထားခြင်းအားဖြင့်အသုံးဝင်နိုင်သည်။. Use connection codes only from sources you trust. Codes from public sources may have been created to intercept your data. - သင်ယုံကြည်ရသော ရင်းမြစ်များမှသာ ချိတ်ဆက်ကုဒ်များကို အသုံးပြုပါ။ သင့်ဒေတာကို ကြားဖြတ်ရန် အများသူငှာ ရင်းမြစ်များမှ ကုဒ်များကို ဖန်တီးထားသည်။ + သင်ယုံကြည်ရသော ရင်းမြစ်များမှရရှိသော ချိတ်ဆက်ကုဒ်များကိုသာ အသုံးပြုပါ။ လူတိုင်းဝင်ရောက်ရယူနေနိုင်သော ရင်းမြစ်များမှကုဒ်များသည် သင့်ဒေတာကို ကြားဖြတ်ရယူရန် ဖန်တီးထားသောကုဒ်များဖြစ်နေနိုင်သည်။. @@ -2685,7 +2534,7 @@ It's okay as long as it's from someone you trust. Save XRay config - + XRay config ကိုသိမ်းဆည်းမည် @@ -2710,7 +2559,7 @@ It's okay as long as it's from someone you trust. XRay native format - + XRay မူရင်းဖော်မတ် @@ -2746,26 +2595,22 @@ It's okay as long as it's from someone you trust. Creation date: %1 - + ဖန်တီးပြုလုပ်သည့်ရက်စွဲ: %1 Latest handshake: %1 - + နောက်ဆုံး handshake လုပ်ခြင်း: %1 Data received: %1 - + လက်ခံရရှိသည့်ဒေတာ: %1 Data sent: %1 - - - - Creation date: - ဖန်တီးပြုလုပ်သည့်ရက်စွဲ: + ပေးပို့လိုက်သည့်ဒေတာ: %1 @@ -2887,12 +2732,12 @@ It's okay as long as it's from someone you trust. Logging was disabled after 14 days, log files were deleted - + ၁၄ ရက်အကြာတွင် Logging ကို ပိတ်ခဲ့သည်၊ မှတ်တမ်းဖိုင်များကို ဖျက်ပစ်လိုက်ပြီဖြစ်သည် Settings restored from backup file - + ဆက်တင်များကို အရံဖိုင်မှ ပြန်လည်ရယူပြီးပါပြီ @@ -3216,58 +3061,6 @@ It's okay as long as it's from someone you trust. Timeout connecting to server ဆာဗာသို့ ချိတ်ဆက်ခြင်း အချိန်ကုန်သွားသည် - - Sftp error: End-of-file encountered - Sftp မှားယွင်းမှု: ဖိုင်အဆုံးသတ်ကို ကြုံတွေ့ခဲ့ရသည် - - - Sftp error: File does not exist - Sftp မှားယွင်းမှု: ဖိုင်မရှိပါ - - - Sftp error: Permission denied - Sftp မှားယွင်းမှု: ခွင့်ပြုချက် ငြင်းဆိုခံလိုက်ရပါသည် - - - Sftp error: Generic failure - Sftp မှားယွင်းမှု: ယေဘုယ မအောင်မြင်ခြင်း - - - Sftp error: Garbage received from server - မှားယွင်းမှု: ဆာဗာမှ အမှိုက်များကို လက်ခံရရှိခဲ့သည် - - - Sftp error: No connection has been set up - Sftp မှားယွင်းမှု: ချိတ်ဆက်မှု မသတ်မှတ်ရသေးပါ - - - Sftp error: There was a connection, but we lost it - Sftp မှားယွင်းမှု: ချိတ်ဆက်မှုတစ်ခုရှိခဲ့သော်လည်း ဆုံးရှုံးသွားခဲ့ပါသည် - - - Sftp error: Operation not supported by libssh yet - Sftp အမှား: လုပ်ဆောင်ချက်ကို libssh မှ မထောက်ပံ့သေးပါ - - - Sftp error: Invalid file handle - Sftp မှားယွင်းမှု: ဖိုင်ကိုင်တွယ်မှု မမှန်ကန်ပါ - - - Sftp error: No such file or directory path exists - Sftp မှားယွင်းမှု: ဤဖိုင်အမျိုးအစား သို့မဟုတ် လမ်းညွှန်လမ်းကြောင်းမျိုး မရှိပါ - - - Sftp error: An attempt to create an already existing file or directory has been made - Sftp မှားယွင်းမှု: ရှိပြီးသား ဖိုင် သို့မဟုတ် လမ်းညွှန်ကို ဖန်တီးရန် ကြိုးပမ်းမှုတစ်ခု ပြုလုပ်ပြီးဖြစ်သည် - - - Sftp error: Write-protected filesystem - Sftp မှားယွင်းမှု: ရေးသားခြင်းမှကာကွယ်ထားသော ဖိုင်စနစ် - - - Sftp error: No media was in remote drive - Sftp မှားယွင်းမှု: မီဒီယာသည် အဝေးမှ drive ထဲတွင် မရှိခဲ့ပါ - The config does not contain any containers and credentials for connecting to the server @@ -3296,17 +3089,17 @@ It's okay as long as it's from someone you trust. Background service is not running - + နောက်ခံဝန်ဆောင်မှု လည်ပတ်နေခြင်းမရှိပါ Server error: Packet manager error - + ဆာဗာ မှားယွင်းမှု: Packet Manager မှားယွင်းမှု SCP error: Generic failure - + SCP မှားယွင်းမှု: ယေဘုယ မအောင်မြင်ခြင်း @@ -3361,52 +3154,52 @@ It's okay as long as it's from someone you trust. In the response from the server, an empty config was received - + ဆာဗာမှ တုံ့ပြန်မှုတွင်၊ config အလွတ်တစ်ခုကို လက်ခံရရှိခဲ့သည် SSL error occurred - + SSL မှားယွင်းမှုဖြစ်သွားသည် Server response timeout on api request - + Api တောင်းဆိုမှုတွင် ဆာဗာတုံ့ပြန်မှု အချိန်ကုန်သွားသည် Missing AGW public key - + AGW public key ပျောက်ဆုံးနေသည် QFile error: The file could not be opened - + QFile မှားယွင်းမှု: ဖိုင်ကို ဖွင့်၍မရပါ QFile error: An error occurred when reading from the file - + QFile မှားယွင်းမှု: ဖိုင်ကိုဖတ်နေစဥ်အတွင်း မှားယွင်းမှုဖြစ်သွားသည် QFile error: The file could not be accessed - + QFile မှားယွင်းမှု: ဖိုင်ကို ဝင်၍မရပါ QFile error: An unspecified error occurred - + QFile မှားယွင်းမှု: သတ်မှတ်မထားသော မှားယွင်းမှုတစ်ခု ဖြစ်ပွားခဲ့သည် QFile error: A fatal error occurred - + QFile မှားယွင်းမှု: ကြီးမားသော မှားယွင်းမှုတစ်ခု ဖြစ်ပွားခဲ့သည် QFile error: The operation was aborted - + QFile မှားယွင်းမှု: လုပ်ငန်းစဥ်ကို ဖျက်သိမ်းလိုက်ရသည် @@ -3431,12 +3224,12 @@ It's okay as long as it's from someone you trust. XRay with REALITY - Suitable for countries with the highest level of internet censorship. Traffic masking as web traffic at the TLS level, and protection against detection by active probing methods. - + REALITY ပါဝင်သော XRay - အင်တာနက်ဆင်ဆာဖြတ်တောက်မှုအပြင်းထန်ဆုံးနိုင်ငံများအတွက် သင့်လျော်သည်။ Web traffic အဖြစ် အသွားအလာကို TLS အဆင့်ဖြင့် ဖုံးကွယ်ပေးထားခြင်း၊ Active probing နည်းလမ်းများဖြင့် ထောက်လှမ်းခံရခြင်းမှ ကာကွယ်ပေးခြင်းများ။. IKEv2/IPsec - Modern stable protocol, a bit faster than others, restores connection after signal loss. It has native support on the latest versions of Android and iOS. - + IKEv2/IPsec - ခေတ်မီပြီးတည်ငြိမ်သော ပရိုတိုကော၊ အခြားပရိုတိုကောများထက် အနည်းငယ်ပိုမြန်သည်၊ Signal ဆုံးရှုံးပြီးနောက် ချိတ်ဆက်မှုကို ပြန်လည်ရယူနိုင်သည်။ Android နှင့် iOS ၏ နောက်ဆုံးဗားရှင်းများတွင် native ပံ့ပိုးမှုရရှိသည်။. @@ -3509,7 +3302,10 @@ WireGuard သည် ၎င်း၏ ကွဲပြားသော packet လက It uniquely identifies censors during the TLS handshake phase, seamlessly operating as a proxy for legitimate clients while diverting censors to genuine websites like google.com, thus presenting an authentic TLS certificate and data. This advanced capability differentiates REALITY from similar technologies by its ability to disguise web traffic as coming from random, legitimate sites without the need for specific configurations. Unlike older protocols such as VMess, VLESS, and the XTLS-Vision transport, REALITY's innovative "friend or foe" recognition at the TLS handshake enhances security and circumvents detection by sophisticated DPI systems employing active probing techniques. This makes REALITY a robust solution for maintaining internet freedom in environments with stringent censorship. - + The REALITY protocol, a pioneering development by the creators of XRay, is specifically designed to counteract the highest levels of internet censorship through its novel approach to evasion. +It uniquely identifies censors during the TLS handshake phase, seamlessly operating as a proxy for legitimate clients while diverting censors to genuine websites like google.com, thus presenting an authentic TLS certificate and data. +This advanced capability differentiates REALITY from similar technologies by its ability to disguise web traffic as coming from random, legitimate sites without the need for specific configurations. +Unlike older protocols such as VMess, VLESS, and the XTLS-Vision transport, REALITY's innovative "friend or foe" recognition at the TLS handshake enhances security and circumvents detection by sophisticated DPI systems employing active probing techniques. This makes REALITY a robust solution for maintaining internet freedom in environments with stringent censorship. @@ -3568,10 +3364,6 @@ IKEv2 သည် လုံခြုံရေး၊ တည်ငြိမ်မှ AmneziaWG - Special protocol from Amnezia, based on WireGuard. It's fast like WireGuard, but very resistant to blockages. Recommended for regions with high levels of censorship. AmneziaWG - WireGuard ကိုအခြေခံထားသော Amnezia မှ အထူးပရိုတိုကော. ၎င်းသည် WireGuard ကဲ့သို့မြန်ဆန်သော်ပြီး ပိတ်ဆို့ခြင်းများကိုလည်း ခံနိုင်ရည်ရှိပါသည်. ဆင်ဆာဖြတ်တောက်မှု မြင့်မားသော ဒေသများတွင်အသုံးပြုရန် အကြံပြုပါသည်. - - IKEv2/IPsec - Modern stable protocol, a bit faster than others, restores connection after signal loss. - IKEv2/IPsec - ခေတ်မီတည်ငြိမ်သောပရိုတိုကော၊ အခြားအရာများထက်အနည်းငယ်ပိုမြန်သည်၊ signal ပျောက်ဆုံးပြီးနောက် ချိတ်ဆက်မှုကို ပြန်လည်ရယူပေးသည်. - Deploy a WordPress site on the Tor network in two clicks. @@ -3666,7 +3458,7 @@ For more detailed information, you can SOCKS5 proxy server - + SOCKS5 proxy ဆာဗာ @@ -3726,133 +3518,133 @@ For more detailed information, you can vmess:// url is invalid - + vmess:// url သည် မမှန်ကန်ပါ Invalid streamSettings protocol: - + မမှန်ကန်သော streamSettings ပရိုတိုကော: Unknown transport method: - + အမည်မသိ သယ်ယူပို့ဆောင်ရေးနည်းလမ်း: VMess string should start with 'vmess://' - + VMess စာကြောင်းသည် 'vmess://' ဖြင့် စတင်သည် VMess string should be a valid base64 string - + VMess စာကြောင်း သည် မှန်ကန်သော base64 စာကြောင်း ဖြစ်ရမည် JSON should not be empty - + JSON သည် ဗလာမဖြစ်ရပါ VLESS link should start with vless:// - + VLESS စာကြောင်းသည် 'vless://' ဖြင့် စတင်သည် link parse failed: %1 - + လင့်ခ်ခွဲခြမ်းစိတ်ဖြာမှု မအောင်မြင်ပါ: %1 empty host - + Host ဗလာဖြစ်နေသည် missing port - + Port ပျောက်ဆုံးနေသည် missing uuid - + uuid ပျောက်ဆုံးနေသည် Invalid ssd link: json: field %1 must exist - + မမှန်ကန်သော ssd လင့်ခ်: json: အကွက် %1 ရှိရပါမည် Invalid ssd link: json: field %1 must be valid port number - + မမှန်ကန်သော ssd လင့်ခ်: json: အကွက် %1 သည် မှန်ကန်သော port နံပါတ် ဖြစ်ရပါမည် Invalid ssd link: json: field %1 must be of type 'string' - + မမှန်ကန်သော ssd လင့်ခ်: json: အကွက် %1 သည် 'စာကြောင်း' အမျိုးအစား ဖြစ်ရမည် Invalid ssd link: json: field %1 must be an array - + မမှန်ကန်သော ssd လင့်ခ်: json: အကွက် %1 သည် array တစ်ခု ဖြစ်ရမည် Skipping invalid ssd server: server must be an object - + မမှန်ကန်သော ssd ဆာဗာကို ကျော်သွားသည်: ဆာဗာသည် object တစ်ခု ဖြစ်ရပါမည် Skipping invalid ssd server: missing required field %1 - + မမှန်ကန်သော ssd ဆာဗာကို ကျော်သွားသည်: လိုအပ်သောအကွက် %1 ပျောက်ဆုံးနေပါသည် Skipping invalid ssd server: field %1 should be of type 'string' - + မမှန်ကန်သော ssd ဆာဗာကို ကျော်သွားသည်: အကွက် %1 သည် 'စာကြောင်း' အမျိုးအစား ဖြစ်ရမည် Invalid ssd link: should begin with ssd:// - + မမှန်ကန်သော ssd လင့်ခ်: ssd:// ဖြင့် စတင်ရမည် Invalid ssd link: base64 parse failed - + မမှန်ကန်သော ssd လင့်ခ်: base64 ခွဲခြမ်းစိတ်ဖြာမှု မအောင်မြင်ပါ Invalid ssd link: json parse failed - + မမှန်ကန်သော ssd လင့်ခ်: json ခွဲခြမ်းစိတ်ဖြာမှု မအောင်မြင်ပါ Invalid ssd link: rc4-md5 encryption is not supported by v2ray-core - + မမှန်ကန်သော ssd လင့်ခ်: rc4-md5 ကုဒ်ဝှက်ခြင်းကို v2ray-core က မပံ့ပိုးပေးပါ SS URI is too short - + SS URI တိုလွန်းသည် Can't find the colon separator between method and password - + Method နှင့် စကားဝှက်ကြားရှိ colon seperator ကို ရှာမတွေ့ပါ Can't find the at separator between password and hostname - + စကားဝှက်နှင့် hostname ကြား at seperator ကို ရှာမတွေ့ပါ Can't find the colon separator between hostname and port - + Hostname နှင့် port ကြားရှိ colon separator ကို ရှာမတွေ့ပါ @@ -3884,14 +3676,10 @@ For more detailed information, you can All settings have been reset to default values ဆက်တင်အားလုံးကို မူရင်းတန်ဖိုးများအဖြစ် ပြန်လည်သတ်မှတ်ထားသည် - - Cached profiles cleared - ကက်ရှ်ပရိုဖိုင်များကို ရှင်းလင်းပြီးပါပြီ - Backup file is corrupted - အရန်သိမ်းထားသည့်ဖိုင်ပျက်ဆီးနေသည် + အရံဖိုင်ပျက်ဆီးနေသည် @@ -4079,11 +3867,7 @@ For more detailed information, you can High - Medium သို့မဟုတ် High - - - Extreme - Extreme + High @@ -4095,10 +3879,6 @@ For more detailed information, you can I want to bypass censorship. This option recommended in most cases. ဆင်ဆာဖြတ်တောက်ခြင်းကို ကျော်ဖြတ်ချင်ပါသည်. ဤရွေးချယ်မှုကို ကိစ္စအများစုအတွက် အကြံပြုထားသည်. - - Most VPN protocols are blocked. Recommended if other options are not working. - VPN ပရိုတိုကောအများစုကို ပိတ်ဆို့ထားသည်. အခြားရွေးချယ်စရာများ အလုပ်မလုပ်ပါက အသုံးပြုရန်အကြံပြုထားသည်. - main2 diff --git a/client/translations/amneziavpn_uk_UA.ts b/client/translations/amneziavpn_uk_UA.ts index c7206586..11377c4d 100644 --- a/client/translations/amneziavpn_uk_UA.ts +++ b/client/translations/amneziavpn_uk_UA.ts @@ -29,47 +29,47 @@ Classic VPN for comfortable work, downloading large files and watching videos. Works for any sites. Speed up to %1 MBit/s - + Звичайний VPN для комфортної роботи, завантаження великих файлів та перегляду відео. Працює для будь-яких сайтів. Швидкість до %1 MBit/s VPN to access blocked sites in regions with high levels of Internet censorship. - + VPN для доступу до заблокованих сайтів у регіонах з високим рівнем інтернет-цензури. Amnezia Premium - A classic VPN for comfortable work, downloading large files, and watching videos in high resolution. It works for all websites, even in countries with the highest level of internet censorship. - + Amnezia Premium - звичайний VPN для комфортної роботи, завантаження великих файлів та перегляду відео у високій роздільній здатності. Працює для всіх вебсайтів, навіть у країнах з найвищим рівнем інтернет-цензури. Amnezia Free is a free VPN to bypass blocking in countries with high levels of internet censorship - + Amnezia Free — це безкоштовний VPN для обходу блокувань у країнах з високим рівнем інтернет-цензури %1 MBit/s - + %1 MBit/s %1 days - + %1 днів VPN will open only popular sites blocked in your region, such as Instagram, Facebook, Twitter and others. Other sites will be opened from your real IP address, <a href="%1/free" style="color: #FBB26A;">more details on the website.</a> - + Лише популярні сайти, які заблоковані у вашому регіоні, будуть відкриватись за допомогою VPN підключення (Instagram, Facebook, Twitter та ін.). Звичайні сайти будуть відкриватися без використання VPN, <a href="%1/free" style="color: #FBB26A;">більш детально на нашому сайті.</a> Free - + Безкоштовно %1 $/month - + %1 $/місяць @@ -77,22 +77,22 @@ Application added: %1 - + Застосунок додано: %1 The application has already been added - + Застосунок вже додано The selected applications have been added - + Вибрані застосунки додані Application removed: %1 - + Застосунок видалено: %1 @@ -100,7 +100,7 @@ Unable to disconnect during configuration preparation - + Неможливо відключитися під час підготовки конфігурації @@ -115,7 +115,7 @@ unable to create configuration - + Неможливо створити конфігурацію @@ -130,7 +130,7 @@ Preparing... - + Підготовка... @@ -140,12 +140,12 @@ Settings updated successfully - Налаштування оновлено. + Налаштування оновлено The selected protocol is not supported on the current platform - Вибраний протокол не підтримується на цьому пристрої + Вибраний протокол не підтримується на цьому пристрої @@ -253,7 +253,7 @@ Enabled Can't be disabled for current server Увімкнено. -Не може бути вимкнено для даного сервера. +Не може бути вимкнено для даного сервера @@ -283,13 +283,13 @@ Can't be disabled for current server Unable to open file - + Неможливо відкрити файл Invalid configuration file - + Недійсний файл конфігурації @@ -299,7 +299,7 @@ Can't be disabled for current server In the imported configuration, potentially dangerous lines were found: - + У імпортованій конфігурації знайдено потенційно небезпечні рядки: @@ -355,12 +355,12 @@ Already installed containers were found on the server. All installed containers Api config removed - + Конфігурацію API видалено %1 cached profile cleared - + Кешований профіль %1 очищено @@ -375,17 +375,17 @@ Already installed containers were found on the server. All installed containers %1 installed successfully. - + %1 встановлено успішно. API config reloaded - + Конфігурацію API перезавантажено Successfully changed the country of connection to %1 - + Успішно змінено країну підключення на %1 @@ -393,17 +393,17 @@ Already installed containers were found on the server. All installed containers Choose application - + Виберіть застосунок application name - + назва застосунку - + Add selected - + Додати вибране @@ -479,17 +479,17 @@ Already installed containers were found on the server. All installed containers Logging enabled - + Логування увімкнено Split tunneling enabled - Роздільне тунелювання увімкнено + Роздільне тунелювання увімкнено Split tunneling disabled - Роздільне тунелювання вимкнено + Роздільне тунелювання вимкнено @@ -572,32 +572,32 @@ Already installed containers were found on the server. All installed containers Save - Зберегти + Зберегти The values of the H1-H4 fields must be unique - + Значення полів H1-H4 мають бути унікальними The value of the field S1 + message initiation size (148) must not equal S2 + message response size (92) - + Значення поля S1 + розмір повідомлення ініціалізації (148) не має бути рівним значенню S2 + розмір повідомлення відповіді (92) Save settings? - + Зберегти налаштування? All users with whom you shared a connection with will no longer be able to connect to it. - + Усі користувачі, з якими ви поділилися підключенням, більше не зможуть підключитися до нього. Unable change settings while there is an active connection - + Неможливо змінити налаштування, поки є активне підключення Remove AmneziaWG @@ -656,12 +656,12 @@ Already installed containers were found on the server. All installed containers Save - Зберегти + Зберегти Unable change settings while there is an active connection - + Неможливо змінити налаштування, поки є активне підключення Save and Restart Amnezia @@ -682,7 +682,7 @@ Already installed containers were found on the server. All installed containers VPN address subnet - + VPN address subnet @@ -840,12 +840,12 @@ Already installed containers were found on the server. All installed containers Save - Зберегти + Зберегти Unable change settings while there is an active connection - + Неможливо змінити налаштування, поки є активне підключення Remove OpenVPN @@ -906,7 +906,7 @@ Already installed containers were found on the server. All installed containers All users with whom you shared a connection with will no longer be able to connect to it. - + Усі користувачі, з якими ви поділилися підключенням, більше не зможуть підключитися до нього. All users with whom you shared a connection will no longer be able to connect to it. @@ -948,12 +948,12 @@ Already installed containers were found on the server. All installed containers Save - Зберегти + Зберегти Unable change settings while there is an active connection - + Неможливо змінити налаштування, поки є активне підключення Save and Restart Amnezia @@ -965,27 +965,27 @@ Already installed containers were found on the server. All installed containers WG settings - + Port - Порт + Порт MTU - + MTU Save - Зберегти + Зберегти Unable change settings while there is an active connection - + Неможливо змінити налаштування, поки є активне підключення @@ -993,22 +993,22 @@ Already installed containers were found on the server. All installed containers XRay settings - + Налаштування XRay Disguised as traffic from - Замаскувати трафік під + Замаскувати трафік під - + Save - Зберегти + Зберегти Unable change settings while there is an active connection - + Неможливо змінити налаштування, поки є активне підключення @@ -1030,7 +1030,7 @@ Already installed containers were found on the server. All installed containers The DNS address is the same as the address of your server. You can configure DNS in the settings, under the connections tab. - Адреса DNS сервера співпадає з адресою вашого сервера. Налаштувати DNS можливо на вкладці "Підключення" налаштувань застосунку + Адреса DNS сервера співпадає з адресою вашого сервера. Налаштувати DNS можливо на вкладці "Підключення" налаштувань застосунку. @@ -1055,7 +1055,7 @@ Already installed containers were found on the server. All installed containers Cannot remove AmneziaDNS from running server - + Не вдається видалити AmneziaDNS з працюючого сервера @@ -1095,7 +1095,7 @@ Already installed containers were found on the server. All installed containers User name - Імя користувача + Імя користувача @@ -1110,7 +1110,7 @@ Already installed containers were found on the server. All installed containers In order to mount remote SFTP folder as local drive, perform following steps: <br> - Для того щоб додати SFTP-папку, як локальний диск на вашому пристрої, виконайте наступні дії: <br> + Для того щоб додати SFTP-папку, як локальний диск на вашому пристрої, виконайте наступні дії: <br> @@ -1151,18 +1151,18 @@ Already installed containers were found on the server. All installed containers Settings updated successfully - + Налаштування успішно оновлено SOCKS5 settings - + Налаштування SOCKS5 Host - Хост + Хост @@ -1170,50 +1170,50 @@ Already installed containers were found on the server. All installed containers Copied - Скопійовано + Скопійовано Port - Порт + Порт User name - + User name Password - Пароль + Пароль Username - + Username Change connection settings - + Змінити налаштування підключення The port must be in the range of 1 to 65535 - + Порт повинен бути в межах від 1 до 65535 Password cannot be empty - + Пароль не може бути порожнім Username cannot be empty - + Ім'я користувача не може бути порожнім @@ -1241,12 +1241,12 @@ Already installed containers were found on the server. All installed containers Use <a href="https://www.torproject.org/download/" style="color: #FBB26A;">Tor Browser</a> to open this URL. - Використовуйте <a href="https://www.torproject.org/download/" style="color: #FBB26A;">Tor Browser</a> для відкриття цього посилання. + Використовуйте <a href="https://www.torproject.org/download/" style="color: #FBB26A;">Tor Browser</a> для відкриття цього посилання. After creating your onion site, it takes a few minutes for the Tor network to make it available for use. - Через кілька хвилин після встановлення ваш сайт Onion стане доступним у мережі Tor. + Через кілька хвилин після встановлення ваш сайт Onion стане доступним у мережі Tor. @@ -1309,7 +1309,7 @@ Already installed containers were found on the server. All installed containers Dev console - + @@ -1351,7 +1351,7 @@ Already installed containers were found on the server. All installed containers Amnezia is a free and open-source application. You can support the developers if you like it. - + Amnezia — це безкоштовний додаток з відкритим кодом. Якщо вам подобається цей додаток, ви можете підтримати розробників. @@ -1415,7 +1415,7 @@ Already installed containers were found on the server. All installed containers Privacy Policy - + Політика конфіденційності @@ -1423,74 +1423,74 @@ Already installed containers were found on the server. All installed containers For the region - + Для регіону Price - + Ціна Work period - + Період роботи Speed - + Швидкість Support tag - + Copied - Скопійовано + Скопійовано Reload API config - + Перезавантажити конфігурацію API Reload API config? - + Перезавантажити конфігурацію API? Continue - Продовжити + Продовжити Cancel - Відмінити + Відмінити Cannot reload API config during active connection - + Неможливо перезавантажити конфігурацію API під час активного підключення Remove from application - + Видалити з додатку Remove from application? - + Видалити з додатку? Cannot remove server during active connection - + Неможливо видалити сервер під час активного підключення @@ -1498,57 +1498,57 @@ Already installed containers were found on the server. All installed containers Cannot change split tunneling settings during active connection - Не можна змінити налаштування роздільного тунелювання при підключеному VPN + Не можна змінити налаштування роздільного тунелювання при підключеному VPN Only the apps from the list should have access via VPN - + Доступ через VPN мають лише програми зі списку Apps from the list should not have access via VPN - + Програми зі списку не мають доступ через VPN App split tunneling - + Split tunneling для додатка Mode - Режим + Режим Remove - Видалити + Видалити Continue - Продовжити + Продовжити Cancel - Відмінити + Відмінити application name - + назва додатка Open executable file - + Відкрити виконуваний файл Executable files (*.*) - + Виконувані файли (*.*) @@ -1561,37 +1561,37 @@ Already installed containers were found on the server. All installed containers Allow application screenshots - Дозволити скріншоти в застосунку + Дозволити скріншоти у застосунку Enable notifications - + Увімкнути сповіщення Enable notifications to show the VPN state in the status bar - + Увімкнути сповіщення (показує стан VPN у статус барі) Auto start - Автозапуск + Автозапуск Launch the application every time the device is starts - Запускати застосунок при старті + Запускати застосунок при старті Auto connect - Автопідключення + Автопідключення Connect to VPN on app start - Підключення до VPN при старті застосунку + Підключення до VPN при старті застосунку @@ -1604,7 +1604,7 @@ Already installed containers were found on the server. All installed containers Запускати застосунок в згорнутому вигляді - + Language Мова @@ -1651,7 +1651,7 @@ Already installed containers were found on the server. All installed containers Cannot reset settings during active connection - + Неможливо скинути налаштування під час активного підключення @@ -1672,17 +1672,17 @@ Already installed containers were found on the server. All installed containers Back up your configuration - + Резервне копіювання вашої конфігурації You can save your settings to a backup file to restore them the next time you install the application. - Ви можете зберегти свої налаштування у бекап файл (резервну копію), щоб відновити їх під час наступного встановлення програми + Ви можете зберегти свої налаштування у бекап файл (резервну копію), щоб відновити їх під час наступного встановлення програми. The backup will contain your passwords and private keys for all servers added to AmneziaVPN. Keep this information in a secure place. - + Резервна копія міститиме ваші паролі та приватні ключі для всіх серверів, доданих до AmneziaVPN. Зберігайте цю інформацію у безпечному місці. @@ -1738,7 +1738,7 @@ Already installed containers were found on the server. All installed containers Cannot restore backup settings during active connection - + Неможливо відновити резервну копію налаштувань під час активного підключення @@ -1774,27 +1774,27 @@ Already installed containers were found on the server. All installed containers When AmneziaDNS is not used or installed - Ці адреси будуть використовуватись коли вимкнений AmneziaDNS + Ці адреси будуть використовуватись коли вимкнений AmneziaDNS Allows you to use the VPN only for certain Apps - Дозволяє використовувати VPN тільки для вибраних застосунків + Дозволяє використовувати VPN тільки для вибраних застосунків KillSwitch - + KillSwitch Disables your internet if your encrypted VPN connection drops out for any reason. - + Вимикає ваш інтернет, якщо ваше захищене VPN-підключення зникає з будь-якої причини. Cannot change killSwitch settings during active connection - + Неможливо змінити налаштування killSwitch під час активного підключення @@ -1821,7 +1821,7 @@ Already installed containers were found on the server. All installed containers Default server does not support custom DNS - Сервер за замовчуванням не підтримує користувацький DNS + Сервер за замовчуванням не підтримує користувацький DNS @@ -1835,7 +1835,7 @@ Already installed containers were found on the server. All installed containers If AmneziaDNS is not used or installed - Якщо AmneziaDNS вимкнено або не встановлено + Якщо AmneziaDNS вимкнено або не встановлено @@ -1888,7 +1888,7 @@ Already installed containers were found on the server. All installed containers Logging is enabled. Note that logs will be automatically disabled after 14 days, and all log files will be deleted. - + Логування увімкнене. Зверніть увагу, що логування буде автоматично вимкнене через 14 днів, а всі файли журналів будуть видалені. @@ -1898,7 +1898,7 @@ Already installed containers were found on the server. All installed containers Enabling this function will save application's logs automatically. By default, logging functionality is disabled. Enable log saving in case of application malfunction. - + Увімкнення цієї функції автоматично зберігатиме журнали додатка. За замовчуванням функція логування вимкнена. Увімкніть збереження журналів у випадку збою додатка. @@ -2014,62 +2014,62 @@ Already installed containers were found on the server. All installed containers Reboot server - Перезавантажити сервер + Перезавантажити сервер Do you want to reboot the server? - Ви впевнені, що хочете перезавантажити сервер? + Ви впевнені, що хочете перезавантажити сервер? The reboot process may take approximately 30 seconds. Are you sure you wish to proceed? - Процес перезавантаження може зайняти близько 30 сек. Ви впевені, що хочете продовжити? + Процес перезавантаження може зайняти близько 30 сек. Ви впевені, що хочете продовжити? Cannot reboot server during active connection - + Неможливо перезавантажити сервер під час активного підключення Remove server from application - + Видалити сервер з додатка Do you want to remove the server from application? - Ви впевнені, що хочете видалити сервер із застосунку? + Ви впевнені, що хочете видалити сервер із застосунку? Cannot remove server during active connection - + Неможливо видалити сервер під час активного підключення Clear server from Amnezia software - + Очистити сервер від програмного забезпечення Amnezia Do you want to clear server from Amnezia software? - + Ви дійсно хочете очистити сервер від програмного забезпечення Amnezia? All users whom you shared a connection with will no longer be able to connect to it. - + Усі користувачі, з якими ви поділилися підключенням, більше не зможуть підключитися до нього. Cannot clear server from Amnezia software during active connection - + Неможливо очистити сервер від програмного забезпечення Amnezia під час активного підключення Cannot reset API config during active connection - + Неможливо скинути конфігурацію API під час активного підключення Do you want to clear server Amnezia-installed services? @@ -2083,7 +2083,7 @@ Already installed containers were found on the server. All installed containers Do you want to reset API config? - Ви хочете скинути API конфігурацію + Ви хочете скинути API конфігурацію? Remove this server from the app @@ -2136,7 +2136,7 @@ Already installed containers were found on the server. All installed containers Management - + Управління Data @@ -2153,22 +2153,22 @@ Already installed containers were found on the server. All installed containers Clear %1 profile - + Очистити профіль %1 Clear %1 profile? - + Очистити профіль %1? Unable to clear %1 profile while there is an active connection - + Неможливо очистити профіль %1 під час активного підключення Cannot remove active container - + Неможливо видалити активний контейнер @@ -2268,17 +2268,17 @@ Already installed containers were found on the server. All installed containers Cannot change split tunneling settings during active connection - Не можна змінити налаштування роздільного тунелювання при підключеному VPN + Не можна змінити налаштування роздільного тунелювання при підключеному VPN Default server does not support split tunneling function - + website or IP - вебсайт або IP + вебсайт або IP @@ -2329,32 +2329,32 @@ Already installed containers were found on the server. All installed containers For the region - + Для регіону Price - + Ціна Work period - + Період роботи Speed - + Швидкість Features - + Особливості Connect - Підключитись + Підключитись @@ -2362,12 +2362,12 @@ Already installed containers were found on the server. All installed containers VPN by Amnezia - + VPN від Amnezia Choose a VPN service that suits your needs. - + Виберіть VPN-сервіс, який відповідає вашим потребам. @@ -2404,67 +2404,67 @@ It's okay as long as it's from someone you trust. Connection - + Підключення Insert the key, add a configuration file or scan the QR-code - + Вставте ключ, додайте файл конфігурації або відскануйте QR-код Insert key - + Вставити ключ Insert - Вставити + Вставити Continue - Продовжити + Продовжити Other connection options - + Інші параметри підключення VPN by Amnezia - + VPN від Amnezia Connect to classic paid and free VPN services from Amnezia - + Підключайтеся до звичайних платних та безкоштовних VPN-сервісів від Amnezia Self-hosted VPN - + Self-hosted VPN Configure Amnezia VPN on your own server - + Налаштуйте Amnezia VPN на власному сервері Restore from backup - Відновити із бекапа + Відновити із бекапа Open backup file - Відкрити бекап файл + Відкрити бекап файл Backup files (*.backup) - Файли резервної копії (*.backup) + Файли резервної копії (*.backup) @@ -2479,7 +2479,7 @@ It's okay as long as it's from someone you trust. I have nothing - У мене нічого нема + У мене нічого нема Key as text @@ -2533,32 +2533,32 @@ and will not be shared or disclosed to the Amnezia or any third parties 255.255.255.255:22 - + 255.255.255.255:22 SSH Username - + SSH Username Password or SSH private key - + Пароль або SSH ключ All data you enter will remain strictly confidential and will not be shared or disclosed to the Amnezia or any third parties - Усі дані, які ви вводите, залишатимуться суворо конфіденційними та не будуть передані чи розголошені Amnezia або будь-яким третім особам + Усі дані, які ви вводите, залишатимуться суворо конфіденційними та не будуть передані чи розголошені Amnezia або будь-яким третім особам How to run your VPN server - + Як запустити ваш VPN-сервер Where to get connection data, step-by-step instructions for buying a VPS - + Де отримати дані для підключення: покрокові інструкції з придбання VPS @@ -2586,12 +2586,12 @@ and will not be shared or disclosed to the Amnezia or any third parties Choose a VPN protocol - + Виберіть протокол VPN Skip setup - + Пропустити налаштування Set up a VPN yourself @@ -2649,7 +2649,7 @@ and will not be shared or disclosed to the Amnezia or any third parties Cancel installation - Відмінити встановлення + Відмінити встановлення @@ -2693,7 +2693,7 @@ and will not be shared or disclosed to the Amnezia or any third parties The port must be in the range of 1 to 65535 - + Порт повинен бути в межах від 1 до 65535 @@ -2714,7 +2714,7 @@ and will not be shared or disclosed to the Amnezia or any third parties Point the camera at the QR code and hold for a couple of seconds. - Наведіть камеру на QR-код і утримуйте її протягом декількох секунд. + Наведіть камеру на QR-код і утримуйте її протягом декількох секунд. @@ -2742,7 +2742,7 @@ and will not be shared or disclosed to the Amnezia or any third parties Let's get started - + Почнемо @@ -2801,12 +2801,12 @@ and will not be shared or disclosed to the Amnezia or any third parties Enable WireGuard obfuscation. It may be useful if WireGuard is blocked on your provider. - + Увімкніть обфускацію WireGuard. Це може бути корисним, якщо WireGuard заблокований у вашого провайдера. Use connection codes only from sources you trust. Codes from public sources may have been created to intercept your data. - + Використовуйте коди підключення тільки з джерел, яким ви довіряєте. Коди з публічних джерел можуть бути створені для перехоплення ваших даних. @@ -2856,7 +2856,7 @@ and will not be shared or disclosed to the Amnezia or any third parties Config revoked - Кофігурацію відкликано + Кофігурацію відкликано @@ -2881,22 +2881,22 @@ and will not be shared or disclosed to the Amnezia or any third parties Save AmneziaWG config - Зберегти AmneziaWG конфігурацію + Зберегти AmneziaWG конфігурацію Save Shadowsocks config - Зберегти конфігурацію Shadowsocks + Зберегти конфігурацію Shadowsocks Save Cloak config - Зберегти конфігурацію Cloak + Зберегти конфігурацію Cloak Save XRay config - + Зберегти конфігурацію XRay @@ -2906,22 +2906,22 @@ and will not be shared or disclosed to the Amnezia or any third parties AmneziaWG native format - нативний формат AmneziaWG + нативний формат AmneziaWG Shadowsocks native format - Shadowsocks нативний формат + Shadowsocks нативний формат Cloak native format - Cloak нативний формат + Cloak нативний формат XRay native format - + XRay нативний формат @@ -2931,48 +2931,48 @@ and will not be shared or disclosed to the Amnezia or any third parties Share full access to the server and VPN - Поділитись повним доступом до серверу + Поділитись повним доступом до серверу Use for your own devices, or share with those you trust to manage the server. - Використовуйте для власних пристроїв або передайте керування сервером тим, кому довіряєте. + Використовуйте для власних пристроїв або передайте керування сервером тим, кому довіряєте. Users - Користувачі + Користувачі User name - Ім'я користувача + Ім'я користувача Search - Пошук + Пошук Creation date: %1 - + Дата створення: %1 Latest handshake: %1 - + Останнє з'єднання: %1 Data received: %1 - + Отримано даних: %1 Data sent: %1 - + Відправлено даних: %1 Creation date: @@ -2981,42 +2981,42 @@ and will not be shared or disclosed to the Amnezia or any third parties Rename - Перейменувати + Перейменувати Client name - + Назва клієнта Save - Зберегти + Зберегти Revoke - Відкликати + Відкликати Revoke the config for a user - %1? - Відкликати доступ для користувача - %1? + Відкликати доступ для користувача - %1? The user will no longer be able to connect to your server. - Користувач більше не зможе підключатись до вашого сервера + Користувач більше не зможе підключатись до вашого сервера - + Continue - Продовжити + Продовжити Cancel - Відмінити + Відмінити Full access @@ -3051,49 +3051,49 @@ and will not be shared or disclosed to the Amnezia or any third parties Full access to the server and VPN - Повний доступ до серверу та VPN + Повний доступ до серверу та VPN We recommend that you use full access to the server only for your own additional devices. - Ми рекомендуємо використовувати повний доступ тілки для власних пристроїв. + Ми рекомендуємо використовувати повний доступ тілки для власних пристроїв. If you share full access with other people, they can remove and add protocols and services to the server, which will cause the VPN to work incorrectly for all users. - Якщо ви ділитеся повним доступом з іншими людьми, вони можуть видаляти та додавати протоколи та служби на сервер, що призведе до некоректної роботи VPN для всіх користувачів. + Якщо ви ділитеся повним доступом з іншими людьми, вони можуть видаляти та додавати протоколи та служби на сервер, що призведе до некоректної роботи VPN для всіх користувачів. Server - Сервер + Сервер Accessing - Доступ + Доступ File with accessing settings to - Файл з налаштуваннями доступу до + Файл з налаштуваннями доступу до Share - Поділитись + Поділитись Connection to - Підключення до + Підключення до File with connection settings to - Файл з налаштуванням доступу до + Файл з налаштуванням доступу до @@ -3101,12 +3101,12 @@ and will not be shared or disclosed to the Amnezia or any third parties Logging was disabled after 14 days, log files were deleted - + Логування було вимкнене через 14 днів, файли журналів були видалені Settings restored from backup file - Відновлення налаштувань із бекап файлу + Відновлення налаштувань із бекап файлу @@ -3639,22 +3639,22 @@ and will not be shared or disclosed to the Amnezia or any third parties Shadowsocks - masks VPN traffic, making it similar to normal web traffic, but it may be recognized by analysis systems in some highly censored regions. - Shadowsocks - маскує VPN-трафік під звичайний веб-трафік, але розпізнається системами аналізу трафіка в деяких регіонах з високим рівнем цензури. + Shadowsocks - маскує VPN-трафік під звичайний веб-трафік, але розпізнається системами аналізу трафіка в деяких регіонах з високим рівнем цензури. OpenVPN over Cloak - OpenVPN with VPN masquerading as web traffic and protection against active-probing detection. Ideal for bypassing blocking in regions with the highest levels of censorship. - OpenVPN over Cloak - OpenVPN з маскуванням VPN під HTTPS трафік і захистом від active-probing. Підходить для регіонів з самим високим рівнем цензури. + OpenVPN over Cloak - OpenVPN з маскуванням VPN під HTTPS трафік і захистом від active-probing. Підходить для регіонів з самим високим рівнем цензури. IKEv2/IPsec - Modern stable protocol, a bit faster than others, restores connection after signal loss. It has native support on the latest versions of Android and iOS. - + IKEv2/IPsec — сучасний стабільний протокол, який дещо швидший за інші та відновлює підключення після втрати сигналу. Має нативну підтримку на останніх версіях Android та iOS. Create a file vault on your server to securely store and transfer files. - Створіть на сервері файлове сховище для безпечного зберігання та передачі файлів. + Створіть на сервері файлове сховище для безпечного зберігання та передачі файлів. @@ -3676,7 +3676,24 @@ If there is a extreme level of Internet censorship in your region, we advise you * Not recognised by DPI analysis systems * Works over TCP network protocol, 443 port. - + Це комбінація протоколу OpenVPN та плагіна Cloak, розроблена спеціально для захисту від блокувань. + +OpenVPN забезпечує безпечне VPN-підключення шляхом шифрування всього інтернет-трафіку між клієнтом і сервером. + +Cloak захищає OpenVPN від виявлення та блокування. + +Cloak може змінювати метадані пакетів так, що повністю маскує VPN-трафік як звичайний веб-трафік і також захищає VPN від виявлення за допомогою активного сканування. Це робить його дуже стійким до виявлення. + +Одразу після отримання першого пакета даних Cloak аутентифікує вхідне підключення. Якщо аутентифікація не вдається, плагін маскує сервер як фальшивий вебсайт, і ваш VPN стає невидимим для систем аналізу. + +Якщо у вашому регіоні екстремальний рівень інтернет-цензури, ми радимо використовувати тільки OpenVPN через Cloak з самого початку роботи з додатком. + + Доступний в AmneziaVPN на всіх платформах + Високе споживання енергії на мобільних пристроях + Гнучкі налаштування + Не розпізнається системами аналізу DPI + Працює через TCP мережевий протокол, порт 443. + @@ -3689,7 +3706,16 @@ WireGuard is very susceptible to blocking due to its distinct packet signatures. * Minimum number of settings * Easily recognised by DPI analysis systems, susceptible to blocking * Works over UDP network protocol. - + Відносно новий популярний VPN-протокол з спрощеною архітектурою. +WireGuard забезпечує стабільне VPN-підключення та високу продуктивність на всіх пристроях. Він використовує жорстко закодовані налаштування шифрування. Порівняно з OpenVPN, WireGuard має нижчу затримку та кращу пропускну здатність передачі даних. + +WireGuard дуже чутливий до блокувань через свої чіткі підписи пакетів. На відміну від деяких інших VPN-протоколів, які використовують техніки обфускації, постійні шаблони підписів пакетів WireGuard легше ідентифікуються та можуть бути заблоковані просунутими системами глибокого аналізу пакетів (DPI) та іншими інструментами моніторингу мережі. + +* Доступний в AmneziaVPN на всіх платформах +* Низьке споживання енергії +* Мінімальна кількість налаштувань +* Легко розпізнається системами аналізу DPI, схильний до блокування +* Працює через UDP мережевий протокол. @@ -3697,7 +3723,10 @@ WireGuard is very susceptible to blocking due to its distinct packet signatures. It uniquely identifies censors during the TLS handshake phase, seamlessly operating as a proxy for legitimate clients while diverting censors to genuine websites like google.com, thus presenting an authentic TLS certificate and data. This advanced capability differentiates REALITY from similar technologies by its ability to disguise web traffic as coming from random, legitimate sites without the need for specific configurations. Unlike older protocols such as VMess, VLESS, and the XTLS-Vision transport, REALITY's innovative "friend or foe" recognition at the TLS handshake enhances security and circumvents detection by sophisticated DPI systems employing active probing techniques. This makes REALITY a robust solution for maintaining internet freedom in environments with stringent censorship. - + Протокол **REALITY**, сучасна розробка XRay. Спеціально розроблений для протидії найвищим рівням інтернет-цензури завдяки новому підходу до маскування. +REALITY унікально ідентифікує цензорів під час фази TLS-handshake, працюючи як проксі для VPN клієнтів, при цьому перенаправляючи цензорів на справжні вебсайти, такі як google.com, надаючи справжній TLS-сертифікат та інші дані. +Цей функціонал, відрізняє REALITY від подібних технологій, своєю здатністю маскувати веб-трафік у такий такий, що походить із випадкових справжніх сайтів без необхідності спеціальних налаштувань. +На відміну від старіших протоколів, таких як VMess, VLESS та XTLS-Vision transport, продвиуте розпізнавання "Свій — Чужий" REALITY під час TLS-handshake підвищує безпеку та протидіє виявленню складними системами DPI, що використовують активні техніки аналізу. Це робить REALITY надійним рішенням для підтримання інтернет-свободи в середовищах з жорсткою цензурою. @@ -3759,7 +3788,7 @@ While it offers a blend of security, stability, and speed, it's essential t XRay with REALITY - Suitable for countries with the highest level of internet censorship. Traffic masking as web traffic at the TLS level, and protection against detection by active probing methods. - + XRay with REALITY — підходить для країн з найвищим рівнем інтернет-цензури. Маскування трафіку під веб-трафік на рівні TLS. Захист від виявлення активними методами сканування (active-probing). IKEv2/IPsec - Modern stable protocol, a bit faster than others, restores connection after signal loss. @@ -3819,7 +3848,14 @@ It employs its unique security protocol, leveraging the strength of SSL/TLS for For more detailed information, you can find it in the support section under "Create SFTP file storage." - + Після встановлення Amnezia створить + + файл-сховище на вашому сервері. Ви зможете отримати + доступ до нього за допомогою FileZilla та інших SFTP-клієнтів, +а також змонтувати диск на вашому пристрої для безпосереднього доступу до нього. + +Для більш детальної інформації зверніться + до розділу підтримки під заголовком «Створення SFTP файл-сховища». This is a combination of the OpenVPN protocol and the Cloak plugin designed specifically for blocking protection. @@ -3917,7 +3953,7 @@ This means that AmneziaWG keeps the fast performance of the original while addin SOCKS5 proxy server - + SOCKS5 proxy server @@ -4172,12 +4208,12 @@ This means that AmneziaWG keeps the fast performance of the original while addin Copy config string - Скопіювати стрічку конфігурації + Скопіювати стрічку конфігурації Show connection settings - Показати налаштування підключення + Показати налаштування підключення diff --git a/client/ui/controllers/exportController.cpp b/client/ui/controllers/exportController.cpp index 20c32409..2690b5b1 100644 --- a/client/ui/controllers/exportController.cpp +++ b/client/ui/controllers/exportController.cpp @@ -10,9 +10,6 @@ #include "core/controllers/vpnConfigurationController.h" #include "systemController.h" -#ifdef Q_OS_ANDROID - #include "platforms/android/android_utils.h" -#endif #include "qrcodegen.hpp" ExportController::ExportController(const QSharedPointer &serversModel, const QSharedPointer &containersModel, @@ -24,12 +21,6 @@ ExportController::ExportController(const QSharedPointer &serversMo m_clientManagementModel(clientManagementModel), m_settings(settings) { -#ifdef Q_OS_ANDROID - m_authResultNotifier.reset(new AuthResultNotifier); - m_authResultReceiver.reset(new AuthResultReceiver(m_authResultNotifier)); - connect(m_authResultNotifier.get(), &AuthResultNotifier::authFailed, this, [this]() { emit exportErrorOccurred(tr("Access error!")); }); - connect(m_authResultNotifier.get(), &AuthResultNotifier::authSuccessful, this, &ExportController::generateFullAccessConfig); -#endif } void ExportController::generateFullAccessConfig() @@ -63,26 +54,6 @@ void ExportController::generateFullAccessConfig() emit exportConfigChanged(); } -#if defined(Q_OS_ANDROID) -void ExportController::generateFullAccessConfigAndroid() -{ - /* We use builtin keyguard for ssh key export protection on Android */ - QJniObject activity = AndroidUtils::getActivity(); - auto appContext = activity.callObjectMethod("getApplicationContext", "()Landroid/content/Context;"); - if (appContext.isValid()) { - auto intent = QJniObject::callStaticObjectMethod("org/amnezia/vpn/AuthHelper", "getAuthIntent", - "(Landroid/content/Context;)Landroid/content/Intent;", appContext.object()); - if (intent.isValid()) { - if (intent.object() != nullptr) { - QtAndroidPrivate::startActivity(intent.object(), 1, m_authResultReceiver.get()); - } - } else { - generateFullAccessConfig(); - } - } -} -#endif - void ExportController::generateConnectionConfig(const QString &clientName) { clearPreviousConfig(); diff --git a/client/ui/controllers/exportController.h b/client/ui/controllers/exportController.h index 023f22cf..b031ea39 100644 --- a/client/ui/controllers/exportController.h +++ b/client/ui/controllers/exportController.h @@ -6,9 +6,6 @@ #include "ui/models/clientManagementModel.h" #include "ui/models/containers_model.h" #include "ui/models/servers_model.h" -#ifdef Q_OS_ANDROID - #include "platforms/android/authResultReceiver.h" -#endif class ExportController : public QObject { @@ -25,9 +22,6 @@ public: public slots: void generateFullAccessConfig(); -#if defined(Q_OS_ANDROID) - void generateFullAccessConfigAndroid(); -#endif void generateConnectionConfig(const QString &clientName); void generateOpenVpnConfig(const QString &clientName); void generateWireGuardConfig(const QString &clientName); @@ -74,11 +68,6 @@ private: QString m_config; QString m_nativeConfigString; QList m_qrCodes; - -#ifdef Q_OS_ANDROID - QSharedPointer m_authResultNotifier; - QSharedPointer m_authResultReceiver; -#endif }; #endif // EXPORTCONTROLLER_H diff --git a/client/ui/controllers/installController.cpp b/client/ui/controllers/installController.cpp index 66e04520..c6f17057 100644 --- a/client/ui/controllers/installController.cpp +++ b/client/ui/controllers/installController.cpp @@ -799,7 +799,7 @@ void InstallController::addEmptyServer() bool InstallController::fillAvailableServices() { - ApiController apiController(m_settings->getGatewayEndpoint()); + ApiController apiController(m_settings->getGatewayEndpoint(), m_settings->isDevGatewayEnv()); QByteArray responseBody; ErrorCode errorCode = apiController.getServicesList(responseBody); @@ -821,7 +821,7 @@ bool InstallController::installServiceFromApi() return false; } - ApiController apiController(m_settings->getGatewayEndpoint()); + ApiController apiController(m_settings->getGatewayEndpoint(), m_settings->isDevGatewayEnv()); QJsonObject serverConfig; ErrorCode errorCode = apiController.getConfigForService(m_settings->getInstallationUuid(true), m_apiServicesModel->getCountryCode(), @@ -849,7 +849,7 @@ bool InstallController::installServiceFromApi() bool InstallController::updateServiceFromApi(const int serverIndex, const QString &newCountryCode, const QString &newCountryName, bool reloadServiceConfig) { - ApiController apiController(m_settings->getGatewayEndpoint()); + ApiController apiController(m_settings->getGatewayEndpoint(), m_settings->isDevGatewayEnv()); auto serverConfig = m_serversModel->getServerConfig(serverIndex); auto apiConfig = serverConfig.value(configKey::apiConfig).toObject(); @@ -885,7 +885,7 @@ bool InstallController::updateServiceFromApi(const int serverIndex, const QStrin void InstallController::updateServiceFromTelegram(const int serverIndex) { - ApiController *apiController = new ApiController(m_settings->getGatewayEndpoint()); + ApiController *apiController = new ApiController(m_settings->getGatewayEndpoint(), m_settings->isDevGatewayEnv()); auto serverConfig = m_serversModel->getServerConfig(serverIndex); diff --git a/client/ui/controllers/pageController.cpp b/client/ui/controllers/pageController.cpp index b9561600..9daca272 100644 --- a/client/ui/controllers/pageController.cpp +++ b/client/ui/controllers/pageController.cpp @@ -10,8 +10,6 @@ #ifdef Q_OS_ANDROID #include "platforms/android/android_controller.h" - #include "platforms/android/android_utils.h" - #include #endif #if defined Q_OS_MAC #include "ui/macos_util.h" @@ -22,18 +20,8 @@ PageController::PageController(const QSharedPointer &serversModel, : QObject(parent), m_serversModel(serversModel), m_settings(settings) { #ifdef Q_OS_ANDROID - // Change color of navigation and status bar's auto initialPageNavigationBarColor = getInitialPageNavigationBarColor(); - AndroidUtils::runOnAndroidThreadSync([&initialPageNavigationBarColor]() { - QJniObject activity = AndroidUtils::getActivity(); - QJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;"); - if (window.isValid()) { - window.callMethod("addFlags", "(I)V", 0x80000000); - window.callMethod("clearFlags", "(I)V", 0x04000000); - window.callMethod("setStatusBarColor", "(I)V", 0xFF0E0E11); - window.callMethod("setNavigationBarColor", "(I)V", initialPageNavigationBarColor); - } - }); + AndroidController::instance()->setNavigationBarColor(initialPageNavigationBarColor); #endif #if defined Q_OS_MACX @@ -115,14 +103,7 @@ unsigned int PageController::getInitialPageNavigationBarColor() void PageController::updateNavigationBarColor(const int color) { #ifdef Q_OS_ANDROID - // Change color of navigation bar - AndroidUtils::runOnAndroidThreadSync([&color]() { - QJniObject activity = AndroidUtils::getActivity(); - QJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;"); - if (window.isValid()) { - window.callMethod("setNavigationBarColor", "(I)V", color); - } - }); + AndroidController::instance()->setNavigationBarColor(color); #endif } @@ -131,7 +112,7 @@ void PageController::showOnStartup() if (!m_settings->isStartMinimized()) { emit raiseMainWindow(); } else { -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) || defined(Q_OS_LINUX) emit hideMainWindow(); #elif defined Q_OS_MACX setDockIconVisible(false); diff --git a/client/ui/controllers/settingsController.cpp b/client/ui/controllers/settingsController.cpp index 93fd8971..c3945512 100644 --- a/client/ui/controllers/settingsController.cpp +++ b/client/ui/controllers/settingsController.cpp @@ -88,7 +88,12 @@ void SettingsController::toggleLogging(bool enable) void SettingsController::openLogsFolder() { - Logger::openLogsFolder(); + Logger::openLogsFolder(false); +} + +void SettingsController::openServiceLogsFolder() +{ + Logger::openLogsFolder(true); } void SettingsController::exportLogsFile(const QString &fileName) @@ -100,12 +105,21 @@ void SettingsController::exportLogsFile(const QString &fileName) #endif } +void SettingsController::exportServiceLogsFile(const QString &fileName) +{ +#ifdef Q_OS_ANDROID + AndroidController::instance()->exportLogsFile(fileName); +#else + SystemController::saveFile(fileName, Logger::getServiceLogFile()); +#endif +} + void SettingsController::clearLogs() { #ifdef Q_OS_ANDROID AndroidController::instance()->clearLogs(); #else - Logger::clearLogs(); + Logger::clearLogs(false); Logger::clearServiceLogs(); #endif } @@ -283,5 +297,31 @@ void SettingsController::setGatewayEndpoint(const QString &endpoint) QString SettingsController::getGatewayEndpoint() { - return m_settings->getGatewayEndpoint(); + return m_settings->isDevGatewayEnv() ? "Dev endpoint" : m_settings->getGatewayEndpoint(); } + +bool SettingsController::isDevGatewayEnv() +{ + return m_settings->isDevGatewayEnv(); +} + +void SettingsController::toggleDevGatewayEnv(bool enabled) +{ + m_settings->toggleDevGatewayEnv(enabled); + if (enabled) { + m_settings->setDevGatewayEndpoint(); + } else { + m_settings->resetGatewayEndpoint(); + } + emit gatewayEndpointChanged(m_settings->getGatewayEndpoint()); + emit devGatewayEnvChanged(enabled); +} + +bool SettingsController::isOnTv() +{ +#ifdef Q_OS_ANDROID + return AndroidController::instance()->isOnTv(); +#else + return false; +#endif +} \ No newline at end of file diff --git a/client/ui/controllers/settingsController.h b/client/ui/controllers/settingsController.h index a18888a9..efc18a7d 100644 --- a/client/ui/controllers/settingsController.h +++ b/client/ui/controllers/settingsController.h @@ -27,6 +27,7 @@ public: Q_PROPERTY(bool isDevModeEnabled READ isDevModeEnabled NOTIFY devModeEnabled) Q_PROPERTY(QString gatewayEndpoint READ getGatewayEndpoint WRITE setGatewayEndpoint NOTIFY gatewayEndpointChanged) + Q_PROPERTY(bool isDevGatewayEnv READ isDevGatewayEnv WRITE toggleDevGatewayEnv NOTIFY devGatewayEnvChanged) public slots: void toggleAmneziaDns(bool enable); @@ -42,7 +43,9 @@ public slots: void toggleLogging(bool enable); void openLogsFolder(); + void openServiceLogsFolder(); void exportLogsFile(const QString &fileName); + void exportServiceLogsFile(const QString &fileName); void clearLogs(); void backupAppConfig(const QString &fileName); @@ -81,6 +84,10 @@ public slots: void resetGatewayEndpoint(); void setGatewayEndpoint(const QString &endpoint); QString getGatewayEndpoint(); + bool isDevGatewayEnv(); + void toggleDevGatewayEnv(bool enabled); + + bool isOnTv(); signals: void primaryDnsChanged(); @@ -103,6 +110,7 @@ signals: void devModeEnabled(); void gatewayEndpointChanged(const QString &endpoint); + void devGatewayEnvChanged(bool enabled); private: QSharedPointer m_serversModel; diff --git a/client/ui/controllers/systemController.cpp b/client/ui/controllers/systemController.cpp index e6a9a28e..4598bff1 100644 --- a/client/ui/controllers/systemController.cpp +++ b/client/ui/controllers/systemController.cpp @@ -125,3 +125,12 @@ void SystemController::setQmlRoot(QObject *qmlRoot) { m_qmlRoot = qmlRoot; } + +bool SystemController::isAuthenticated() +{ +#ifdef Q_OS_ANDROID + return AndroidController::instance()->requestAuthentication(); +#else + return true; +#endif +} diff --git a/client/ui/controllers/systemController.h b/client/ui/controllers/systemController.h index 274df234..d2ee6f63 100644 --- a/client/ui/controllers/systemController.h +++ b/client/ui/controllers/systemController.h @@ -19,6 +19,7 @@ public slots: void setQmlRoot(QObject *qmlRoot); + bool isAuthenticated(); signals: void fileDialogClosed(const bool isAccepted); diff --git a/client/ui/models/apiServicesModel.cpp b/client/ui/models/apiServicesModel.cpp index 3e74d259..2a87bde3 100644 --- a/client/ui/models/apiServicesModel.cpp +++ b/client/ui/models/apiServicesModel.cpp @@ -25,6 +25,8 @@ namespace constexpr char availableCountries[] = "available_countries"; constexpr char storeEndpoint[] = "store_endpoint"; + + constexpr char isAvailable[] = "is_available"; } namespace serviceType @@ -63,8 +65,12 @@ QVariant ApiServicesModel::data(const QModelIndex &index, int role) const return tr("Classic VPN for comfortable work, downloading large files and watching videos. " "Works for any sites. Speed up to %1 MBit/s") .arg(speed); - } else { - return tr("VPN to access blocked sites in regions with high levels of Internet censorship. "); + } else if (serviceType == serviceType::amneziaFree){ + QString description = tr("VPN to access blocked sites in regions with high levels of Internet censorship. "); + if (service.value(configKey::isAvailable).isBool() && !service.value(configKey::isAvailable).toBool()) { + description += tr("

Not available in your region. If you have VPN enabled, disable it, return to the previous screen, and try again."); + } + return description; } } case ServiceDescriptionRole: { @@ -75,6 +81,14 @@ QVariant ApiServicesModel::data(const QModelIndex &index, int role) const return tr("Amnezia Free is a free VPN to bypass blocking in countries with high levels of internet censorship"); } } + case IsServiceAvailableRole: { + if (serviceType == serviceType::amneziaFree) { + if (service.value(configKey::isAvailable).isBool() && !service.value(configKey::isAvailable).toBool()) { + return false; + } + } + return true; + } case SpeedRole: { auto speed = serviceInfo.value(configKey::speed).toString(); return tr("%1 MBit/s").arg(speed); @@ -193,6 +207,7 @@ QHash ApiServicesModel::roleNames() const roles[NameRole] = "name"; roles[CardDescriptionRole] = "cardDescription"; roles[ServiceDescriptionRole] = "serviceDescription"; + roles[IsServiceAvailableRole] = "isServiceAvailable"; roles[SpeedRole] = "speed"; roles[WorkPeriodRole] = "workPeriod"; roles[RegionRole] = "region"; diff --git a/client/ui/models/apiServicesModel.h b/client/ui/models/apiServicesModel.h index 64676be6..49918940 100644 --- a/client/ui/models/apiServicesModel.h +++ b/client/ui/models/apiServicesModel.h @@ -13,6 +13,7 @@ public: NameRole = Qt::UserRole + 1, CardDescriptionRole, ServiceDescriptionRole, + IsServiceAvailableRole, SpeedRole, WorkPeriodRole, RegionRole, diff --git a/client/ui/property_helper.h b/client/ui/property_helper.h deleted file mode 100644 index 927105b3..00000000 --- a/client/ui/property_helper.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef PROPERTY_HELPER_H -#define PROPERTY_HELPER_H - -#include - -#define AUTO_PROPERTY(TYPE, NAME) \ - Q_PROPERTY(TYPE NAME READ NAME WRITE set_ ## NAME NOTIFY NAME ## Changed ) \ - public: \ - TYPE NAME() const { return m_ ## NAME ; } \ - void set_ ## NAME(TYPE value) { \ - if (m_ ## NAME == value) return; \ - m_ ## NAME = value; \ - emit NAME ## Changed(value); \ - } \ - Q_SIGNAL void NAME ## Changed(TYPE value);\ - private: \ - TYPE m_ ## NAME{}; - -#define READONLY_PROPERTY(TYPE, NAME) \ - Q_PROPERTY(TYPE NAME READ NAME CONSTANT ) \ - public: \ - TYPE NAME() const { return m_ ## NAME ; } \ - private: \ - void NAME(TYPE value) {m_ ## NAME = value; } \ - TYPE m_ ## NAME{}; - -#endif // PROPERTY_HELPER_H diff --git a/client/ui/qml/Components/ConnectButton.qml b/client/ui/qml/Components/ConnectButton.qml index cb706158..fa18703b 100644 --- a/client/ui/qml/Components/ConnectButton.qml +++ b/client/ui/qml/Components/ConnectButton.qml @@ -14,6 +14,7 @@ Button { property string defaultButtonColor: AmneziaStyle.color.paleGray property string progressButtonColor: AmneziaStyle.color.paleGray property string connectedButtonColor: AmneziaStyle.color.goldenApricot + property bool buttonActiveFocus: activeFocus && (Qt.platform.os !== "android" || SettingsController.isOnTv()) implicitWidth: 190 implicitHeight: 190 @@ -50,14 +51,14 @@ Button { verticalOffset: 0 radius: 10 samples: 25 - color: root.activeFocus ? AmneziaStyle.color.paleGray : AmneziaStyle.color.goldenApricot + color: root.buttonActiveFocus ? AmneziaStyle.color.paleGray : AmneziaStyle.color.goldenApricot source: backgroundCircle } ShapePath { fillColor: AmneziaStyle.color.transparent strokeColor: AmneziaStyle.color.paleGray - strokeWidth: root.activeFocus ? 1 : 0 + strokeWidth: root.buttonActiveFocus ? 1 : 0 capStyle: ShapePath.RoundCap PathAngleArc { @@ -81,14 +82,14 @@ Button { return defaultButtonColor } } - strokeWidth: root.activeFocus ? 2 : 3 + strokeWidth: root.buttonActiveFocus ? 2 : 3 capStyle: ShapePath.RoundCap PathAngleArc { centerX: backgroundCircle.width / 2 centerY: backgroundCircle.height / 2 - radiusX: 93 - (root.activeFocus ? 2 : 0) - radiusY: 93 - (root.activeFocus ? 2 : 0) + radiusX: 93 - (root.buttonActiveFocus ? 2 : 0) + radiusY: 93 - (root.buttonActiveFocus ? 2 : 0) startAngle: 0 sweepAngle: 360 } diff --git a/client/ui/qml/Controls2/CardWithIconsType.qml b/client/ui/qml/Controls2/CardWithIconsType.qml index 8630434b..fea65116 100644 --- a/client/ui/qml/Controls2/CardWithIconsType.qml +++ b/client/ui/qml/Controls2/CardWithIconsType.qml @@ -79,6 +79,7 @@ Button { visible: text !== "" color: AmneziaStyle.color.mutedGray + textFormat: Text.RichText Layout.fillWidth: true Layout.rightMargin: 16 diff --git a/client/ui/qml/Controls2/LabelWithButtonType.qml b/client/ui/qml/Controls2/LabelWithButtonType.qml index 3b1609f7..41faf108 100644 --- a/client/ui/qml/Controls2/LabelWithButtonType.qml +++ b/client/ui/qml/Controls2/LabelWithButtonType.qml @@ -20,7 +20,8 @@ Item { property string buttonImageSource property string rightImageSource property string leftImageSource - property bool isLeftImageHoverEnabled: true //todo separete this qml file to 3 + property bool isLeftImageHoverEnabled: true + property bool isSmallLeftImage: false property alias rightButton: rightImage property alias eyeButton: eyeImage @@ -114,9 +115,9 @@ Item { visible: leftImageSource ? true : false - Layout.preferredHeight: rightImageSource || !isLeftImageHoverEnabled ? leftImage.implicitHeight : 56 - Layout.preferredWidth: rightImageSource || !isLeftImageHoverEnabled ? leftImage.implicitWidth : 56 - Layout.rightMargin: rightImageSource || !isLeftImageHoverEnabled ? 16 : 0 + Layout.preferredHeight: (rightImageSource || !isLeftImageHoverEnabled || isSmallLeftImage) ? 40 : 56 + Layout.preferredWidth: (rightImageSource || !isLeftImageHoverEnabled || isSmallLeftImage)? 40 : 56 + Layout.rightMargin: isSmallLeftImage ? 8 : (rightImageSource || !isLeftImageHoverEnabled) ? 16 : 0 radius: 12 color: AmneziaStyle.color.transparent diff --git a/client/ui/qml/Controls2/SwitcherType.qml b/client/ui/qml/Controls2/SwitcherType.qml index 9b2885ea..43c35778 100644 --- a/client/ui/qml/Controls2/SwitcherType.qml +++ b/client/ui/qml/Controls2/SwitcherType.qml @@ -102,8 +102,7 @@ Switch { contentItem: ColumnLayout { id: content - anchors.top: parent.top - anchors.bottom: parent.bottom + anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left ListItemTitleType { diff --git a/client/ui/qml/Pages2/PageDevMenu.qml b/client/ui/qml/Pages2/PageDevMenu.qml index af6f773a..5da40eff 100644 --- a/client/ui/qml/Pages2/PageDevMenu.qml +++ b/client/ui/qml/Pages2/PageDevMenu.qml @@ -89,6 +89,21 @@ PageType { // KeyNavigation.tab: saveButton } + + SwitcherType { + id: switcher + + Layout.fillWidth: true + Layout.rightMargin: 16 + Layout.leftMargin: 16 + Layout.topMargin: 16 + + text: qsTr("Dev gateway environment") + checked: SettingsController.isDevGatewayEnv + onToggled: function() { + SettingsController.isDevGatewayEnv = checked + } + } } } } diff --git a/client/ui/qml/Pages2/PageSettingsAbout.qml b/client/ui/qml/Pages2/PageSettingsAbout.qml index 1e38a539..cde9ee20 100644 --- a/client/ui/qml/Pages2/PageSettingsAbout.qml +++ b/client/ui/qml/Pages2/PageSettingsAbout.qml @@ -120,7 +120,7 @@ PageType { id: mailButton Layout.fillWidth: true - text: qsTr("Mail") + text: qsTr("support@amnezia.org") descriptionText: qsTr("For reviews and bug reports") leftImageSource: "qrc:/images/controls/mail.svg" @@ -128,6 +128,8 @@ PageType { parentFlickable: fl clickedFunction: function() { + GC.copyToClipBoard(text) + PageController.showNotificationMessage(qsTr("Copied")) } } diff --git a/client/ui/qml/Pages2/PageSettingsLogging.qml b/client/ui/qml/Pages2/PageSettingsLogging.qml index 3ab0df8a..9abfc453 100644 --- a/client/ui/qml/Pages2/PageSettingsLogging.qml +++ b/client/ui/qml/Pages2/PageSettingsLogging.qml @@ -16,18 +16,6 @@ import "../Controls2/TextTypes" PageType { id: root - Connections { - target: SettingsController - - function onLoggingStateChanged() { - if (SettingsController.isLoggingEnabled) { - var message = qsTr("Logging is enabled. Note that logs will be automatically \ -disabled after 14 days, and all log files will be deleted.") - PageController.showNotificationMessage(message) - } - } - } - defaultActiveFocusItem: focusItem Item { @@ -58,13 +46,12 @@ disabled after 14 days, and all log files will be deleted.") anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: 16 - anchors.rightMargin: 16 - - spacing: 16 + spacing: 0 HeaderType { Layout.fillWidth: true + Layout.leftMargin: 16 + Layout.rightMargin: 16 headerText: qsTr("Logging") descriptionText: qsTr("Enabling this function will save application's logs automatically. " + @@ -75,11 +62,13 @@ disabled after 14 days, and all log files will be deleted.") id: switcher Layout.fillWidth: true Layout.topMargin: 16 + Layout.leftMargin: 16 + Layout.rightMargin: 16 - text: qsTr("Save logs") + text: qsTr("Enable logs") checked: SettingsController.isLoggingEnabled - KeyNavigation.tab: openFolderButton + //KeyNavigation.tab: openFolderButton onCheckedChanged: { if (checked !== SettingsController.isLoggingEnabled) { SettingsController.isLoggingEnabled = checked @@ -87,132 +76,200 @@ disabled after 14 days, and all log files will be deleted.") } } - RowLayout { + DividerType {} + + LabelWithButtonType { + // id: labelWithButton2 Layout.fillWidth: true + Layout.topMargin: -8 - ColumnLayout { - Layout.alignment: Qt.AlignBaseline - Layout.preferredWidth: GC.isMobile() ? 0 : root.width / 3 - visible: !GC.isMobile() + text: qsTr("Clear logs") + leftImageSource: "qrc:/images/controls/trash.svg" + isSmallLeftImage: true - ImageButtonType { - id: openFolderButton - Layout.alignment: Qt.AlignHCenter + // KeyNavigation.tab: labelWithButton3 - implicitWidth: 56 - implicitHeight: 56 + clickedFunction: function() { + var headerText = qsTr("Clear logs?") + var yesButtonText = qsTr("Continue") + var noButtonText = qsTr("Cancel") - image: "qrc:/images/controls/folder-open.svg" - KeyNavigation.tab: saveButton - - onClicked: SettingsController.openLogsFolder() - Keys.onReturnPressed: openFolderButton.clicked() - Keys.onEnterPressed: openFolderButton.clicked() + var yesButtonFunction = function() { + PageController.showBusyIndicator(true) + SettingsController.clearLogs() + PageController.showBusyIndicator(false) + PageController.showNotificationMessage(qsTr("Logs have been cleaned up")) + if (!GC.isMobile()) { + focusItem.forceActiveFocus() + } } - - CaptionTextType { - horizontalAlignment: Text.AlignHCenter - Layout.fillWidth: true - - text: qsTr("Open folder with logs") - color: AmneziaStyle.color.paleGray - } - } - - ColumnLayout { - Layout.alignment: Qt.AlignBaseline - Layout.preferredWidth: root.width / ( GC.isMobile() ? 2 : 3 ) - - ImageButtonType { - id: saveButton - Layout.alignment: Qt.AlignHCenter - - implicitWidth: 56 - implicitHeight: 56 - - image: "qrc:/images/controls/save.svg" - KeyNavigation.tab: clearButton - - Keys.onReturnPressed: saveButton.clicked() - Keys.onEnterPressed: saveButton.clicked() - onClicked: { - var fileName = "" - if (GC.isMobile()) { - fileName = "AmneziaVPN.log" - } else { - fileName = SystemController.getFileName(qsTr("Save"), - qsTr("Logs files (*.log)"), - StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN", - true, - ".log") - } - if (fileName !== "") { - PageController.showBusyIndicator(true) - SettingsController.exportLogsFile(fileName) - PageController.showBusyIndicator(false) - PageController.showNotificationMessage(qsTr("Logs file saved")) - } + var noButtonFunction = function() { + if (!GC.isMobile()) { + focusItem.forceActiveFocus() } } - CaptionTextType { - horizontalAlignment: Text.AlignHCenter - Layout.fillWidth: true + showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) + } + } - text: qsTr("Save logs to file") - color: AmneziaStyle.color.paleGray + ListItemTitleType { + Layout.fillWidth: true + Layout.topMargin: 8 + Layout.leftMargin: 16 + Layout.rightMargin: 16 + + text: qsTr("Client logs") + } + + ParagraphTextType { + Layout.fillWidth: true + Layout.topMargin: 8 + Layout.leftMargin: 16 + Layout.rightMargin: 16 + + color: AmneziaStyle.color.mutedGray + text: qsTr("AmneziaVPN logs") + } + + LabelWithButtonType { + // id: labelWithButton2 + Layout.fillWidth: true + Layout.topMargin: -8 + Layout.bottomMargin: -8 + + text: qsTr("Open logs folder") + leftImageSource: "qrc:/images/controls/folder-open.svg" + isSmallLeftImage: true + + // KeyNavigation.tab: labelWithButton3 + + clickedFunction: function() { + SettingsController.openLogsFolder() + } + } + + DividerType {} + + LabelWithButtonType { + // id: labelWithButton2 + Layout.fillWidth: true + Layout.topMargin: -8 + Layout.bottomMargin: -8 + + text: qsTr("Export logs") + leftImageSource: "qrc:/images/controls/save.svg" + isSmallLeftImage: true + + // KeyNavigation.tab: labelWithButton3 + + clickedFunction: function() { + var fileName = "" + if (GC.isMobile()) { + fileName = "AmneziaVPN.log" + } else { + fileName = SystemController.getFileName(qsTr("Save"), + qsTr("Logs files (*.log)"), + StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN", + true, + ".log") + } + if (fileName !== "") { + PageController.showBusyIndicator(true) + SettingsController.exportLogsFile(fileName) + PageController.showBusyIndicator(false) + PageController.showNotificationMessage(qsTr("Logs file saved")) } } + } - ColumnLayout { - Layout.alignment: Qt.AlignBaseline - Layout.preferredWidth: root.width / ( GC.isMobile() ? 2 : 3 ) + DividerType {} - ImageButtonType { - id: clearButton - Layout.alignment: Qt.AlignHCenter + ListItemTitleType { + visible: !GC.isMobile() - implicitWidth: 56 - implicitHeight: 56 + Layout.fillWidth: true + Layout.topMargin: 32 + Layout.leftMargin: 16 + Layout.rightMargin: 16 - image: "qrc:/images/controls/delete.svg" - Keys.onTabPressed: lastItemTabClicked(focusItem) + text: qsTr("Service logs") + } - Keys.onReturnPressed: clearButton.clicked() - Keys.onEnterPressed: clearButton.clicked() - onClicked: function() { - var headerText = qsTr("Clear logs?") - var yesButtonText = qsTr("Continue") - var noButtonText = qsTr("Cancel") + ParagraphTextType { + visible: !GC.isMobile() - var yesButtonFunction = function() { - PageController.showBusyIndicator(true) - SettingsController.clearLogs() - PageController.showBusyIndicator(false) - PageController.showNotificationMessage(qsTr("Logs have been cleaned up")) - if (!GC.isMobile()) { - focusItem.forceActiveFocus() - } - } - var noButtonFunction = function() { - if (!GC.isMobile()) { - focusItem.forceActiveFocus() - } - } + Layout.fillWidth: true + Layout.topMargin: 8 + Layout.leftMargin: 16 + Layout.rightMargin: 16 - showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) - } + color: AmneziaStyle.color.mutedGray + text: qsTr("AmneziaVPN-service logs") + } + + LabelWithButtonType { + // id: labelWithButton2 + + visible: !GC.isMobile() + + Layout.fillWidth: true + Layout.topMargin: -8 + Layout.bottomMargin: -8 + + text: qsTr("Open logs folder") + leftImageSource: "qrc:/images/controls/folder-open.svg" + isSmallLeftImage: true + + // KeyNavigation.tab: labelWithButton3 + + clickedFunction: function() { + SettingsController.openServiceLogsFolder() + } + } + + DividerType { + visible: !GC.isMobile() + } + + LabelWithButtonType { + // id: labelWithButton2 + + visible: !GC.isMobile() + + Layout.fillWidth: true + Layout.topMargin: -8 + Layout.bottomMargin: -8 + + text: qsTr("Export logs") + leftImageSource: "qrc:/images/controls/save.svg" + isSmallLeftImage: true + + // KeyNavigation.tab: labelWithButton3 + + clickedFunction: function() { + var fileName = "" + if (GC.isMobile()) { + fileName = "AmneziaVPN-service.log" + } else { + fileName = SystemController.getFileName(qsTr("Save"), + qsTr("Logs files (*.log)"), + StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN-service", + true, + ".log") } - - CaptionTextType { - horizontalAlignment: Text.AlignHCenter - Layout.fillWidth: true - - text: qsTr("Clear logs") - color: AmneziaStyle.color.paleGray + if (fileName !== "") { + PageController.showBusyIndicator(true) + SettingsController.exportServiceLogsFile(fileName) + PageController.showBusyIndicator(false) + PageController.showNotificationMessage(qsTr("Logs file saved")) } } } + + DividerType { + visible: !GC.isMobile() + } } } } diff --git a/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml b/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml index cb79f19e..85a50393 100644 --- a/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml +++ b/client/ui/qml/Pages2/PageSetupWizardApiServicesList.qml @@ -88,8 +88,10 @@ PageType { rightImageSource: "qrc:/images/controls/chevron-right.svg" onClicked: { - ApiServicesModel.setServiceIndex(index) - PageController.goToPage(PageEnum.PageSetupWizardApiServiceInfo) + if (isServiceAvailable) { + ApiServicesModel.setServiceIndex(index) + PageController.goToPage(PageEnum.PageSetupWizardApiServiceInfo) + } } } } diff --git a/client/ui/qml/Pages2/PageSetupWizardConfigSource.qml b/client/ui/qml/Pages2/PageSetupWizardConfigSource.qml index 3febca4c..7f7cf9e1 100644 --- a/client/ui/qml/Pages2/PageSetupWizardConfigSource.qml +++ b/client/ui/qml/Pages2/PageSetupWizardConfigSource.qml @@ -55,6 +55,51 @@ PageType { Layout.leftMargin: 16 headerText: qsTr("Connection") + + actionButtonImage: PageController.isStartPageVisible() ? "qrc:/images/controls/more-vertical.svg" : "" + actionButtonFunction: function() { + moreActionsDrawer.open() + } + + DrawerType2 { + id: moreActionsDrawer + + parent: root + + anchors.fill: parent + expandedHeight: root.height * 0.35 + + expandedContent: ColumnLayout { + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 16 + anchors.rightMargin: 16 + + HeaderType { + Layout.fillWidth: true + Layout.topMargin: 32 + + headerText: qsTr("Settings") + } + + SwitcherType { + id: switcher + Layout.fillWidth: true + Layout.topMargin: 16 + + text: qsTr("Enable logs") + + checked: SettingsController.isLoggingEnabled + onCheckedChanged: { + if (checked !== SettingsController.isLoggingEnabled) { + SettingsController.isLoggingEnabled = checked + } + } + } + + } + } } ParagraphTextType { @@ -119,8 +164,6 @@ PageType { CardWithIconsType { id: apiInstalling - visible: false - Layout.fillWidth: true Layout.rightMargin: 16 Layout.leftMargin: 16 diff --git a/client/ui/qml/Pages2/PageShareFullAccess.qml b/client/ui/qml/Pages2/PageShareFullAccess.qml index 4807c030..2a565230 100644 --- a/client/ui/qml/Pages2/PageShareFullAccess.qml +++ b/client/ui/qml/Pages2/PageShareFullAccess.qml @@ -140,22 +140,23 @@ PageType { Keys.onTabPressed: lastItemTabClicked(focusItem) clickedFunc: function() { + PageController.showBusyIndicator(true) + + if (Qt.platform.os === "android" && !SystemController.isAuthenticated()) { + PageController.showBusyIndicator(false) + ExportController.exportErrorOccurred(qsTr("Access error!")) + return + } else { + ExportController.generateFullAccessConfig() + } + shareConnectionDrawer.headerText = qsTr("Connection to ") + serverSelector.text shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text shareConnectionDrawer.open() - shareConnectionDrawer.contentVisible = false - PageController.showBusyIndicator(true) - - if (Qt.platform.os === "android") { - ExportController.generateFullAccessConfigAndroid(); - } else { - ExportController.generateFullAccessConfig(); - } + shareConnectionDrawer.contentVisible = true PageController.showBusyIndicator(false) - - shareConnectionDrawer.contentVisible = true } } } diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index 770347ca..bb6663fb 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -202,6 +202,14 @@ PageType { PageController.showNotificationMessage(qsTr("Settings restored from backup file")) PageController.goToPageHome() } + + function onLoggingStateChanged() { + if (SettingsController.isLoggingEnabled) { + var message = qsTr("Logging is enabled. Note that logs will be automatically" + + "disabled after 14 days, and all log files will be deleted.") + PageController.showNotificationMessage(message) + } + } } StackViewType { diff --git a/client/utilities.cpp b/client/utilities.cpp index a2f3d021..4047365f 100644 --- a/client/utilities.cpp +++ b/client/utilities.cpp @@ -69,22 +69,6 @@ QString Utils::JsonToString(const QJsonArray &array, QJsonDocument::JsonFormat f return doc.toJson(format); } -QString Utils::systemLogPath() -{ -#ifdef Q_OS_WIN - QStringList locationList = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); - QString primaryLocation = "ProgramData"; - foreach (const QString &location, locationList) { - if (location.contains(primaryLocation)) { - return QString("%1/%2/log").arg(location).arg(APPLICATION_NAME); - } - } - return QString(); -#else - return QString("/var/log/%1").arg(APPLICATION_NAME); -#endif -} - bool Utils::initializePath(const QString &path) { QDir dir; diff --git a/client/utilities.h b/client/utilities.h index b85c5b3b..9bf8c82a 100644 --- a/client/utilities.h +++ b/client/utilities.h @@ -23,7 +23,6 @@ public: static QJsonObject JsonFromString(const QString &string); static QString executable(const QString &baseName, bool absPath); static QString usrExecutable(const QString &baseName); - static QString systemLogPath(); static bool createEmptyFile(const QString &path); static bool initializePath(const QString &path); diff --git a/client/logger.cpp b/common/logger/logger.cpp similarity index 56% rename from client/logger.cpp rename to common/logger/logger.cpp index c76bc698..747590b9 100644 --- a/client/logger.cpp +++ b/common/logger/logger.cpp @@ -4,18 +4,18 @@ #include #include #include -#include #include +#include #include #include #include -#include "version.h" #include "utilities.h" +#include "version.h" #ifdef AMNEZIA_DESKTOP -#include + #include #endif #ifdef Q_OS_IOS @@ -25,8 +25,9 @@ QFile Logger::m_file; QTextStream Logger::m_textStream; QString Logger::m_logFileName = QString("%1.log").arg(APPLICATION_NAME); +QString Logger::m_serviceLogFileName = QString("%1.log").arg(SERVICE_NAME); -void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg) +void debugMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { if (msg.simplified().isEmpty()) { return; @@ -37,12 +38,12 @@ void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons return; } - if (msg.startsWith("Unknown property") || msg.startsWith("Could not create pixmap") || msg.startsWith("Populating font") || msg.startsWith("stale focus object")) { + if (msg.startsWith("Unknown property") || msg.startsWith("Could not create pixmap") || msg.startsWith("Populating font") + || msg.startsWith("stale focus object")) { return; } Logger::m_textStream << qFormatLogMessage(type, context, msg) << Qt::endl << Qt::flush; - Logger::appendAllLog(qFormatLogMessage(type, context, msg)); std::cout << qFormatLogMessage(type, context, msg).toStdString() << std::endl << std::flush; } @@ -53,36 +54,24 @@ Logger &Logger::Instance() return s; } -void Logger::appendSshLog(const QString &log) +bool Logger::init(bool isServiceLogger) { - QString dt = QDateTime::currentDateTime().toString(); - Instance().m_sshLog.append(dt + ": " + log + "\n"); - emit Instance().sshLogChanged(Instance().sshLog()); -} - -void Logger::appendAllLog(const QString &log) -{ - Instance().m_allLog.append(log + "\n"); - emit Instance().allLogChanged(Instance().allLog()); -} - -bool Logger::init() -{ - qSetMessagePattern("%{time yyyy-MM-dd hh:mm:ss} %{type} %{message}"); - - QString path = userLogsDir(); + QString path = isServiceLogger ? systemLogDir() : userLogsDir(); + QString logFileName = isServiceLogger ? m_serviceLogFileName : m_logFileName ; QDir appDir(path); if (!appDir.mkpath(path)) { return false; } - m_file.setFileName(appDir.filePath(m_logFileName)); + m_file.setFileName(appDir.filePath(logFileName)); if (!m_file.open(QIODevice::Append)) { - qWarning() << "Cannot open log file:" << m_logFileName; + qWarning() << "Cannot open log file:" << logFileName; return false; } + m_file.setTextModeEnabled(true); m_textStream.setDevice(&m_file); + qSetMessagePattern("%{time yyyy-MM-dd hh:mm:ss} %{type} %{message}"); #if !defined(QT_DEBUG) || defined(Q_OS_IOS) qInstallMessageHandler(debugMessageHandler); @@ -99,7 +88,8 @@ void Logger::deInit() m_file.close(); } -bool Logger::setServiceLogsEnabled(bool enabled) { +bool Logger::setServiceLogsEnabled(bool enabled) +{ #ifdef AMNEZIA_DESKTOP IpcClient *m_IpcClient = new IpcClient; @@ -112,8 +102,7 @@ bool Logger::setServiceLogsEnabled(bool enabled) { if (m_IpcClient->Interface()) { m_IpcClient->Interface()->setLogsEnabled(enabled); - } - else { + } else { qWarning() << "Error occurred setting up service logs"; return false; } @@ -127,11 +116,32 @@ QString Logger::userLogsDir() return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/log"; } +QString Logger::systemLogDir() +{ +#ifdef Q_OS_WIN + QStringList locationList = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); + QString primaryLocation = "ProgramData"; + foreach (const QString &location, locationList) { + if (location.contains(primaryLocation)) { + return QString("%1/%2/log").arg(location).arg(APPLICATION_NAME); + } + } + return QString(); +#else + return QString("/var/log/%1").arg(APPLICATION_NAME); +#endif +} + QString Logger::userLogsFilePath() { return userLogsDir() + QDir::separator() + m_logFileName; } +QString Logger::serviceLogsFilePath() +{ + return systemLogDir() + QDir::separator() + m_serviceLogFileName; +} + QString Logger::getLogFile() { m_file.flush(); @@ -139,18 +149,32 @@ QString Logger::getLogFile() file.open(QIODevice::ReadOnly); QString qtLog = file.readAll(); - + #ifdef Q_OS_IOS return QString().fromStdString(AmneziaVPN::swiftUpdateLogData(qtLog.toStdString())); #else return qtLog; #endif - } -bool Logger::openLogsFolder() +QString Logger::getServiceLogFile() { - QString path = userLogsDir(); + m_file.flush(); + QFile file(serviceLogsFilePath()); + + file.open(QIODevice::ReadOnly); + QString qtLog = file.readAll(); + +#ifdef Q_OS_IOS + return QString().fromStdString(AmneziaVPN::swiftUpdateLogData(qtLog.toStdString())); +#else + return qtLog; +#endif +} + +bool Logger::openLogsFolder(bool isServiceLogger) +{ + QString path = isServiceLogger ? systemLogDir() : userLogsDir(); #ifdef Q_OS_WIN path = "file:///" + path; #endif @@ -161,38 +185,23 @@ bool Logger::openLogsFolder() return true; } -bool Logger::openServiceLogsFolder() -{ - QString path = Utils::systemLogPath(); -#ifdef Q_OS_WIN - path = "file:///" + path; -#endif - QDesktopServices::openUrl(QUrl::fromLocalFile(path)); - return true; -} - -QString Logger::appLogFileNamePath() -{ - return m_file.fileName(); -} - -void Logger::clearLogs() +void Logger::clearLogs(bool isServiceLogger) { bool isLogActive = m_file.isOpen(); m_file.close(); - QFile file(userLogsFilePath()); + QFile file(isServiceLogger ? serviceLogsFilePath() : userLogsFilePath()); file.open(QIODevice::WriteOnly | QIODevice::Truncate); file.resize(0); file.close(); - + #ifdef Q_OS_IOS AmneziaVPN::swiftDeleteLog(); #endif - + if (isLogActive) { - init(); + init(isServiceLogger); } } @@ -210,8 +219,7 @@ void Logger::clearServiceLogs() if (m_IpcClient->Interface()) { m_IpcClient->Interface()->clearLogs(); - } - else { + } else { qWarning() << "Error occurred cleaning up service logs"; } #endif @@ -219,26 +227,41 @@ void Logger::clearServiceLogs() void Logger::cleanUp() { - clearLogs(); + clearLogs(false); QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)); dir.removeRecursively(); - clearServiceLogs(); + clearLogs(true); } -Logger::Log::Log(Logger* logger, LogLevel logLevel) - : m_logger(logger), m_logLevel(logLevel), m_data(new Data()) {} +Logger::Log::Log(Logger *logger, LogLevel logLevel) : m_logger(logger), m_logLevel(logLevel), m_data(new Data()) +{ +} -Logger::Log::~Log() { +Logger::Log::~Log() +{ qDebug() << "Amnezia" << m_logger->className() << m_data->m_buffer.trimmed(); delete m_data; } -Logger::Log Logger::error() { return Log(this, LogLevel::Error); } -Logger::Log Logger::warning() { return Log(this, LogLevel::Warning); } -Logger::Log Logger::info() { return Log(this, LogLevel::Info); } -Logger::Log Logger::debug() { return Log(this, LogLevel::Debug); } -QString Logger::sensitive(const QString& input) { +Logger::Log Logger::error() +{ + return Log(this, LogLevel::Error); +} +Logger::Log Logger::warning() +{ + return Log(this, LogLevel::Warning); +} +Logger::Log Logger::info() +{ + return Log(this, LogLevel::Info); +} +Logger::Log Logger::debug() +{ + return Log(this, LogLevel::Debug); +} +QString Logger::sensitive(const QString &input) +{ #ifdef Q_DEBUG return input; #else @@ -247,48 +270,51 @@ QString Logger::sensitive(const QString& input) { #endif } - -#define CREATE_LOG_OP_REF(x) \ -Logger::Log& Logger::Log::operator<<(x t) { \ - m_data->m_ts << t << ' '; \ - return *this; \ -} +#define CREATE_LOG_OP_REF(x) \ + Logger::Log &Logger::Log::operator<<(x t) \ + { \ + m_data->m_ts << t << ' '; \ + return *this; \ + } CREATE_LOG_OP_REF(uint64_t); -CREATE_LOG_OP_REF(const char*); -CREATE_LOG_OP_REF(const QString&); -CREATE_LOG_OP_REF(const QByteArray&); -CREATE_LOG_OP_REF(const void*); +CREATE_LOG_OP_REF(const char *); +CREATE_LOG_OP_REF(const QString &); +CREATE_LOG_OP_REF(const QByteArray &); +CREATE_LOG_OP_REF(const void *); #undef CREATE_LOG_OP_REF -Logger::Log& Logger::Log::operator<<(const QStringList& t) { +Logger::Log &Logger::Log::operator<<(const QStringList &t) +{ m_data->m_ts << '[' << t.join(",") << ']' << ' '; return *this; } -Logger::Log& Logger::Log::operator<<(const QJsonObject& t) { +Logger::Log &Logger::Log::operator<<(const QJsonObject &t) +{ m_data->m_ts << QJsonDocument(t).toJson(QJsonDocument::Indented) << ' '; return *this; } -Logger::Log& Logger::Log::operator<<(QTextStreamFunction t) { +Logger::Log &Logger::Log::operator<<(QTextStreamFunction t) +{ m_data->m_ts << t; return *this; } -void Logger::Log::addMetaEnum(quint64 value, const QMetaObject* meta, - const char* name) { +void Logger::Log::addMetaEnum(quint64 value, const QMetaObject *meta, const char *name) +{ QMetaEnum me = meta->enumerator(meta->indexOfEnumerator(name)); QString out; QTextStream ts(&out); - if (const char* scope = me.scope()) { + if (const char *scope = me.scope()) { ts << scope << "::"; } - const char* key = me.valueToKey(static_cast(value)); + const char *key = me.valueToKey(static_cast(value)); const bool scoped = me.isScoped(); if (scoped || !key) { ts << me.enumName() << (!key ? "(" : "::"); diff --git a/common/logger/logger.h b/common/logger/logger.h new file mode 100644 index 00000000..7dff7ede --- /dev/null +++ b/common/logger/logger.h @@ -0,0 +1,114 @@ +#ifndef LOGGER_H +#define LOGGER_H + +#include +#include +#include +#include +#include + +#include "mozilla/shared/loglevel.h" + +class Logger : public QObject +{ + Q_OBJECT + +public: + static Logger &Instance(); + + static bool init(bool isServiceLogger); + static void deInit(); + + static bool setServiceLogsEnabled(bool enabled); + + static bool openLogsFolder(bool isServiceLogger); + + static void clearLogs(bool isServiceLogger); + static void clearServiceLogs(); + static void cleanUp(); + + static QString userLogsFilePath(); + static QString serviceLogsFilePath(); + static QString systemLogDir(); + + static QString getLogFile(); + static QString getServiceLogFile(); + + // compat with Mozilla logger + Logger(const QString &className) + { + m_className = className; + } + const QString &className() const + { + return m_className; + } + + class Log + { + public: + Log(Logger *logger, LogLevel level); + ~Log(); + + Log &operator<<(uint64_t t); + Log &operator<<(const char *t); + Log &operator<<(const QString &t); + Log &operator<<(const QStringList &t); + Log &operator<<(const QByteArray &t); + Log &operator<<(const QJsonObject &t); + Log &operator<<(QTextStreamFunction t); + Log &operator<<(const void *t); + + // Q_ENUM + template typename std::enable_if::Value, Log &>::type operator<<(T t) + { + const QMetaObject *meta = qt_getEnumMetaObject(t); + const char *name = qt_getEnumName(t); + addMetaEnum(typename QFlags::Int(t), meta, name); + return *this; + } + + private: + void addMetaEnum(quint64 value, const QMetaObject *meta, const char *name); + + Logger *m_logger; + LogLevel m_logLevel; + + struct Data + { + Data() : m_ts(&m_buffer, QIODevice::WriteOnly) + { + } + + QString m_buffer; + QTextStream m_ts; + }; + + Data *m_data; + }; + + Log error(); + Log warning(); + Log info(); + Log debug(); + QString sensitive(const QString &input); + +private: + Logger() {}; + Logger(Logger const &) = delete; + Logger &operator=(Logger const &) = delete; + + static QString userLogsDir(); + + static QFile m_file; + static QTextStream m_textStream; + static QString m_logFileName; + static QString m_serviceLogFileName; + + friend void debugMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg); + + // compat with Mozilla logger + QString m_className; +}; + +#endif // LOGGER_H diff --git a/ipc/ipcserver.cpp b/ipc/ipcserver.cpp index d236edd7..94fff89f 100644 --- a/ipc/ipcserver.cpp +++ b/ipc/ipcserver.cpp @@ -1,33 +1,33 @@ #include "ipcserver.h" -#include #include -#include #include +#include +#include +#include -#include "qjsonarray.h" -#include "router.h" #include "logger.h" +#include "router.h" #include "../client/protocols/protocols_defs.h" #ifdef Q_OS_WIN -#include "tapcontroller_win.h" -#include "../client/platforms/windows/daemon/windowsfirewall.h" -#include "../client/platforms/windows/daemon/windowsdaemon.h" + #include "../client/platforms/windows/daemon/windowsdaemon.h" + #include "../client/platforms/windows/daemon/windowsfirewall.h" + #include "tapcontroller_win.h" #endif #ifdef Q_OS_LINUX -#include "../client/platforms/linux/daemon/linuxfirewall.h" + #include "../client/platforms/linux/daemon/linuxfirewall.h" #endif #ifdef Q_OS_MACOS -#include "../client/platforms/macos/daemon/macosfirewall.h" + #include "../client/platforms/macos/daemon/macosfirewall.h" #endif -IpcServer::IpcServer(QObject *parent): - IpcInterfaceSource(parent) +IpcServer::IpcServer(QObject *parent) : IpcInterfaceSource(parent) -{} +{ +} int IpcServer::createPrivilegedProcess() { @@ -59,23 +59,10 @@ int IpcServer::createPrivilegedProcess() } }); - QObject::connect(pd.serverNode.data(), &QRemoteObjectHost::error, this, [pd](QRemoteObjectNode::ErrorCode errorCode) { - qDebug() << "QRemoteObjectHost::error" << errorCode; - }); + QObject::connect(pd.serverNode.data(), &QRemoteObjectHost::error, this, + [pd](QRemoteObjectNode::ErrorCode errorCode) { qDebug() << "QRemoteObjectHost::error" << errorCode; }); - QObject::connect(pd.serverNode.data(), &QRemoteObjectHost::destroyed, this, [pd]() { - qDebug() << "QRemoteObjectHost::destroyed"; - }); - -// connect(pd.ipcProcess.data(), &IpcServerProcess::finished, this, [this, pid=m_localpid](int exitCode, QProcess::ExitStatus exitStatus){ -// qDebug() << "IpcServerProcess finished" << exitCode << exitStatus; -//// if (m_processes.contains(pid)) { -//// m_processes[pid].ipcProcess.reset(); -//// m_processes[pid].serverNode.reset(); -//// m_processes[pid].localServer.reset(); -//// m_processes.remove(pid); -//// } -// }); + QObject::connect(pd.serverNode.data(), &QRemoteObjectHost::destroyed, this, [pd]() { qDebug() << "QRemoteObjectHost::destroyed"; }); m_processes.insert(m_localpid, pd); @@ -106,7 +93,7 @@ bool IpcServer::routeDeleteList(const QString &gw, const QStringList &ips) qDebug() << "IpcServer::routeDeleteList"; #endif - return Router::routeDeleteList(gw ,ips); + return Router::routeDeleteList(gw, ips); } void IpcServer::flushDns() @@ -159,12 +146,13 @@ void IpcServer::cleanUp() qDebug() << "IpcServer::cleanUp"; #endif - Logger::deinit(); + Logger::deInit(); Logger::cleanUp(); } -void IpcServer::clearLogs() { - Logger::clearLogs(); +void IpcServer::clearLogs() +{ + Logger::clearLogs(true); } bool IpcServer::createTun(const QString &dev, const QString &subnet) @@ -177,7 +165,7 @@ bool IpcServer::deleteTun(const QString &dev) return Router::deleteTun(dev); } -bool IpcServer::updateResolvers(const QString& ifname, const QList& resolvers) +bool IpcServer::updateResolvers(const QString &ifname, const QList &resolvers) { return Router::updateResolvers(ifname, resolvers); } @@ -199,10 +187,9 @@ void IpcServer::setLogsEnabled(bool enabled) #endif if (enabled) { - Logger::init(); - } - else { - Logger::deinit(); + Logger::init(true); + } else { + Logger::deInit(); } } @@ -221,13 +208,11 @@ bool IpcServer::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterInd QStringList allownets; QStringList blocknets; - if (splitTunnelType == 0) - { + if (splitTunnelType == 0) { blockAll = true; allowNets = true; allownets.append(configStr.value(amnezia::config_key::hostName).toString()); - } else if (splitTunnelType == 1) - { + } else if (splitTunnelType == 1) { blockNets = true; for (auto v : splitTunnelSites) { blocknets.append(v.toString()); @@ -269,18 +254,17 @@ bool IpcServer::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterInd // double-check + ensure our firewall is installed and enabled. This is necessary as // other software may disable pfctl before re-enabling with their own rules (e.g other VPNs) - if (!MacOSFirewall::isInstalled()) MacOSFirewall::install(); + if (!MacOSFirewall::isInstalled()) + MacOSFirewall::install(); MacOSFirewall::ensureRootAnchorPriority(); MacOSFirewall::setAnchorEnabled(QStringLiteral("000.allowLoopback"), true); MacOSFirewall::setAnchorEnabled(QStringLiteral("100.blockAll"), blockAll); MacOSFirewall::setAnchorEnabled(QStringLiteral("110.allowNets"), allowNets); - MacOSFirewall::setAnchorTable(QStringLiteral("110.allowNets"), allowNets, - QStringLiteral("allownets"), allownets); + MacOSFirewall::setAnchorTable(QStringLiteral("110.allowNets"), allowNets, QStringLiteral("allownets"), allownets); MacOSFirewall::setAnchorEnabled(QStringLiteral("120.blockNets"), blockNets); - MacOSFirewall::setAnchorTable(QStringLiteral("120.blockNets"), blockNets, - QStringLiteral("blocknets"), blocknets); + MacOSFirewall::setAnchorTable(QStringLiteral("120.blockNets"), blockNets, QStringLiteral("blocknets"), blocknets); MacOSFirewall::setAnchorEnabled(QStringLiteral("200.allowVPN"), true); MacOSFirewall::setAnchorEnabled(QStringLiteral("250.blockIPv6"), true); MacOSFirewall::setAnchorEnabled(QStringLiteral("290.allowDHCP"), true); @@ -520,10 +504,8 @@ bool IpcServer::enablePeerTraffic(const QJsonObject &configStr) // Use APP split tunnel if (splitTunnelType == 0 || splitTunnelType == 2) { - config.m_allowedIPAddressRanges.append( - IPAddress(QHostAddress("0.0.0.0"), 0)); - config.m_allowedIPAddressRanges.append( - IPAddress(QHostAddress("::"), 0)); + config.m_allowedIPAddressRanges.append(IPAddress(QHostAddress("0.0.0.0"), 0)); + config.m_allowedIPAddressRanges.append(IPAddress(QHostAddress("::"), 0)); } if (splitTunnelType == 1) { @@ -531,10 +513,9 @@ bool IpcServer::enablePeerTraffic(const QJsonObject &configStr) QString ipRange = v.toString(); if (ipRange.split('/').size() > 1) { config.m_allowedIPAddressRanges.append( - IPAddress(QHostAddress(ipRange.split('/')[0]), atoi(ipRange.split('/')[1].toLocal8Bit()))); + IPAddress(QHostAddress(ipRange.split('/')[0]), atoi(ipRange.split('/')[1].toLocal8Bit()))); } else { - config.m_allowedIPAddressRanges.append( - IPAddress(QHostAddress(ipRange), 32)); + config.m_allowedIPAddressRanges.append(IPAddress(QHostAddress(ipRange), 32)); } } } @@ -547,7 +528,7 @@ bool IpcServer::enablePeerTraffic(const QJsonObject &configStr) } } - for (const QJsonValue& i : configStr.value(amnezia::config_key::splitTunnelApps).toArray()) { + for (const QJsonValue &i : configStr.value(amnezia::config_key::splitTunnelApps).toArray()) { if (!i.isString()) { break; } diff --git a/service/server/CMakeLists.txt b/service/server/CMakeLists.txt index 234dfafe..c41e57f5 100644 --- a/service/server/CMakeLists.txt +++ b/service/server/CMakeLists.txt @@ -19,7 +19,7 @@ set(HEADERS ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipcserver.h ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipcserverprocess.h ${CMAKE_CURRENT_LIST_DIR}/localserver.h - ${CMAKE_CURRENT_LIST_DIR}/logger.h + ${CMAKE_CURRENT_LIST_DIR}/../../common/logger/logger.h ${CMAKE_CURRENT_LIST_DIR}/router.h ${CMAKE_CURRENT_LIST_DIR}/systemservice.h ${CMAKE_CURRENT_BINARY_DIR}/version.h @@ -31,7 +31,7 @@ set(SOURCES ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipcserver.cpp ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipcserverprocess.cpp ${CMAKE_CURRENT_LIST_DIR}/localserver.cpp - ${CMAKE_CURRENT_LIST_DIR}/logger.cpp + ${CMAKE_CURRENT_LIST_DIR}/../../common/logger/logger.cpp ${CMAKE_CURRENT_LIST_DIR}/main.cpp ${CMAKE_CURRENT_LIST_DIR}/router.cpp ${CMAKE_CURRENT_LIST_DIR}/systemservice.cpp @@ -238,6 +238,7 @@ include_directories( ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/../../client ${CMAKE_CURRENT_LIST_DIR}/../../ipc + ${CMAKE_CURRENT_LIST_DIR}/../../common/logger ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/service/server/logger.cpp b/service/server/logger.cpp deleted file mode 100644 index ab658796..00000000 --- a/service/server/logger.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#include "logger.h" - -#include -#include -#include -#include - -#include - -#include "version.h" -#include "utilities.h" - -QFile Logger::m_file; -QTextStream Logger::m_textStream; -QString Logger::m_logFileName = QString("%1.log").arg(SERVICE_NAME); - -void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg) -{ - if (msg.simplified().isEmpty()) { - return; - } - - Logger::m_textStream << qFormatLogMessage(type, context, msg) << Qt::endl << Qt::flush; - - std::cout << qFormatLogMessage(type, context, msg).toStdString() << std::endl << std::flush; -} - -bool Logger::init() -{ - if (m_file.isOpen()) return true; - - QString path = Utils::systemLogPath(); - QDir appDir(path); - if (!appDir.mkpath(path)) { - return false; - } - - qSetMessagePattern("%{time yyyy-MM-dd hh:mm:ss} %{type} %{message}"); - - m_file.setFileName(appDir.filePath(m_logFileName)); - if (!m_file.open(QIODevice::Append)) { - qWarning() << "Cannot open log file:" << m_logFileName; - return false; - } - m_file.setTextModeEnabled(true); - m_textStream.setDevice(&m_file); - qInstallMessageHandler(debugMessageHandler); - - return true; -} - -void Logger::deinit() -{ - m_file.close(); - m_textStream.setDevice(nullptr); - qInstallMessageHandler(nullptr); -} - -QString Logger::serviceLogFileNamePath() -{ - return m_file.fileName(); -} - -void Logger::clearLogs() -{ - bool isLogActive = m_file.isOpen(); - m_file.close(); - - - QString path = Utils::systemLogPath(); - QDir appDir(path); - QFile file; - file.setFileName(appDir.filePath(m_logFileName)); - - file.open(QIODevice::WriteOnly | QIODevice::Truncate); - file.resize(0); - file.close(); - - if (isLogActive) { - init(); - } -} - -void Logger::cleanUp() -{ - clearLogs(); - deinit(); - - QString path = Utils::systemLogPath(); - QDir appDir(path); - - { - QFile file; - file.setFileName(appDir.filePath(m_logFileName)); - file.remove(); - } - { - QFile file; - file.setFileName(appDir.filePath("openvpn.log")); - file.remove(); - } - -#ifdef Q_OS_WINDOWS - QDir dir(Utils::systemLogPath()); - dir.removeRecursively(); -#endif -} - - -Logger::Log::Log(Logger* logger, LogLevel logLevel) - : m_logger(logger), m_logLevel(logLevel), m_data(new Data()) {} - -Logger::Log::~Log() { - qDebug() << "Amnezia" << m_logger->className() << m_data->m_buffer.trimmed(); - delete m_data; -} - -Logger::Log Logger::error() { return Log(this, LogLevel::Error); } -Logger::Log Logger::warning() { return Log(this, LogLevel::Warning); } -Logger::Log Logger::info() { return Log(this, LogLevel::Info); } -Logger::Log Logger::debug() { return Log(this, LogLevel::Debug); } -QString Logger::sensitive(const QString& input) { -#ifdef Q_DEBUG - return input; -#else - Q_UNUSED(input); - return QString(8, 'X'); -#endif -} - - -#define CREATE_LOG_OP_REF(x) \ -Logger::Log& Logger::Log::operator<<(x t) { \ - m_data->m_ts << t << ' '; \ - return *this; \ -} - -CREATE_LOG_OP_REF(uint64_t); -CREATE_LOG_OP_REF(const char*); -CREATE_LOG_OP_REF(const QString&); -CREATE_LOG_OP_REF(const QByteArray&); -CREATE_LOG_OP_REF(const void*); - -#undef CREATE_LOG_OP_REF - -Logger::Log& Logger::Log::operator<<(const QStringList& t) { - m_data->m_ts << '[' << t.join(",") << ']' << ' '; - return *this; -} - -Logger::Log& Logger::Log::operator<<(const QJsonObject& t) { - m_data->m_ts << QJsonDocument(t).toJson(QJsonDocument::Indented) << ' '; - return *this; -} - -Logger::Log& Logger::Log::operator<<(QTextStreamFunction t) { - m_data->m_ts << t; - return *this; -} - -void Logger::Log::addMetaEnum(quint64 value, const QMetaObject* meta, - const char* name) { - QMetaEnum me = meta->enumerator(meta->indexOfEnumerator(name)); - - QString out; - QTextStream ts(&out); - - if (const char* scope = me.scope()) { - ts << scope << "::"; - } - - const char* key = me.valueToKey(static_cast(value)); - const bool scoped = me.isScoped(); - if (scoped || !key) { - ts << me.enumName() << (!key ? "(" : "::"); - } - - if (key) { - ts << key; - } else { - ts << value << ")"; - } - - m_data->m_ts << out; -} diff --git a/service/server/logger.h b/service/server/logger.h deleted file mode 100644 index bb920931..00000000 --- a/service/server/logger.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef LOGGER_H -#define LOGGER_H - -#include -#include -#include -#include - -#include "mozilla/shared/loglevel.h" - -class Logger -{ -public: - static bool init(); - static void deinit(); - - static QString serviceLogFileNamePath(); - - static void clearLogs(); - static void cleanUp(); - - // compat with Mozilla logger - Logger(const QString &className) { m_className = className; } - const QString& className() const { return m_className; } - - class Log { - public: - Log(Logger* logger, LogLevel level); - ~Log(); - - Log& operator<<(uint64_t t); - Log& operator<<(const char* t); - Log& operator<<(const QString& t); - Log& operator<<(const QStringList& t); - Log& operator<<(const QByteArray& t); - Log& operator<<(const QJsonObject& t); - Log& operator<<(QTextStreamFunction t); - Log& operator<<(const void* t); - - // Q_ENUM - template - typename std::enable_if::Value, Log&>::type - operator<<(T t) { - const QMetaObject* meta = qt_getEnumMetaObject(t); - const char* name = qt_getEnumName(t); - addMetaEnum(typename QFlags::Int(t), meta, name); - return *this; - } - - private: - void addMetaEnum(quint64 value, const QMetaObject* meta, const char* name); - - Logger* m_logger; - LogLevel m_logLevel; - - struct Data { - Data() : m_ts(&m_buffer, QIODevice::WriteOnly) {} - - QString m_buffer; - QTextStream m_ts; - }; - - Data* m_data; - }; - - Log error(); - Log warning(); - Log info(); - Log debug(); - QString sensitive(const QString& input); - -private: - friend void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg); - - static QFile m_file; - static QString m_logFileName; - static QTextStream m_textStream; - - // compat with Mozilla logger - QString m_className; -}; - -#endif // LOGGER_H diff --git a/service/server/main.cpp b/service/server/main.cpp index 144ddf60..cee33d72 100644 --- a/service/server/main.cpp +++ b/service/server/main.cpp @@ -44,7 +44,7 @@ int runApplication(int argc, char** argv) int main(int argc, char **argv) { - Utils::initializePath(Utils::systemLogPath()); + Utils::initializePath(Logger::systemLogDir()); if (argc >= 2) { qInfo() << "Started as console application";