mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 10:50:23 +08:00
[ReDesign] Re-design config window UI
Signed-off-by: Leroy.H.Y <lhy20010403@hotmail.com>
Former-commit-id: 0d2e1c62b3
This commit is contained in:
parent
25fe97267d
commit
20ca9cef23
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ v2ray
|
||||
v2ray.sig
|
||||
v2ctl.sig
|
||||
./.vscode
|
||||
*.qm
|
||||
build/
|
||||
python37/
|
||||
tools/python-3.7.3.exe
|
||||
|
@ -29,7 +29,7 @@ VPATH += ./src \
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
MainWindow.cpp \
|
||||
ConnectionEditWindow.cpp \
|
||||
importconf.cpp \
|
||||
PrefrencesWindow.cpp \
|
||||
@ -39,7 +39,7 @@ SOURCES += \
|
||||
runguard.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
MainWindow.h \
|
||||
ConnectionEditWindow.h \
|
||||
importconf.h \
|
||||
PrefrencesWindow.h \
|
||||
@ -49,14 +49,13 @@ HEADERS += \
|
||||
runguard.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
MainWindow.ui \
|
||||
ConnectionEditWindow.ui \
|
||||
importconf.ui \
|
||||
PrefrencesWindow.ui \
|
||||
import_vmess.ui
|
||||
|
||||
TRANSLATIONS += ./translations/zh-CN.ts \
|
||||
./translations/en-US.ts
|
||||
TRANSLATIONS += ./translations/zh-CN.ts
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "ConnectionEditWindow.h"
|
||||
#include "ui_ConnectionEditWindow.h"
|
||||
#include <iostream>
|
||||
#include "mainwindow.h"
|
||||
#include "MainWindow.h"
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QIntValidator>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ConfEdit</string>
|
||||
<string>Connection Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,3">
|
||||
<item row="0" column="0">
|
||||
@ -202,7 +202,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="usesScrollButtons">
|
||||
<bool>true</bool>
|
||||
@ -220,7 +220,7 @@
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>none (NoneHeaderObject)</string>
|
||||
<string>none</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -643,7 +643,7 @@
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>none (None)</string>
|
||||
<string>none</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -794,7 +794,7 @@
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>none (None)</string>
|
||||
<string>none</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
#include "import_vmess.h"
|
||||
#include "PrefrencesWindow.h"
|
||||
#include "mainwindow.h"
|
||||
#include <ui_mainwindow.h>
|
||||
#include "MainWindow.h"
|
||||
#include <ui_MainWindow.h>
|
||||
#include "ConnectionEditWindow.h"
|
||||
#include "importconf.h"
|
||||
#include "vinteract.h"
|
@ -27,10 +27,8 @@ public:
|
||||
QScrollBar *bar;
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
void on_restartButton_clicked();
|
||||
|
||||
private slots:
|
||||
void on_restartButton_clicked();
|
||||
void on_actionEdit_triggered();
|
||||
void on_actionExisting_config_triggered();
|
||||
void updateConfTable();
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "utils.h"
|
||||
#include "PrefrencesWindow.h"
|
||||
#include "mainwindow.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ui_PrefrencesWindow.h"
|
||||
|
||||
PrefrencesWindow::PrefrencesWindow(MainWindow *parent) :
|
||||
@ -49,16 +49,16 @@ PrefrencesWindow::~PrefrencesWindow()
|
||||
|
||||
void PrefrencesWindow::on_buttonBox_accepted()
|
||||
{
|
||||
if(testCoreFiles()) {
|
||||
if(checkVCoreExes()) {
|
||||
if(ui->httpPortLE->text().toInt() != ui->socksPortLE->text().toInt()) {
|
||||
QJsonArray inbounds;
|
||||
QJsonDocument modifiedDoc;
|
||||
inbounds = rootObj.value("inbounds").toArray();
|
||||
int socksId = getIndexInArrayByValue(inbounds, "tag", "socks-in");
|
||||
int socksId = getIndexByValue(inbounds, "tag", "socks-in");
|
||||
if(socksId != -1) {
|
||||
inbounds.removeAt(socksId);
|
||||
}
|
||||
int httpId = getIndexInArrayByValue(inbounds, "tag", "http-in");
|
||||
int httpId = getIndexByValue(inbounds, "tag", "http-in");
|
||||
if(httpId != -1) {
|
||||
inbounds.removeAt(httpId);
|
||||
}
|
||||
@ -93,16 +93,16 @@ void PrefrencesWindow::on_buttonBox_accepted()
|
||||
rootObj.insert("inbounds", QJsonValue(inbounds));
|
||||
#ifndef _WIN32
|
||||
// Set UID and GID in *nix
|
||||
QFileInfo ray("v2ray");
|
||||
if(ui->checkBox->isChecked() && ray.ownerId() != 0) {
|
||||
QFileInfo v2rayCoreExeFile("v2ray");
|
||||
if(ui->checkBox->isChecked() && v2rayCoreExeFile.ownerId() != 0) {
|
||||
QProcess::execute("pkexec", QStringList() << "bash" << "-c" << "chown root:root " + QCoreApplication::applicationDirPath() + "/v2ray" + ";chmod +s " + QCoreApplication::applicationDirPath() + "/v2ray");
|
||||
} else if (!ui->checkBox->isChecked() && ray.ownerId() == 0) {
|
||||
} else if (!ui->checkBox->isChecked() && v2rayCoreExeFile.ownerId() == 0) {
|
||||
uid_t uid = getuid();
|
||||
gid_t gid = getgid();
|
||||
QProcess::execute("pkexec", QStringList() << "chown" << QString::number(uid) + ":" + QString::number(gid) << QCoreApplication::applicationDirPath() + "/v2ray");
|
||||
}
|
||||
ray.refresh();
|
||||
rootObj.insert("v2suidEnabled", ray.ownerId() == 0);
|
||||
v2rayCoreExeFile.refresh();
|
||||
rootObj.insert("v2suidEnabled", v2rayCoreExeFile.ownerId() == 0);
|
||||
#else
|
||||
// No such uid gid thing on windows....
|
||||
#endif
|
||||
@ -114,17 +114,16 @@ void PrefrencesWindow::on_buttonBox_accepted()
|
||||
}
|
||||
confFile.write(byteArray);
|
||||
confFile.close();
|
||||
parentMW->on_restartButton_clicked();
|
||||
} else {
|
||||
alterMessage("Config error", "Port numbers cannot be the same!");
|
||||
showWarnMessageBox(this, tr("Config error"), tr("Port numbers cannot be the same!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PrefrencesWindow::on_httpCB_stateChanged(int arg1)
|
||||
void PrefrencesWindow::on_httpCB_stateChanged(int checked)
|
||||
{
|
||||
if(arg1 != Qt::Checked) {
|
||||
if(checked != Qt::Checked) {
|
||||
ui->httpPortLE->setDisabled(true);
|
||||
} else {
|
||||
ui->httpPortLE->setEnabled(true);
|
||||
@ -132,9 +131,9 @@ void PrefrencesWindow::on_httpCB_stateChanged(int arg1)
|
||||
}
|
||||
}
|
||||
|
||||
void PrefrencesWindow::on_socksCB_stateChanged(int arg1)
|
||||
void PrefrencesWindow::on_socksCB_stateChanged(int checked)
|
||||
{
|
||||
if(arg1 != Qt::Checked) {
|
||||
if(checked != Qt::Checked) {
|
||||
ui->socksPortLE->setDisabled(true);
|
||||
} else {
|
||||
ui->socksPortLE->setEnabled(true);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include <QJsonObject>
|
||||
#include "mainwindow.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
@ -6,10 +6,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>650</width>
|
||||
<height>218</height>
|
||||
<width>663</width>
|
||||
<height>325</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>663</width>
|
||||
<height>325</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Prefrences</string>
|
||||
</property>
|
||||
@ -19,94 +25,141 @@
|
||||
<property name="title">
|
||||
<string>General</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>zh-CN</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>en-US</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Run v2ray with root</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Log Level</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>138</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>debug</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>info</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>warning</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>error</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>none</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="title">
|
||||
<string>Mux Cool</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>zh-CN</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>en-US</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Run v2ray with root</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Log Level</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>138</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>debug</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>info</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>warning</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>error</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>none</string>
|
||||
</property>
|
||||
</item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Concurrency</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>8</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -117,7 +170,7 @@
|
||||
<property name="title">
|
||||
<string>Inbound Settings</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
@ -154,6 +207,40 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Auth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -184,6 +271,40 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Auth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_4">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_4"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -48,6 +48,6 @@ void import_vmess::on_buttonBox_accepted()
|
||||
}
|
||||
QFile::remove("config.json.tmp");
|
||||
} else {
|
||||
alterMessage("Error occured", "Failed to generate config file.");
|
||||
showWarnMessageBox(this, "Error occured", "Failed to generate config file.");
|
||||
}
|
||||
}
|
||||
|
@ -63,13 +63,13 @@ void importConf::savefromFile(QString path, QString alias)
|
||||
int id = newConf.save();
|
||||
if(id < 0)
|
||||
{
|
||||
alterMessage("Database Error", "Failed to open database while saving");
|
||||
showWarnMessageBox(this, "Database Error", "Failed to open database while saving");
|
||||
return;
|
||||
}
|
||||
emit updateConfTable();
|
||||
QString newFile = "conf/" + QString::number(id) + ".conf";
|
||||
if(!QFile::copy(path, newFile)) {
|
||||
alterMessage("Copy error", "Failed to copy custom config file.");
|
||||
showWarnMessageBox(this, "Copy error", "Failed to copy custom config file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
12
src/main.cpp
12
src/main.cpp
@ -11,9 +11,11 @@
|
||||
|
||||
#include "runguard.h"
|
||||
#include "utils.h"
|
||||
#include "mainwindow.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ConnectionEditWindow.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void firstRunCheck()
|
||||
{
|
||||
if(!QDir("conf").exists()) {
|
||||
@ -63,12 +65,15 @@ int main(int argc, char *argv[])
|
||||
QApplication _qApp(argc, argv);
|
||||
|
||||
QTranslator translator;
|
||||
translator.load(QString("zh.qm"));
|
||||
if (translator.load(QString("zh-CN.qm"), QString("translations")))
|
||||
{
|
||||
cout << "Loaded Chinese translations" << endl;
|
||||
}
|
||||
_qApp.installTranslator(&translator);
|
||||
|
||||
RunGuard guard("Hv2ray");
|
||||
if(!guard.isSingleInstance()) {
|
||||
alterMessage("Hv2Ray", "Another instance of Hv2ray is already running!");
|
||||
showWarnMessageBox(nullptr, "Hv2Ray", "Another instance of Hv2ray is already running!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -76,6 +81,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
firstRunCheck();
|
||||
MainWindow w;
|
||||
|
||||
w.show();
|
||||
return _qApp.exec();
|
||||
}
|
||||
|
@ -9,8 +9,7 @@
|
||||
|
||||
QJsonObject switchJsonArrayObject(QJsonObject obj, QString value)
|
||||
{
|
||||
QJsonObject returnObj;
|
||||
returnObj = obj.value(value).isNull()
|
||||
QJsonObject returnObj = obj.value(value).isNull()
|
||||
? obj.value(value).toObject()
|
||||
: obj.value(value).toArray().first().toObject();
|
||||
return returnObj;
|
||||
@ -28,7 +27,7 @@ QJsonObject findValueFromJsonArray(QJsonArray arr, QString key, QString val)
|
||||
|
||||
QJsonObject loadRootObjFromConf()
|
||||
{
|
||||
QFile globalConfigFile("conf/Hv2ray.config.json");
|
||||
QFile globalConfigFile("Hv2ray.conf");
|
||||
globalConfigFile.open(QIODevice::ReadOnly);
|
||||
QByteArray conf = globalConfigFile.readAll();
|
||||
globalConfigFile.close();
|
||||
@ -49,19 +48,19 @@ bool getRootEnabled()
|
||||
return loadRootObjFromConf().value("v2suidEnabled").toBool();
|
||||
}
|
||||
|
||||
bool testCoreFiles()
|
||||
bool checkVCoreExes()
|
||||
{
|
||||
if (QFileInfo("v2ray").exists() && QFileInfo("geoip.dat").exists() && QFileInfo("geosite.dat").exists() && QFileInfo("v2ctl").exists()) {
|
||||
return true;
|
||||
} else {
|
||||
alterMessage("v2ray core not found", "V2ray core files not found. Please download the latest version of v2ray and extract it into the current folder.");
|
||||
showWarnMessageBox(nullptr, "v2ray core not found", "V2ray core files not found. Please download the latest version of v2ray and extract it into the current folder.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void alterMessage(QString title, QString text)
|
||||
void showWarnMessageBox(QWidget* parent, QString title, QString text)
|
||||
{
|
||||
QMessageBox::critical(nullptr, title, text, QMessageBox::Ok | QMessageBox::Default, 0);
|
||||
QMessageBox::warning(parent, title, text, QMessageBox::Ok | QMessageBox::Default, 0);
|
||||
}
|
||||
|
||||
void overrideInbounds(QString path)
|
||||
@ -84,7 +83,7 @@ void overrideInbounds(QString path)
|
||||
confFile.close();
|
||||
}
|
||||
|
||||
int getIndexInArrayByValue(QJsonArray array, QString key, QString val)
|
||||
int getIndexByValue(QJsonArray array, QString key, QString val)
|
||||
{
|
||||
QJsonArray::iterator it;
|
||||
int index = 0;
|
||||
|
@ -6,9 +6,9 @@ QJsonObject switchJsonArrayObject(QJsonObject objest, QString value);
|
||||
QJsonObject findValueFromJsonArray(QJsonArray arr, QString key, QString val);
|
||||
QJsonObject loadRootObjFromConf();
|
||||
QJsonArray getInbounds();
|
||||
bool testCoreFiles();
|
||||
void alterMessage(QString title, QString text);
|
||||
bool checkVCoreExes();
|
||||
void showWarnMessageBox(QWidget* parent, QString title, QString text);
|
||||
void overrideInbounds(QString path);
|
||||
int getIndexInArrayByValue(QJsonArray array, QString key, QString val);
|
||||
int getIndexByValue(QJsonArray array, QString key, QString val);
|
||||
|
||||
#endif // UTILS_H
|
||||
|
@ -4,12 +4,12 @@
|
||||
#include <QDir>
|
||||
|
||||
#include "utils.h"
|
||||
#include "mainwindow.h"
|
||||
#include "MainWindow.h"
|
||||
#include "vinteract.h"
|
||||
|
||||
bool validationCheck(QString path)
|
||||
{
|
||||
if(testCoreFiles()) {
|
||||
if(checkVCoreExes()) {
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("V2RAY_LOCATION_ASSET", QDir::currentPath());
|
||||
|
||||
@ -25,7 +25,7 @@ bool validationCheck(QString path)
|
||||
QString output = QString(process.readAllStandardOutput());
|
||||
|
||||
if (!output.contains("Configuration OK")) {
|
||||
alterMessage("Error in configuration", output.mid(output.indexOf("anti-censorship.") + 17));
|
||||
showWarnMessageBox(nullptr, "Error in configuration", output.mid(output.indexOf("anti-censorship.") + 17));
|
||||
return false;
|
||||
}
|
||||
else return true;
|
||||
@ -48,7 +48,7 @@ bool v2Instance::start(MainWindow *parent)
|
||||
if(this->v2Process->state() == QProcess::Running) {
|
||||
this->stop();
|
||||
}
|
||||
if (testCoreFiles()) {
|
||||
if (checkVCoreExes()) {
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("V2RAY_LOCATION_ASSET", QDir::currentPath());
|
||||
this->v2Process->setProcessEnvironment(env);
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define VINTERACT_H
|
||||
#include <QString>
|
||||
#include <QProcess>
|
||||
#include "mainwindow.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
bool validationCheck(QString path);
|
||||
class v2Instance
|
||||
|
@ -3,11 +3,6 @@
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>ConnectionEditWindow</name>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="20"/>
|
||||
<source>ConfEdit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="28"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="423"/>
|
||||
@ -58,7 +53,10 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="127"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="223"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="646"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="730"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="797"/>
|
||||
<source>none</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -108,8 +106,8 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="223"/>
|
||||
<source>none (NoneHeaderObject)</source>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="20"/>
|
||||
<source>Connection Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@ -258,12 +256,6 @@
|
||||
<source>header (Header Object)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="646"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="797"/>
|
||||
<source>none (None)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="651"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="802"/>
|
||||
|
@ -3,131 +3,133 @@
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>ConnectionEditWindow</name>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="20"/>
|
||||
<source>ConfEdit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="28"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="423"/>
|
||||
<source>Host</source>
|
||||
<translation type="unfinished">主机名</translation>
|
||||
<translation>主机名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="42"/>
|
||||
<source>Port</source>
|
||||
<translation type="unfinished">端口</translation>
|
||||
<translation>端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="56"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished">备注</translation>
|
||||
<translation>备注</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="73"/>
|
||||
<source>UUID</source>
|
||||
<translation type="unfinished">UUID</translation>
|
||||
<translation>UUID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="90"/>
|
||||
<source>Alter ID</source>
|
||||
<translation type="unfinished">Alter ID</translation>
|
||||
<translation>Alter ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="104"/>
|
||||
<source>Security</source>
|
||||
<translation type="unfinished">安全设置</translation>
|
||||
<translation>安全设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="112"/>
|
||||
<source>auto</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>自动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="117"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="735"/>
|
||||
<source>aes-128-gcm</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="122"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="740"/>
|
||||
<source>chacha20-poly1305</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="127"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="223"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="646"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="730"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="797"/>
|
||||
<source>none</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>不使用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="135"/>
|
||||
<source>Transport</source>
|
||||
<translation type="unfinished">传输设置</translation>
|
||||
<translation>传输设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="143"/>
|
||||
<source>tcp (TCP)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="148"/>
|
||||
<source>http (HTTP)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="153"/>
|
||||
<source>ws (WebSocket)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="158"/>
|
||||
<source>kcp (mKCP)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="163"/>
|
||||
<source>domainsocket (Domain Socket)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="168"/>
|
||||
<source>quic (Quick UDP Internet Connection)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="181"/>
|
||||
<source>Transport Settings (StreamSettingsObject)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>传输设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="212"/>
|
||||
<source>TCP</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="223"/>
|
||||
<source>none (NoneHeaderObject)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">无</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="20"/>
|
||||
<source>Connection Settings</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="228"/>
|
||||
<source>http (HttpHeaderobject)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="236"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="632"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="783"/>
|
||||
<source>type</source>
|
||||
<translation type="unfinished">类型</translation>
|
||||
<translation>伪装类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="249"/>
|
||||
<source>Request (HTTPRequestObject)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>请求包 (HTTPRequestObject)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="259"/>
|
||||
@ -152,7 +154,7 @@
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="288"/>
|
||||
<source>Response (HTTPResponseObject)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>响应包 (HTTPResponseObject)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="298"/>
|
||||
@ -172,7 +174,7 @@
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="322"/>
|
||||
<source>HTTP</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="331"/>
|
||||
@ -183,14 +185,14 @@
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="339"/>
|
||||
<source>host</source>
|
||||
<translation type="unfinished">域名</translation>
|
||||
<translation>域名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="346"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="373"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="691"/>
|
||||
<source>path</source>
|
||||
<translation type="unfinished">路径</translation>
|
||||
<translation>路径</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="353"/>
|
||||
@ -201,12 +203,12 @@
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="363"/>
|
||||
<source>WebSocket</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="389"/>
|
||||
<source>headers (Key Value Pair)</source>
|
||||
<translation type="unfinished">HTTP 头</translation>
|
||||
<translation>HTTP 头</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="454"/>
|
||||
@ -216,108 +218,106 @@
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="462"/>
|
||||
<source>MTU</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>最大传输单元</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="488"/>
|
||||
<source>TTI (ms)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>传输时间间隔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="514"/>
|
||||
<source>UplinkCapacity (MB/s)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>上行链路容量 (MB/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="537"/>
|
||||
<source>Congestion</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>拥塞控制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="544"/>
|
||||
<source>Enabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>启用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="555"/>
|
||||
<source>downlinkCapacity (MB/s)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>下行链路容量 (MB/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="578"/>
|
||||
<source>readBufferSize (MB)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>读取缓冲区 (MB)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="601"/>
|
||||
<source>writeBufferSize (MB)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>写入缓冲区 (MB)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="626"/>
|
||||
<source>header (Header Object)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>数据包头部伪装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="646"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="797"/>
|
||||
<source>none (None)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">不使用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="651"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="802"/>
|
||||
<source>srtp (SRTP, FaceTime)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="656"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="807"/>
|
||||
<source>utp (BitTorrent)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="661"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="812"/>
|
||||
<source>wechat-video (WeChat Video Message)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="666"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="817"/>
|
||||
<source>dtls (DTLS 1.2)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="671"/>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="822"/>
|
||||
<source>wireguard (WireGuard fake packets)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="683"/>
|
||||
<source>DomainSocket</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="698"/>
|
||||
<source>/path/to/ds/file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="708"/>
|
||||
<source>QUIC</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="716"/>
|
||||
<source>security</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>加密方式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="748"/>
|
||||
<source>key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>密钥</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="755"/>
|
||||
@ -327,250 +327,292 @@
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="762"/>
|
||||
<source>header</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>头部伪装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ConnectionEditWindow.ui" line="775"/>
|
||||
<source>header (HeaderObject)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>头部伪装 (HeaderObject)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="26"/>
|
||||
<location filename="../src/MainWindow.ui" line="26"/>
|
||||
<source>Hv2ray</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="46"/>
|
||||
<location filename="../src/MainWindow.ui" line="46"/>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>启动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="53"/>
|
||||
<location filename="../src/MainWindow.ui" line="53"/>
|
||||
<source>Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>停止</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="60"/>
|
||||
<location filename="../src/MainWindow.ui" line="60"/>
|
||||
<source>Restart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>重新启动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="70"/>
|
||||
<location filename="../src/MainWindow.ui" line="70"/>
|
||||
<source>Clear Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>清除日志</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="145"/>
|
||||
<location filename="../src/MainWindow.ui" line="145"/>
|
||||
<source>Config Detail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>详细配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="97"/>
|
||||
<location filename="../src/MainWindow.ui" line="97"/>
|
||||
<source>Host list</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>服务器列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="134"/>
|
||||
<location filename="../src/MainWindow.ui" line="134"/>
|
||||
<source>Config 1 (www.hostname.com:port)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="154"/>
|
||||
<location filename="../src/MainWindow.ui" line="154"/>
|
||||
<source>Host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>主机名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="161"/>
|
||||
<location filename="../src/MainWindow.ui" line="161"/>
|
||||
<source>www.hostname.com</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="168"/>
|
||||
<location filename="../src/MainWindow.ui" line="168"/>
|
||||
<source>Port</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="175"/>
|
||||
<location filename="../src/MainWindow.ui" line="175"/>
|
||||
<source>12345</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="182"/>
|
||||
<location filename="../src/MainWindow.ui" line="182"/>
|
||||
<source>UUID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>UUID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="189"/>
|
||||
<location filename="../src/MainWindow.ui" line="189"/>
|
||||
<source>TextLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="196"/>
|
||||
<location filename="../src/MainWindow.ui" line="196"/>
|
||||
<source>Transport</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>传输设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="203"/>
|
||||
<location filename="../src/MainWindow.ui" line="203"/>
|
||||
<source>mKCP</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="216"/>
|
||||
<location filename="../src/MainWindow.ui" line="216"/>
|
||||
<source>Connection Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>连接设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="223"/>
|
||||
<location filename="../src/MainWindow.ui" line="223"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="254"/>
|
||||
<location filename="../src/MainWindow.ui" line="254"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="258"/>
|
||||
<location filename="../src/MainWindow.ui" line="258"/>
|
||||
<source>New</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>新建</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="262"/>
|
||||
<location filename="../src/MainWindow.ui" line="262"/>
|
||||
<source>From</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>导入</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="277"/>
|
||||
<location filename="../src/MainWindow.ui" line="277"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>关于</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="286"/>
|
||||
<location filename="../src/MainWindow.ui" line="286"/>
|
||||
<source>Edit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>编辑</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="291"/>
|
||||
<location filename="../src/MainWindow.ui" line="291"/>
|
||||
<source>Vmess</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="296"/>
|
||||
<location filename="../src/MainWindow.ui" line="296"/>
|
||||
<source>Existing config</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>现有配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="301"/>
|
||||
<location filename="../src/MainWindow.ui" line="301"/>
|
||||
<source>Exit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="306"/>
|
||||
<location filename="../src/MainWindow.ui" line="306"/>
|
||||
<source>Preferences</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>首选项</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrefrencesWindow</name>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="14"/>
|
||||
<source>Prefrences</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="20"/>
|
||||
<source>General</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<source>Prefrences</source>
|
||||
<translation>首选项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="26"/>
|
||||
<source>General</source>
|
||||
<translation>基本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="34"/>
|
||||
<source>Language</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>语言</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="40"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="48"/>
|
||||
<source>zh-CN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="45"/>
|
||||
<source>en-US</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>中文</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="53"/>
|
||||
<source>en-US</source>
|
||||
<translation>英语</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="61"/>
|
||||
<source>Run v2ray with root</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>使用 root 启动 v2ray</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="60"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="133"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="183"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="68"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="131"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="138"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="186"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="234"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="270"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="298"/>
|
||||
<source>Enabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>启用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="67"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="75"/>
|
||||
<source>Log Level</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>日志等级</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="87"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="95"/>
|
||||
<source>debug</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>调试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="92"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="100"/>
|
||||
<source>info</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="97"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="105"/>
|
||||
<source>warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="102"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="110"/>
|
||||
<source>error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="107"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="115"/>
|
||||
<source>none</source>
|
||||
<translation>不使用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="125"/>
|
||||
<source>Mux Cool</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="118"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="145"/>
|
||||
<source>Concurrency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="171"/>
|
||||
<source>Inbound Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>入站设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="124"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="177"/>
|
||||
<source>HTTP</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>HTTP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="140"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="169"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="193"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="256"/>
|
||||
<source>Port</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="147"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="200"/>
|
||||
<source>8080</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="213"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="284"/>
|
||||
<source>Username</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="163"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="220"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="277"/>
|
||||
<source>Auth</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="227"/>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="291"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="250"/>
|
||||
<source>SOCKS</source>
|
||||
<translation>SOCKS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="263"/>
|
||||
<source>9001</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.cpp" line="118"/>
|
||||
<source>Config error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PrefrencesWindow.ui" line="176"/>
|
||||
<source>9001</source>
|
||||
<location filename="../src/PrefrencesWindow.cpp" line="118"/>
|
||||
<source>Port numbers cannot be the same!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
Loading…
Reference in New Issue
Block a user