mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-19 18:30:34 +08:00
[Added] Added more v2ray config structs and added x2struct JSON lib.
This commit is contained in:
parent
09eed2704d
commit
dfcbd64329
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
|||||||
[submodule "3rdparty/jsoncons"]
|
[submodule "3rdparty/jsoncons"]
|
||||||
path = 3rdparty/jsoncons
|
path = 3rdparty/jsoncons
|
||||||
url = https://github.com/danielaparker/jsoncons
|
url = https://github.com/danielaparker/jsoncons
|
||||||
|
[submodule "3rdparty/x2struct"]
|
||||||
|
path = 3rdparty/x2struct
|
||||||
|
url = git@github.com:xyz347/x2struct.git
|
||||||
|
1
3rdparty/x2struct
vendored
Submodule
1
3rdparty/x2struct
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 084c3cd183ae2450473befa53e987a0ed347a6ff
|
13
Hv2ray.pro
13
Hv2ray.pro
@ -25,7 +25,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
src/Hutils.cpp \
|
src/HUtils.cpp \
|
||||||
src/w_MainWindow.cpp \
|
src/w_MainWindow.cpp \
|
||||||
src/w_ConnectionEditWindow.cpp \
|
src/w_ConnectionEditWindow.cpp \
|
||||||
src/w_ImportConfig.cpp \
|
src/w_ImportConfig.cpp \
|
||||||
@ -35,14 +35,15 @@ SOURCES += \
|
|||||||
src/runguard.cpp
|
src/runguard.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/HUtils.h \
|
src/HConfigObjects.hpp \
|
||||||
src/Hv2ConfigObject.h \
|
src/HUtils.hpp \
|
||||||
|
src/V2ConfigObjects.hpp \
|
||||||
|
src/runguard.hpp \
|
||||||
|
src/vinteract.hpp \
|
||||||
src/w_MainWindow.h \
|
src/w_MainWindow.h \
|
||||||
src/w_ConnectionEditWindow.h \
|
src/w_ConnectionEditWindow.h \
|
||||||
src/w_ImportConfig.h \
|
src/w_ImportConfig.h \
|
||||||
src/w_PrefrencesWindow.h \
|
src/w_PrefrencesWindow.h
|
||||||
src/vinteract.h \
|
|
||||||
src/runguard.h
|
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
src/w_MainWindow.ui \
|
src/w_MainWindow.ui \
|
||||||
|
76
src/HConfigObjects.hpp
Normal file
76
src/HConfigObjects.hpp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#ifndef HCONFIGOBJECTS_HPP
|
||||||
|
#define HCONFIGOBJECTS_HPP
|
||||||
|
#include <QDir>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
#include "V2ConfigObjects.hpp"
|
||||||
|
#include "vinteract.hpp"
|
||||||
|
|
||||||
|
// Macros
|
||||||
|
#define HV2RAY_CONFIG_DIR_NAME "/.hv2ray/"
|
||||||
|
using namespace std;
|
||||||
|
namespace Hv2ray
|
||||||
|
{
|
||||||
|
namespace HConfigModels
|
||||||
|
{
|
||||||
|
struct HInbondSetting {
|
||||||
|
bool enabled;
|
||||||
|
string ip;
|
||||||
|
int port;
|
||||||
|
bool useAuthentication;
|
||||||
|
string authUsername;
|
||||||
|
string authPassword;
|
||||||
|
HInbondSetting(): enabled(), ip(), port(), useAuthentication(), authUsername(), authPassword() {}
|
||||||
|
HInbondSetting(bool _e, string _ip, int _p): HInbondSetting()
|
||||||
|
{
|
||||||
|
enabled = _e;
|
||||||
|
port = _p;
|
||||||
|
ip = _ip;
|
||||||
|
}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(enabled, ip, port, useAuthentication, authUsername, authPassword))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct HvConfigList {
|
||||||
|
string alias;
|
||||||
|
string fileName;
|
||||||
|
int index;
|
||||||
|
HvConfigList(): alias(), fileName(), index() {}
|
||||||
|
XTOSTRUCT(O(alias, fileName, index))
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Hv2Config {
|
||||||
|
string language;
|
||||||
|
bool runAsRoot;
|
||||||
|
string logLevel;
|
||||||
|
//Hv2ray::V2ConfigModels::MuxObject muxSetting;
|
||||||
|
HInbondSetting httpSetting;
|
||||||
|
HInbondSetting socksSetting;
|
||||||
|
list<HvConfigList> configs;
|
||||||
|
Hv2Config(): language(), runAsRoot(), logLevel(), httpSetting(), socksSetting(), configs() { }
|
||||||
|
Hv2Config(string lang, string log, HInbondSetting httpIn, HInbondSetting socksIN): Hv2Config()
|
||||||
|
{
|
||||||
|
language = lang;
|
||||||
|
logLevel = log;
|
||||||
|
httpSetting = httpIn;
|
||||||
|
socksSetting = socksIN;
|
||||||
|
runAsRoot = false;
|
||||||
|
}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(language, runAsRoot, logLevel, httpSetting, socksSetting, configs))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// ConfigGlobalConfig is platform-independent as it's solved to be in the best
|
||||||
|
/// place at first in main.cpp
|
||||||
|
static QDir ConfigDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::HConfigModels::Hv2Config, language, runAsRoot, logLevel, httpSetting, socksSetting)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::HConfigModels::HInbondSetting, enabled, ip, port, useAuthentication, authUsername, authPassword)
|
||||||
|
#endif
|
||||||
|
#endif // HCONFIGOBJECTS_HPP
|
61
src/HUtils.cpp
Normal file
61
src/HUtils.cpp
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#include "HUtils.hpp"
|
||||||
|
#include <QTextStream>
|
||||||
|
|
||||||
|
namespace Hv2ray
|
||||||
|
{
|
||||||
|
namespace Utils
|
||||||
|
{
|
||||||
|
static HConfigModels::Hv2Config GlobalConfig;
|
||||||
|
void SetGlobalConfig(HConfigModels::Hv2Config conf)
|
||||||
|
{
|
||||||
|
GlobalConfig = conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
HConfigModels::Hv2Config GetGlobalConfig()
|
||||||
|
{
|
||||||
|
return GlobalConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveConfig(QFile *configFile)
|
||||||
|
{
|
||||||
|
configFile->open(QFile::WriteOnly);
|
||||||
|
QString jsonConfig = StructToJSON(GetGlobalConfig());
|
||||||
|
QTextStream stream(configFile);
|
||||||
|
stream << jsonConfig << endl;
|
||||||
|
stream.flush();
|
||||||
|
configFile->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LoadConfig(QFile *configFile)
|
||||||
|
{
|
||||||
|
using namespace Hv2ray::HConfigModels;
|
||||||
|
configFile->open(QFile::ReadOnly);
|
||||||
|
QTextStream stream(configFile);
|
||||||
|
auto str = stream.readAll();
|
||||||
|
auto config = StructFromJSON<Hv2Config>(str.toStdString());
|
||||||
|
SetGlobalConfig(config);
|
||||||
|
configFile->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList getAllFilesList(QDir *dir)
|
||||||
|
{
|
||||||
|
return dir->entryList(QStringList() << "*" << "*.*", QDir::Hidden | QDir::Files);
|
||||||
|
}
|
||||||
|
QTranslator *getTranslator(string lang)
|
||||||
|
{
|
||||||
|
QTranslator *translator = new QTranslator();
|
||||||
|
translator->load(QString::fromStdString(lang + ".qm"), ":/translations");
|
||||||
|
return translator;
|
||||||
|
}
|
||||||
|
bool hasFile(QDir *dir, QString fileName)
|
||||||
|
{
|
||||||
|
return getAllFilesList(dir).indexOf(fileName) >= 0;
|
||||||
|
}
|
||||||
|
void showWarnMessageBox(QWidget *parent, QString title, QString text)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(parent, title, text, QMessageBox::Ok | QMessageBox::Default, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,32 +1,30 @@
|
|||||||
|
#ifndef UTILS_H
|
||||||
|
#define UTILS_H
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QJsonArray>
|
|
||||||
#include <QJsonDocument>
|
|
||||||
#include <QJsonObject>
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <QTranslator>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
#include "Hv2ConfigObject.h"
|
#include <iostream>
|
||||||
|
|
||||||
#ifndef UTILS_H
|
#include "HConfigObjects.hpp"
|
||||||
#define UTILS_H
|
|
||||||
|
|
||||||
namespace Hv2ray
|
namespace Hv2ray
|
||||||
{
|
{
|
||||||
namespace Utils
|
namespace Utils
|
||||||
{
|
{
|
||||||
|
|
||||||
QJsonObject switchJsonArrayObject(QJsonObject objest, QString value);
|
|
||||||
QJsonObject findValueFromJsonArray(QJsonArray arr, QString key, QString val);
|
|
||||||
QJsonObject loadRootObjFromConf();
|
|
||||||
QJsonArray getInbounds();
|
|
||||||
void showWarnMessageBox(QWidget *parent, QString title, QString text);
|
void showWarnMessageBox(QWidget *parent, QString title, QString text);
|
||||||
void overrideInbounds(QString path);
|
QTranslator *getTranslator(string lang);
|
||||||
int getIndexByValue(QJsonArray array, QString key, QString val);
|
void SetGlobalConfig(HConfigModels::Hv2Config conf);
|
||||||
|
HConfigModels::Hv2Config GetGlobalConfig();
|
||||||
|
void SaveConfig(QFile *configFile);
|
||||||
|
void LoadConfig(QFile *configFile);
|
||||||
|
/// Get file list in a Dir
|
||||||
QStringList getAllFilesList(QDir *dir);
|
QStringList getAllFilesList(QDir *dir);
|
||||||
bool hasFile(QDir *dir, QString fileName);
|
bool hasFile(QDir *dir, QString fileName);
|
||||||
|
|
||||||
@ -34,14 +32,24 @@ namespace Hv2ray
|
|||||||
QString StructToJSON(const TYPE &t)
|
QString StructToJSON(const TYPE &t)
|
||||||
{
|
{
|
||||||
string s;
|
string s;
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
encode_json<TYPE>(t, s, indenting::indent);
|
encode_json<TYPE>(t, s, indenting::indent);
|
||||||
|
#else
|
||||||
|
s = X::tojson(t, "", 4, ' ');
|
||||||
|
#endif
|
||||||
|
cout << s << endl;
|
||||||
return QString::fromStdString(s);
|
return QString::fromStdString(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TYPE>
|
template <typename TYPE>
|
||||||
TYPE StructFromJSON(const std::string &str)
|
TYPE StructFromJSON(const string &str)
|
||||||
{
|
{
|
||||||
TYPE v = decode_json<TYPE>(str);
|
TYPE v;
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
v = decode_json<TYPE>(str);
|
||||||
|
#else
|
||||||
|
X::loadjson(str, v, false);
|
||||||
|
#endif
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,92 +0,0 @@
|
|||||||
#include "HUtils.h"
|
|
||||||
|
|
||||||
using namespace Hv2ray;
|
|
||||||
|
|
||||||
QJsonObject Utils::switchJsonArrayObject(QJsonObject obj, QString value)
|
|
||||||
{
|
|
||||||
QJsonObject returnObj = obj.value(value).isNull()
|
|
||||||
? obj.value(value).toObject()
|
|
||||||
: obj.value(value).toArray().first().toObject();
|
|
||||||
return returnObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonObject Utils::findValueFromJsonArray(QJsonArray arr, QString key, QString val)
|
|
||||||
{
|
|
||||||
for (const auto obj : arr) {
|
|
||||||
if (obj.toObject().value(key).toString() == val) {
|
|
||||||
return obj.toObject();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return QJsonObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonObject Utils::loadRootObjFromConf()
|
|
||||||
{
|
|
||||||
QFile globalConfigFile("Hv2ray.conf");
|
|
||||||
globalConfigFile.open(QIODevice::ReadOnly);
|
|
||||||
QByteArray conf = globalConfigFile.readAll();
|
|
||||||
globalConfigFile.close();
|
|
||||||
QJsonDocument v2conf(QJsonDocument::fromJson(conf));
|
|
||||||
QJsonObject rootObj = v2conf.object();
|
|
||||||
return rootObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonArray Utils::getInbounds()
|
|
||||||
{
|
|
||||||
QJsonArray inbounds;
|
|
||||||
inbounds = loadRootObjFromConf().value("inbounds").toArray();
|
|
||||||
return inbounds;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Utils::showWarnMessageBox(QWidget *parent, QString title, QString text)
|
|
||||||
{
|
|
||||||
QMessageBox::warning(parent, title, text, QMessageBox::Ok | QMessageBox::Default, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Utils::overrideInbounds(QString path)
|
|
||||||
{
|
|
||||||
QFile confFile(path);
|
|
||||||
confFile.open(QIODevice::ReadOnly);
|
|
||||||
QByteArray conf = confFile.readAll();
|
|
||||||
confFile.close();
|
|
||||||
QJsonDocument v2conf(QJsonDocument::fromJson(conf));
|
|
||||||
QJsonObject rootObj = v2conf.object();
|
|
||||||
QJsonArray modifiedIn = getInbounds();
|
|
||||||
rootObj.remove("inbounds");
|
|
||||||
rootObj.remove("inbound");
|
|
||||||
rootObj.remove("inboundDetour");
|
|
||||||
rootObj.insert("inbounds", QJsonValue(modifiedIn));
|
|
||||||
v2conf.setObject(rootObj);
|
|
||||||
conf = v2conf.toJson(QJsonDocument::Indented);
|
|
||||||
confFile.open(QIODevice::WriteOnly | QIODevice::Truncate);
|
|
||||||
confFile.write(conf);
|
|
||||||
confFile.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
int Utils::getIndexByValue(QJsonArray array, QString key, QString val)
|
|
||||||
{
|
|
||||||
QJsonArray::iterator it;
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
for (it = array.begin(); it != array.end(); it++) {
|
|
||||||
if (it->toObject().value(key) == val) {
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get file list in a Dir
|
|
||||||
QStringList Utils::getAllFilesList(QDir *dir)
|
|
||||||
{
|
|
||||||
return dir->entryList(QStringList() << "*" << "*.*", QDir::Hidden | QDir::Files);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Utils::hasFile(QDir *dir, QString fileName)
|
|
||||||
{
|
|
||||||
return getAllFilesList(dir).indexOf(fileName) >= 0;
|
|
||||||
}
|
|
@ -1,392 +0,0 @@
|
|||||||
#include <QDir>
|
|
||||||
#include <list>
|
|
||||||
#include <string>
|
|
||||||
#include <jsoncons/json.hpp>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#define USE_JSON_CONS
|
|
||||||
#ifdef USE_JSON_CONS
|
|
||||||
#include <jsoncons/json.hpp>
|
|
||||||
#else
|
|
||||||
#include <x2struct/x2struct.hpp>
|
|
||||||
using namespace x2struct;
|
|
||||||
#endif
|
|
||||||
#ifndef V2CONFIG_H
|
|
||||||
#define V2CONFIG_H
|
|
||||||
|
|
||||||
// Macros
|
|
||||||
#define HV2RAY_CONFIG_DIR_NAME "/.hv2ray"
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
using namespace jsoncons; // for convenience
|
|
||||||
/*------------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
namespace Hv2ray
|
|
||||||
{
|
|
||||||
namespace V2ConfigModels
|
|
||||||
{
|
|
||||||
|
|
||||||
struct LogObject {
|
|
||||||
string access;
|
|
||||||
string error;
|
|
||||||
string loglevel;
|
|
||||||
LogObject(): access(), error(), loglevel() {}
|
|
||||||
//XTOSTRUCT(O(access, error, loglevel))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApiObject {
|
|
||||||
string tag;
|
|
||||||
list<string> services;
|
|
||||||
ApiObject() : tag(), services() {}
|
|
||||||
//XTOSTRUCT(O(tag, services))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ServerObject {
|
|
||||||
string address;
|
|
||||||
int port;
|
|
||||||
list<string> domains;
|
|
||||||
ServerObject(): address(), port(), domains() {}
|
|
||||||
//XTOSTRUCT(O(address, port, domains))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DnsObject {
|
|
||||||
map<string, string> hosts;
|
|
||||||
tuple<string, string, list<ServerObject>> servers;
|
|
||||||
DnsObject(): hosts(), servers() {}
|
|
||||||
//XTOSTRUCT(O(hosts, servers))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RuleObject {
|
|
||||||
string type = "field";
|
|
||||||
list<string> domain;
|
|
||||||
list<string> ip;
|
|
||||||
string port;
|
|
||||||
string network;
|
|
||||||
list<string> source;
|
|
||||||
list<string> user;
|
|
||||||
string inboundTag;
|
|
||||||
string protocol;
|
|
||||||
string attrs;
|
|
||||||
RuleObject() : type(), domain(), ip(), port(), network(), source(), user(), inboundTag(), protocol(), attrs() {}
|
|
||||||
//XTOSTRUCT(O(type, domain, ip, port, network, source, user, inboundTag, protocol, attrs))
|
|
||||||
};
|
|
||||||
struct BalancerObject {
|
|
||||||
string tag ;
|
|
||||||
list<string> selector;
|
|
||||||
BalancerObject() : tag(), selector() {}
|
|
||||||
//XTOSTRUCT(O(tag, selector))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RoutingObject {
|
|
||||||
string domainStrategy;
|
|
||||||
list<RuleObject> rules;
|
|
||||||
list<BalancerObject> balancers;
|
|
||||||
RoutingObject() : domainStrategy(), rules(), balancers() {}
|
|
||||||
//XTOSTRUCT(O(domainStrategy, rules, balancers))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SystemPolicyObject {
|
|
||||||
bool statsInboundUplink;
|
|
||||||
bool statsInboundDownlink;
|
|
||||||
SystemPolicyObject() : statsInboundUplink(), statsInboundDownlink() {}
|
|
||||||
//XTOSTRUCT(O(statsInboundUplink, statsInboundDownlink))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LevelPolicyObject {
|
|
||||||
int handshake;
|
|
||||||
int connIdle;
|
|
||||||
int uplinkOnly;
|
|
||||||
int downlinkOnly;
|
|
||||||
bool statsUserUplink;
|
|
||||||
bool statsUserDownlink;
|
|
||||||
int bufferSize;
|
|
||||||
LevelPolicyObject(): handshake(), connIdle(), uplinkOnly(), downlinkOnly(), statsUserUplink(), statsUserDownlink(), bufferSize() {}
|
|
||||||
//XTOSTRUCT(O(handshake, connIdle, uplinkOnly, downlinkOnly, statsUserUplink, statsUserDownlink, bufferSize))
|
|
||||||
};
|
|
||||||
struct PolicyObject {
|
|
||||||
map<int, LevelPolicyObject> level;
|
|
||||||
list<SystemPolicyObject> system;
|
|
||||||
PolicyObject(): level(), system() {}
|
|
||||||
//XTOSTRUCT(O(level, system))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct HTTPRequestObject {
|
|
||||||
string version;
|
|
||||||
string method;
|
|
||||||
list<string> path;
|
|
||||||
map<string, list<string>> headers;
|
|
||||||
HTTPRequestObject(): version(), method(), path(), headers() {}
|
|
||||||
//XTOSTRUCT(O(version, method, path, headers))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct HTTPResponseObject {
|
|
||||||
string version;
|
|
||||||
string status;
|
|
||||||
string reason;
|
|
||||||
map<string, list<string>> headers;
|
|
||||||
HTTPResponseObject(): version(), status(), reason(), headers() {}
|
|
||||||
//XTOSTRUCT(O(version, status, reason, headers))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TCPHeader_M_Object {
|
|
||||||
string type;
|
|
||||||
HTTPRequestObject request;
|
|
||||||
HTTPResponseObject response;
|
|
||||||
TCPHeader_M_Object(): type(), request(), response() {}
|
|
||||||
//XTOSTRUCT(O(type, request, response))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TCPObject {
|
|
||||||
TCPHeader_M_Object header;
|
|
||||||
TCPObject(): header() {}
|
|
||||||
//XTOSTRUCT(O(header))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct HeaderObject {
|
|
||||||
string type;
|
|
||||||
HeaderObject(): type() {}
|
|
||||||
//XTOSTRUCT(O(type))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct KCPObject {
|
|
||||||
int mtu;
|
|
||||||
int tti;
|
|
||||||
int uplinkCapacity;
|
|
||||||
int downlinkCapacity;
|
|
||||||
bool congestion;
|
|
||||||
int readBufferSize;
|
|
||||||
int writeBufferSize;
|
|
||||||
HeaderObject header;
|
|
||||||
KCPObject(): mtu(), tti(), uplinkCapacity(), downlinkCapacity(), congestion(), readBufferSize(), writeBufferSize(), header() {}
|
|
||||||
//XTOSTRUCT(O(mtu, tti, uplinkCapacity, downlinkCapacity, congestion, readBufferSize, writeBufferSize, header))
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct WebSocketObject {
|
|
||||||
string path;
|
|
||||||
map<string, string> headers;
|
|
||||||
WebSocketObject(): path(), headers() {}
|
|
||||||
//XTOSTRUCT(O(path, headers))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct HttpObject {
|
|
||||||
list<string> host;
|
|
||||||
string path;
|
|
||||||
HttpObject() : host(), path() {}
|
|
||||||
//XTOSTRUCT(O(host, path))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DomainSocketObject {
|
|
||||||
string path;
|
|
||||||
DomainSocketObject(): path() {}
|
|
||||||
//XTOSTRUCT(O(path))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct QuicObject {
|
|
||||||
string security;
|
|
||||||
string key;
|
|
||||||
HeaderObject header;
|
|
||||||
QuicObject(): security(), key(), header() {}
|
|
||||||
//XTOSTRUCT(O(security, key, header))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TransportObject {
|
|
||||||
TCPObject tcpSettings;
|
|
||||||
KCPObject kcpSettings;
|
|
||||||
WebSocketObject wsSettings;
|
|
||||||
HttpObject httpSettings;
|
|
||||||
DomainSocketObject dsSettings;
|
|
||||||
QuicObject quicSettings;
|
|
||||||
TransportObject(): tcpSettings(), kcpSettings(), wsSettings(), httpSettings(), dsSettings(), quicSettings() {}
|
|
||||||
//XTOSTRUCT(O(tcpSettings, kcpSettings, wsSettings, httpSettings, dsSettings, quicSettings))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SniffingObject {
|
|
||||||
bool enabled;
|
|
||||||
string destOverride;
|
|
||||||
SniffingObject(): enabled(), destOverride() {}
|
|
||||||
//XTOSTRUCT(O(enabled, destOverride))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AllocateObject {
|
|
||||||
string strategy;
|
|
||||||
int refresh;
|
|
||||||
int concurrency;
|
|
||||||
AllocateObject(): strategy(), refresh(), concurrency() {}
|
|
||||||
//XTOSTRUCT(O(strategy, refresh, concurrency))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct InboundObject {
|
|
||||||
int port;
|
|
||||||
string listen;
|
|
||||||
string protocol;
|
|
||||||
string settings;
|
|
||||||
TransportObject streamSettings;
|
|
||||||
string tag;
|
|
||||||
SniffingObject sniffing;
|
|
||||||
AllocateObject allocate;
|
|
||||||
InboundObject(): port(), listen(), protocol(), settings(), streamSettings(), tag(), sniffing(), allocate() {}
|
|
||||||
//XTOSTRUCT(O(port, listen, protocol, settings, streamSettings, tag, sniffing, allocate))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ProxySettingsObject {
|
|
||||||
string tag;
|
|
||||||
ProxySettingsObject(): tag() {}
|
|
||||||
//XTOSTRUCT(O(tag))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MuxObject {
|
|
||||||
bool enabled;
|
|
||||||
int concurrency;
|
|
||||||
MuxObject(): enabled(), concurrency() {}
|
|
||||||
//XTOSTRUCT(O(enabled, concurrency))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct OutboundObject {
|
|
||||||
string sendThrough;
|
|
||||||
string protocol;
|
|
||||||
string settings;
|
|
||||||
string tag;
|
|
||||||
TransportObject streamSettings;
|
|
||||||
ProxySettingsObject proxySettings;
|
|
||||||
MuxObject mux;
|
|
||||||
OutboundObject(): sendThrough(), protocol(), settings(), tag(), streamSettings(), proxySettings(), mux() {}
|
|
||||||
//XTOSTRUCT(O(sendThrough, protocol, settings, tag, streamSettings, proxySettings, mux))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct StatsObject {
|
|
||||||
bool _; // Placeholder...
|
|
||||||
StatsObject(): _() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BridgeObject {
|
|
||||||
string tag;
|
|
||||||
string domain;
|
|
||||||
BridgeObject() : tag(), domain() {}
|
|
||||||
//XTOSTRUCT(O(tag, domain))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PortalObject {
|
|
||||||
string tag;
|
|
||||||
string domain;
|
|
||||||
PortalObject() : tag(), domain() {}
|
|
||||||
//XTOSTRUCT(O(tag, domain))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ReverseObject {
|
|
||||||
list<BridgeObject> bridges;
|
|
||||||
list<PortalObject> portals;
|
|
||||||
ReverseObject() : bridges(), portals() {}
|
|
||||||
//XTOSTRUCT(O(bridges, portals))
|
|
||||||
};
|
|
||||||
struct RootObject {
|
|
||||||
LogObject log;
|
|
||||||
ApiObject api;
|
|
||||||
DnsObject dns;
|
|
||||||
RoutingObject routing;
|
|
||||||
list<InboundObject> inbounds;
|
|
||||||
list<OutboundObject> outbounds;
|
|
||||||
TransportObject transport;
|
|
||||||
StatsObject stats;
|
|
||||||
ReverseObject reverse;
|
|
||||||
RootObject(): log(), api(), dns(), routing(), inbounds(), outbounds(), transport(), stats(), reverse() {}
|
|
||||||
//XTOSTRUCT(O(log, api, dns, routing, inbounds, outbounds, transport, stats, reverse))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::LogObject, access, error, loglevel)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::ApiObject, tag, services)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::ServerObject, address, port, domains)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::DnsObject, hosts, servers)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::RuleObject, type, domain, ip, port, network, source, user, inboundTag, protocol, attrs)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::BalancerObject, tag, selector)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::RoutingObject, domainStrategy, rules, balancers)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::SystemPolicyObject, statsInboundUplink, statsInboundDownlink)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::LevelPolicyObject, handshake, connIdle, uplinkOnly, downlinkOnly, statsUserUplink, statsUserDownlink, bufferSize)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::PolicyObject, level, system)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::HTTPRequestObject, version, method, path, headers)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::HTTPResponseObject, version, status, reason, headers)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::TCPHeader_M_Object, type, request, response)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::TCPObject, header)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::HeaderObject, type)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::KCPObject, mtu, tti, uplinkCapacity, downlinkCapacity, congestion, readBufferSize, writeBufferSize, header)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::WebSocketObject, path, headers)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::HttpObject, host, path)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::DomainSocketObject, path)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::QuicObject, security, key, header)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::TransportObject, tcpSettings, kcpSettings, wsSettings, httpSettings, dsSettings, quicSettings)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::SniffingObject, enabled, destOverride)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::AllocateObject, strategy, refresh, concurrency)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::InboundObject, port, listen, protocol, settings, streamSettings, tag, sniffing, allocate)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::ProxySettingsObject, tag)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::MuxObject, enabled, concurrency)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::OutboundObject, sendThrough, protocol, settings, tag, streamSettings, proxySettings, mux)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::StatsObject, _)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::BridgeObject, tag, domain)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::PortalObject, tag, domain)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::ReverseObject, bridges, portals)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::V2ConfigModels::RootObject, log, api, dns, routing, inbounds, outbounds, transport, stats, reverse)
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hv2ray
|
|
||||||
{
|
|
||||||
namespace HConfigModels
|
|
||||||
{
|
|
||||||
struct HInbondSetting {
|
|
||||||
bool enabled;
|
|
||||||
string ip;
|
|
||||||
int port;
|
|
||||||
bool useAuthentication;
|
|
||||||
string authUsername;
|
|
||||||
string authPassword;
|
|
||||||
HInbondSetting() {}
|
|
||||||
HInbondSetting(bool _enabled, string _ip, int _port)
|
|
||||||
: ip(_ip), authUsername(""), authPassword("")
|
|
||||||
{
|
|
||||||
enabled = _enabled;
|
|
||||||
port = _port;
|
|
||||||
useAuthentication = false;
|
|
||||||
}
|
|
||||||
HInbondSetting(bool _enabled, string _ip, int _port, string _username, string _password)
|
|
||||||
: ip(_ip), authUsername(_username), authPassword(_password)
|
|
||||||
{
|
|
||||||
enabled = _enabled;
|
|
||||||
port = _port;
|
|
||||||
useAuthentication = true;
|
|
||||||
}
|
|
||||||
//XTOSTRUCT(O(enabled, ip, port, useAuthentication, authUsername, authPassword))
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Hv2Config {
|
|
||||||
string language;
|
|
||||||
bool runAsRoot;
|
|
||||||
string logLevel;
|
|
||||||
//Hv2ray::V2ConfigModels::MuxObject muxSetting;
|
|
||||||
HInbondSetting httpSetting;
|
|
||||||
HInbondSetting socksSetting;
|
|
||||||
Hv2Config() {}
|
|
||||||
Hv2Config(string lang, const bool _runAsRoot, const string _loglevel, HInbondSetting _http, HInbondSetting _socks)
|
|
||||||
: httpSetting(_http),
|
|
||||||
socksSetting(_socks)
|
|
||||||
|
|
||||||
{
|
|
||||||
language = lang;
|
|
||||||
runAsRoot = _runAsRoot;
|
|
||||||
logLevel = _loglevel;
|
|
||||||
}
|
|
||||||
//XTOSTRUCT(O(language, runAsRoot, logLevel, httpSetting, socksSetting))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::HConfigModels::Hv2Config, language, runAsRoot, logLevel, httpSetting, socksSetting)
|
|
||||||
JSONCONS_MEMBER_TRAITS_DECL(Hv2ray::HConfigModels::HInbondSetting, enabled, ip, port, useAuthentication, authUsername, authPassword)
|
|
||||||
|
|
||||||
namespace Hv2ray
|
|
||||||
{
|
|
||||||
/// ConfigGlobalConfigthis is platform-independent as it's solved to be in the best
|
|
||||||
/// place at first in main.cpp
|
|
||||||
static QDir ConfigDir;
|
|
||||||
static HConfigModels::Hv2Config GlobalConfig;
|
|
||||||
}
|
|
||||||
#endif // V2CONFIG_H
|
|
||||||
|
|
638
src/V2ConfigObjects.hpp
Normal file
638
src/V2ConfigObjects.hpp
Normal file
@ -0,0 +1,638 @@
|
|||||||
|
#include <list>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
// TODO Features
|
||||||
|
#define USE_TODO_FEATURES false
|
||||||
|
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
#include <jsoncons/json.hpp>
|
||||||
|
using namespace jsoncons;
|
||||||
|
#else
|
||||||
|
#include <x2struct/x2struct.hpp>
|
||||||
|
using namespace x2struct;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef V2CONFIG_H
|
||||||
|
#define V2CONFIG_H
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
/*------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
namespace Hv2ray
|
||||||
|
{
|
||||||
|
namespace V2ConfigModels
|
||||||
|
{
|
||||||
|
// Two struct defining TYPE parameter to be passed into inbound configs and outbound configs.
|
||||||
|
struct XOutBoundsType {
|
||||||
|
};
|
||||||
|
struct XInBoundsType {
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LogObject {
|
||||||
|
string access;
|
||||||
|
string error;
|
||||||
|
string loglevel;
|
||||||
|
LogObject(): access(), error(), loglevel() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(access, error, loglevel))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ApiObject {
|
||||||
|
string tag;
|
||||||
|
list<string> services;
|
||||||
|
ApiObject() : tag(), services() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(tag, services))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace DNSObjects
|
||||||
|
{
|
||||||
|
struct ServerObject {
|
||||||
|
string address;
|
||||||
|
int port;
|
||||||
|
list<string> domains;
|
||||||
|
ServerObject(): address(), port(), domains() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(address, port, domains))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
struct DnsObject {
|
||||||
|
map<string, string> hosts;
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
tuple<string, string, list<DNSObjects::ServerObject>> servers;
|
||||||
|
#else
|
||||||
|
// Currently does not support ServerObject as tuple is.... quite complicated...
|
||||||
|
list<string> servers;
|
||||||
|
#endif
|
||||||
|
DnsObject(): hosts(), servers() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(hosts, servers))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace ROUTINGObjects
|
||||||
|
{
|
||||||
|
struct RuleObject {
|
||||||
|
string type = "field";
|
||||||
|
list<string> domain;
|
||||||
|
list<string> ip;
|
||||||
|
string port;
|
||||||
|
string network;
|
||||||
|
list<string> source;
|
||||||
|
list<string> user;
|
||||||
|
string inboundTag;
|
||||||
|
string protocol;
|
||||||
|
string attrs;
|
||||||
|
RuleObject() : type(), domain(), ip(), port(), network(), source(), user(), inboundTag(), protocol(), attrs() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(type, domain, ip, port, network, source, user, inboundTag, protocol, attrs))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
struct BalancerObject {
|
||||||
|
string tag ;
|
||||||
|
list<string> selector;
|
||||||
|
BalancerObject() : tag(), selector() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(tag, selector))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
struct RoutingObject {
|
||||||
|
string domainStrategy;
|
||||||
|
list<ROUTINGObjects::RuleObject> rules;
|
||||||
|
list<ROUTINGObjects::BalancerObject> balancers;
|
||||||
|
RoutingObject() : domainStrategy(), rules(), balancers() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(domainStrategy, rules, balancers))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace POLICYObjects
|
||||||
|
{
|
||||||
|
struct SystemPolicyObject {
|
||||||
|
bool statsInboundUplink;
|
||||||
|
bool statsInboundDownlink;
|
||||||
|
SystemPolicyObject() : statsInboundUplink(), statsInboundDownlink() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(statsInboundUplink, statsInboundDownlink))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LevelPolicyObject {
|
||||||
|
int handshake;
|
||||||
|
int connIdle;
|
||||||
|
int uplinkOnly;
|
||||||
|
int downlinkOnly;
|
||||||
|
bool statsUserUplink;
|
||||||
|
bool statsUserDownlink;
|
||||||
|
int bufferSize;
|
||||||
|
LevelPolicyObject(): handshake(), connIdle(), uplinkOnly(), downlinkOnly(), statsUserUplink(), statsUserDownlink(), bufferSize() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(handshake, connIdle, uplinkOnly, downlinkOnly, statsUserUplink, statsUserDownlink, bufferSize))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
struct PolicyObject {
|
||||||
|
map<int, POLICYObjects::LevelPolicyObject> level;
|
||||||
|
list<POLICYObjects::SystemPolicyObject> system;
|
||||||
|
PolicyObject(): level(), system() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(level, system))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace TRANSFERObjects
|
||||||
|
{
|
||||||
|
namespace TRANSFERObjectsInternal
|
||||||
|
{
|
||||||
|
|
||||||
|
struct HTTPRequestObject {
|
||||||
|
string version;
|
||||||
|
string method;
|
||||||
|
list<string> path;
|
||||||
|
map<string, list<string>> headers;
|
||||||
|
HTTPRequestObject(): version(), method(), path(), headers() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(version, method, path, headers))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct HTTPResponseObject {
|
||||||
|
string version;
|
||||||
|
string status;
|
||||||
|
string reason;
|
||||||
|
map<string, list<string>> headers;
|
||||||
|
HTTPResponseObject(): version(), status(), reason(), headers() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(version, status, reason, headers))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
struct TCPHeader_M_Object {
|
||||||
|
string type;
|
||||||
|
HTTPRequestObject request;
|
||||||
|
HTTPResponseObject response;
|
||||||
|
TCPHeader_M_Object(): type(), request(), response() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(type, request, response))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
struct HeaderObject {
|
||||||
|
string type;
|
||||||
|
HeaderObject(): type() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(type))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct TCPObject {
|
||||||
|
TRANSFERObjectsInternal:: TCPHeader_M_Object header;
|
||||||
|
TCPObject(): header() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(header))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct KCPObject {
|
||||||
|
int mtu;
|
||||||
|
int tti;
|
||||||
|
int uplinkCapacity;
|
||||||
|
int downlinkCapacity;
|
||||||
|
bool congestion;
|
||||||
|
int readBufferSize;
|
||||||
|
int writeBufferSize;
|
||||||
|
TRANSFERObjectsInternal:: HeaderObject header;
|
||||||
|
KCPObject(): mtu(), tti(), uplinkCapacity(), downlinkCapacity(), congestion(), readBufferSize(), writeBufferSize(), header() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(mtu, tti, uplinkCapacity, downlinkCapacity, congestion, readBufferSize, writeBufferSize, header))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct WebSocketObject {
|
||||||
|
string path;
|
||||||
|
map<string, string> headers;
|
||||||
|
WebSocketObject(): path(), headers() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(path, headers))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct HttpObject {
|
||||||
|
list<string> host;
|
||||||
|
string path;
|
||||||
|
HttpObject() : host(), path() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(host, path))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DomainSocketObject {
|
||||||
|
string path;
|
||||||
|
DomainSocketObject(): path() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(path))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct QuicObject {
|
||||||
|
string security;
|
||||||
|
string key;
|
||||||
|
TRANSFERObjectsInternal::HeaderObject header;
|
||||||
|
QuicObject(): security(), key(), header() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(security, key, header))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
struct TransportObject {
|
||||||
|
TRANSFERObjects::TCPObject tcpSettings;
|
||||||
|
TRANSFERObjects::KCPObject kcpSettings;
|
||||||
|
TRANSFERObjects::WebSocketObject wsSettings;
|
||||||
|
TRANSFERObjects::HttpObject httpSettings;
|
||||||
|
TRANSFERObjects::DomainSocketObject dsSettings;
|
||||||
|
TRANSFERObjects::QuicObject quicSettings;
|
||||||
|
TransportObject(): tcpSettings(), kcpSettings(), wsSettings(), httpSettings(), dsSettings(), quicSettings() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(tcpSettings, kcpSettings, wsSettings, httpSettings, dsSettings, quicSettings))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace INBOUNDObjects
|
||||||
|
{
|
||||||
|
|
||||||
|
struct SniffingObject {
|
||||||
|
bool enabled;
|
||||||
|
string destOverride;
|
||||||
|
SniffingObject(): enabled(), destOverride() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(enabled, destOverride))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct AllocateObject {
|
||||||
|
string strategy;
|
||||||
|
int refresh;
|
||||||
|
int concurrency;
|
||||||
|
AllocateObject(): strategy(), refresh(), concurrency() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(strategy, refresh, concurrency))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace STREAMSETTINGSObjects
|
||||||
|
{
|
||||||
|
struct SockoptObject {
|
||||||
|
int mark;
|
||||||
|
bool tcpFastOpen;
|
||||||
|
string tproxy;
|
||||||
|
SockoptObject(): mark(), tcpFastOpen(), tproxy() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(mark, tcpFastOpen, tproxy))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CertificateObject {
|
||||||
|
string usage;
|
||||||
|
string certificateFile;
|
||||||
|
string keyFile;
|
||||||
|
list<string> certificate;
|
||||||
|
list<string> key;
|
||||||
|
CertificateObject(): usage(), certificateFile(), keyFile(), certificate(), key() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(usage, certificateFile, keyFile, certificate, key))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TLSObject {
|
||||||
|
string serverName;
|
||||||
|
bool allowInsecure;
|
||||||
|
list<string> alpn;
|
||||||
|
list<CertificateObject> certificates;
|
||||||
|
bool disableSystemRoot;
|
||||||
|
TLSObject(): serverName(), allowInsecure(), certificates(), disableSystemRoot() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(serverName, allowInsecure, alpn, certificates, disableSystemRoot))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
struct StreamSettingsObject {
|
||||||
|
string network;
|
||||||
|
string security;
|
||||||
|
STREAMSETTINGSObjects::SockoptObject sockopt;
|
||||||
|
STREAMSETTINGSObjects::TLSObject tlsSettings;
|
||||||
|
TRANSFERObjects::TCPObject tcpSettings;
|
||||||
|
TRANSFERObjects::KCPObject kcpSettings;
|
||||||
|
TRANSFERObjects::WebSocketObject wsSettings;
|
||||||
|
TRANSFERObjects::HttpObject httpSettings;
|
||||||
|
TRANSFERObjects::DomainSocketObject dsSettings;
|
||||||
|
TRANSFERObjects::QuicObject quicSettings;
|
||||||
|
StreamSettingsObject(): network(), security(), sockopt(), tlsSettings(), tcpSettings(), kcpSettings(), wsSettings(), httpSettings(), dsSettings(), quicSettings() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(network, security, sockopt, tcpSettings, tlsSettings, kcpSettings, wsSettings, httpSettings, dsSettings, quicSettings))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename XINBOUNDSETTINGOBJECT>
|
||||||
|
struct InboundObject {
|
||||||
|
static_assert(std::is_base_of<XInBoundsType, XINBOUNDSETTINGOBJECT>::value, "XINBOUNDSETTINGOBJECT must extend XInBoundsType");
|
||||||
|
int port;
|
||||||
|
string listen;
|
||||||
|
string protocol;
|
||||||
|
XINBOUNDSETTINGOBJECT settings;
|
||||||
|
StreamSettingsObject streamSettings;
|
||||||
|
string tag;
|
||||||
|
INBOUNDObjects::SniffingObject sniffing;
|
||||||
|
INBOUNDObjects::AllocateObject allocate;
|
||||||
|
InboundObject(): port(), listen(), protocol(), settings(), streamSettings(), tag(), sniffing(), allocate() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(port, listen, protocol, settings, streamSettings, tag, sniffing, allocate))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace OUTBOUNDObjects
|
||||||
|
{
|
||||||
|
|
||||||
|
struct ProxySettingsObject {
|
||||||
|
string tag;
|
||||||
|
ProxySettingsObject(): tag() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(tag))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MuxObject {
|
||||||
|
bool enabled;
|
||||||
|
int concurrency;
|
||||||
|
MuxObject(): enabled(), concurrency() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(enabled, concurrency))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
template <typename XOUTBOUNDSETTINGOBJECT>
|
||||||
|
struct OutboundObject {
|
||||||
|
static_assert(std::is_base_of<XOutBoundsType, XOUTBOUNDSETTINGOBJECT>::value, "XOUTBOUNDSETTINGOBJECT must extend XOutBoundsType");
|
||||||
|
string sendThrough;
|
||||||
|
string protocol;
|
||||||
|
XOUTBOUNDSETTINGOBJECT settings;
|
||||||
|
string tag;
|
||||||
|
StreamSettingsObject streamSettings;
|
||||||
|
OUTBOUNDObjects::ProxySettingsObject proxySettings;
|
||||||
|
OUTBOUNDObjects::MuxObject mux;
|
||||||
|
OutboundObject(): sendThrough(), protocol(), settings(), tag(), streamSettings(), proxySettings(), mux() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(sendThrough, protocol, settings, tag, streamSettings, proxySettings, mux))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct StatsObject {
|
||||||
|
bool _; // Placeholder...
|
||||||
|
StatsObject(): _() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(_))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
namespace REVERSEObjects
|
||||||
|
{
|
||||||
|
|
||||||
|
struct BridgeObject {
|
||||||
|
string tag;
|
||||||
|
string domain;
|
||||||
|
BridgeObject() : tag(), domain() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(tag, domain))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PortalObject {
|
||||||
|
string tag;
|
||||||
|
string domain;
|
||||||
|
PortalObject() : tag(), domain() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(tag, domain))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
struct ReverseObject {
|
||||||
|
list<REVERSEObjects::BridgeObject> bridges;
|
||||||
|
list<REVERSEObjects::PortalObject> portals;
|
||||||
|
ReverseObject() : bridges(), portals() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(bridges, portals))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
template<typename XIN1, typename XIN2, typename XIN3, typename XIN4, typename XIN5, typename XOUT1, typename XOUT2, typename XOUT3, typename XOUT4, typename XOUT5>
|
||||||
|
#else
|
||||||
|
template <typename XInBound_T, typename XOutBound_T>
|
||||||
|
#endif
|
||||||
|
struct RootObject {
|
||||||
|
LogObject log;
|
||||||
|
ApiObject api;
|
||||||
|
DnsObject dns;
|
||||||
|
RoutingObject routing;
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
// Default support 5 inBounds and 5 outBounds
|
||||||
|
tuple<InboundObject<XIN1>, InboundObject<XIN2>, InboundObject<XIN3>, InboundObject<XIN4>, InboundObject<XIN5>> inbounds;
|
||||||
|
tuple<OutboundObject<XIN1>, OutboundObject<XIN2>, OutboundObject<XIN3>, OutboundObject<XIN4>, OutboundObject<XIN5>> outbounds;
|
||||||
|
#else
|
||||||
|
list<InboundObject<XInBound_T>> inbounds;
|
||||||
|
list<OutboundObject<XOutBound_T>> outbounds;
|
||||||
|
#endif
|
||||||
|
TransportObject transport;
|
||||||
|
StatsObject stats;
|
||||||
|
ReverseObject reverse;
|
||||||
|
PolicyObject policy;
|
||||||
|
RootObject(): log(), api(), dns(), routing(), inbounds(), outbounds(), transport(), stats(), reverse(), policy() {}
|
||||||
|
#if USE_TODO_FEATURES == false
|
||||||
|
XTOSTRUCT(O(log, api, dns, routing, inbounds, outbounds, transport, stats, reverse, policy))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Hv2ray
|
||||||
|
{
|
||||||
|
namespace V2ConfigModels
|
||||||
|
{
|
||||||
|
/// Some protocols from: https://v2ray.com/chapter_02/02_protocols.html
|
||||||
|
namespace Protocols
|
||||||
|
{
|
||||||
|
/// BlackHole Protocol, OutBound
|
||||||
|
struct BlackHole : XOutBoundsType {
|
||||||
|
struct ResponseObject {
|
||||||
|
string type;
|
||||||
|
};
|
||||||
|
ResponseObject response;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// DNS, OutBound
|
||||||
|
struct DNS: XOutBoundsType {
|
||||||
|
string network;
|
||||||
|
string address;
|
||||||
|
int port;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Dokodemo-door, InBound
|
||||||
|
struct Dokodemo_door : XInBoundsType {
|
||||||
|
string address;
|
||||||
|
int port;
|
||||||
|
string network;
|
||||||
|
int timeout;
|
||||||
|
bool followRedirect;
|
||||||
|
int userLevel;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Freedom, OutBound
|
||||||
|
struct Freedom: XOutBoundsType {
|
||||||
|
string domainStrategy;
|
||||||
|
string redirect;
|
||||||
|
int userLevel;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct AccountObject {
|
||||||
|
string user;
|
||||||
|
string pass;
|
||||||
|
XTOSTRUCT(O(user, pass))
|
||||||
|
};
|
||||||
|
|
||||||
|
/// HTTP, InBound
|
||||||
|
struct HTTP: XInBoundsType {
|
||||||
|
int timeout;
|
||||||
|
list<AccountObject> accounts;
|
||||||
|
bool allowTransparent;
|
||||||
|
int userLevel;
|
||||||
|
XTOSTRUCT(O(timeout, accounts, allowTransparent, userLevel))
|
||||||
|
};
|
||||||
|
|
||||||
|
/// MTProto, InBound || OutBound
|
||||||
|
struct MTProto: XInBoundsType, XOutBoundsType {
|
||||||
|
struct UserObject {
|
||||||
|
string email;
|
||||||
|
int level;
|
||||||
|
string secret;
|
||||||
|
};
|
||||||
|
list<UserObject> users;
|
||||||
|
};
|
||||||
|
|
||||||
|
// We don't add shadowsocks, (As it's quite complex and I'm quite lazy...)
|
||||||
|
|
||||||
|
/// Socks, InBound, OutBound
|
||||||
|
struct Socks: XInBoundsType, XOutBoundsType {
|
||||||
|
struct UserObject {
|
||||||
|
};
|
||||||
|
struct ServerObject {
|
||||||
|
string address;
|
||||||
|
int port;
|
||||||
|
list<UserObject> users;
|
||||||
|
};
|
||||||
|
list<ServerObject> servers;
|
||||||
|
string auth;
|
||||||
|
list<AccountObject> accounts;
|
||||||
|
bool udp;
|
||||||
|
string ip;
|
||||||
|
int userLevel;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct VMess: XInBoundsType, XOutBoundsType {
|
||||||
|
struct ServerObject {
|
||||||
|
struct UserObject {
|
||||||
|
string id;
|
||||||
|
int alterId;
|
||||||
|
string security;
|
||||||
|
int level;
|
||||||
|
XTOSTRUCT(O(id, alterId, security, level))
|
||||||
|
};
|
||||||
|
// OUTBound;
|
||||||
|
string address;
|
||||||
|
int port;
|
||||||
|
list<UserObject> users;
|
||||||
|
XTOSTRUCT(O(address, port, users))
|
||||||
|
};
|
||||||
|
list<ServerObject> vnext;
|
||||||
|
// INBound;
|
||||||
|
struct ClientObject {
|
||||||
|
string id;
|
||||||
|
int level;
|
||||||
|
int alterId;
|
||||||
|
string email;
|
||||||
|
XTOSTRUCT(O(id, level, alterId, email))
|
||||||
|
};
|
||||||
|
list<ClientObject> clients;
|
||||||
|
// detour and default will not be implemented as it's complicated...
|
||||||
|
bool disableInsecureEncryption;
|
||||||
|
XTOSTRUCT(O(vnext, clients, disableInsecureEncryption))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if USE_TODO_FEATURES
|
||||||
|
using namespace Hv2ray;
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::LogObject, access, error, loglevel)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::ApiObject, tag, services)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::DNSObjects::ServerObject, address, port, domains)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::DnsObject, hosts, servers)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::ROUTINGObjects::RuleObject, type, domain, ip, port, network, source, user, inboundTag, protocol, attrs)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::ROUTINGObjects::BalancerObject, tag, selector)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::RoutingObject, domainStrategy, rules, balancers)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::POLICYObjects::SystemPolicyObject, statsInboundUplink, statsInboundDownlink)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::POLICYObjects::LevelPolicyObject, handshake, connIdle, uplinkOnly, downlinkOnly, statsUserUplink, statsUserDownlink, bufferSize)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::PolicyObject, level, system)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::TRANSFERObjectsInternal::HTTPRequestObject, version, method, path, headers)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::TRANSFERObjectsInternal::HTTPResponseObject, version, status, reason, headers)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::TRANSFERObjectsInternal::TCPHeader_M_Object, type, request, response)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::TRANSFERObjectsInternal::HeaderObject, type)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::TCPObject, header)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::KCPObject, mtu, tti, uplinkCapacity, downlinkCapacity, congestion, readBufferSize, writeBufferSize, header)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::WebSocketObject, path, headers)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::HttpObject, host, path)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::DomainSocketObject, path)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TRANSFERObjects::QuicObject, security, key, header)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::TransportObject, tcpSettings, kcpSettings, wsSettings, httpSettings, dsSettings, quicSettings)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::INBOUNDObjects::SniffingObject, enabled, destOverride)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::INBOUNDObjects::AllocateObject, strategy, refresh, concurrency)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::OUTBOUNDObjects::ProxySettingsObject, tag)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::OUTBOUNDObjects::MuxObject, enabled, concurrency)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::REVERSEObjects::BridgeObject, tag, domain)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::REVERSEObjects::PortalObject, tag, domain)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::ReverseObject, bridges, portals)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::StatsObject, _)
|
||||||
|
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::StreamSettingsObject, tcpSettings, kcpSettings, wsSettings, httpSettings, dsSettings, quicSettings, tlsSettings, sockopt, network, security)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::STREAMSETTINGSObjects::TLSObject, serverName, allowInsecure, alpn, certificates, disableSystemRoot)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::STREAMSETTINGSObjects::CertificateObject, usage, certificateFile, keyFile, certificate, key)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::STREAMSETTINGSObjects::SockoptObject, mark, tcpFastOpen, tproxy)
|
||||||
|
|
||||||
|
// These 3 are used as templates.
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::RootObject, log, api, dns, routing, inbounds, outbounds, transport, stats, reverse, policy)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::InboundObject, port, listen, protocol, settings, streamSettings, tag, sniffing, allocate)
|
||||||
|
JSONCONS_MEMBER_TRAITS_DECL(V2ConfigModels::OutboundObject, sendThrough, protocol, settings, tag, streamSettings, proxySettings, mux)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/// Code above has passed these tests.
|
||||||
|
//using namespace Hv2ray::V2ConfigModels;
|
||||||
|
//RootObject<Protocols::HTTP, Protocols::VMess> x;
|
||||||
|
//InboundObject<Protocols::HTTP> inH;
|
||||||
|
//x.inbounds.insert(x.inbounds.end(), inH);
|
||||||
|
//OutboundObject<Protocols::VMess> inV;
|
||||||
|
//x.outbounds.insert(x.outbounds.end(), inV);
|
||||||
|
//QString jsonConfig = Utils::StructToJSON(x);
|
||||||
|
//cout << jsonConfig.toStdString() << endl;
|
||||||
|
///
|
||||||
|
#endif
|
70
src/main.cpp
70
src/main.cpp
@ -1,27 +1,22 @@
|
|||||||
#include <QApplication>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QJsonArray>
|
|
||||||
#include <QJsonDocument>
|
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <jsoncons/json.hpp>
|
|
||||||
|
|
||||||
#include "runguard.h"
|
#include "HUtils.hpp"
|
||||||
#include "HUtils.h"
|
#include "HConfigObjects.hpp"
|
||||||
#include "Hv2ConfigObject.h"
|
#include "runguard.hpp"
|
||||||
#include "w_ConnectionEditWindow.h"
|
|
||||||
#include "w_MainWindow.h"
|
#include "w_MainWindow.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace Hv2ray;
|
using namespace Hv2ray;
|
||||||
|
using namespace Hv2ray::Utils;
|
||||||
using namespace Hv2ray::HConfigModels;
|
using namespace Hv2ray::HConfigModels;
|
||||||
|
|
||||||
bool firstRunCheck()
|
bool initializeHv()
|
||||||
{
|
{
|
||||||
/// Hv2ray Config Path.
|
/// Hv2ray Config Path and ends with "/"
|
||||||
QString configPath = "";
|
QString configPath = "";
|
||||||
#if defined(__WIN32) || defined(__APPLE__)
|
#if defined(__WIN32) || defined(__APPLE__)
|
||||||
// For Windows and MacOS, there's no such 'installation' of a software
|
// For Windows and MacOS, there's no such 'installation' of a software
|
||||||
@ -48,28 +43,22 @@ bool firstRunCheck()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QFile configFile(configPath + "hv2ray.conf");
|
||||||
|
|
||||||
if (!Utils::hasFile(&ConfigDir, ".initialised")) {
|
if (!Utils::hasFile(&ConfigDir, ".initialised")) {
|
||||||
// This is first run!
|
// This is first run!
|
||||||
// These below genenrated very basic global config.
|
// These below genenrated very basic global config.
|
||||||
HInbondSetting inHttp = HInbondSetting(true, "127.0.0.1", 8080);
|
HInbondSetting inHttp = HInbondSetting(true, "127.0.0.1", 8080);
|
||||||
HInbondSetting inSocks = HInbondSetting(true, "127.0.0.1", 1080);
|
HInbondSetting inSocks = HInbondSetting(true, "127.0.0.1", 1080);
|
||||||
GlobalConfig = Hv2Config("zh-CN", false, "info", inHttp, inSocks);
|
Hv2Config conf = Hv2Config("zh-CN", "info", inHttp, inSocks);
|
||||||
QString jsonConfig = Utils::StructToJSON(GlobalConfig);
|
SetGlobalConfig(conf);
|
||||||
QFile configFile(configPath + "/hv2ray.conf");
|
SaveConfig(&configFile);
|
||||||
|
|
||||||
if (!configFile.open(QIODevice::WriteOnly)) {
|
|
||||||
qDebug() << "Failed to create main config file.";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTextStream stream(&configFile);
|
|
||||||
stream << jsonConfig;
|
|
||||||
stream.flush();
|
|
||||||
configFile.close();
|
|
||||||
// Create Placeholder for initialise indicator.
|
// Create Placeholder for initialise indicator.
|
||||||
QFile initPlaceHolder(configPath + "/.initialised");
|
QFile initPlaceHolder(configPath + ".initialised");
|
||||||
initPlaceHolder.open(QFile::WriteOnly);
|
initPlaceHolder.open(QFile::WriteOnly);
|
||||||
initPlaceHolder.close();
|
initPlaceHolder.close();
|
||||||
|
} else {
|
||||||
|
LoadConfig(&configFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -78,21 +67,6 @@ bool firstRunCheck()
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication _qApp(argc, argv);
|
QApplication _qApp(argc, argv);
|
||||||
QTranslator translator;
|
|
||||||
|
|
||||||
//
|
|
||||||
if (translator.load(":/translations/zh-CN.qm", "translations")) {
|
|
||||||
cout << "Loaded zh-CN translations" << endl;
|
|
||||||
} else if (translator.load(":/translations/en-US.qm", "translations")) {
|
|
||||||
cout << "Loaded en-US translations" << endl;
|
|
||||||
} else {
|
|
||||||
Utils::showWarnMessageBox(
|
|
||||||
nullptr, "Failed to load translations 无法加载语言文件",
|
|
||||||
"Failed to load translations, user experience may be downgraded. \r\n"
|
|
||||||
"无法加载语言文件,用户体验可能会降级.");
|
|
||||||
}
|
|
||||||
|
|
||||||
_qApp.installTranslator(&translator);
|
|
||||||
RunGuard guard("Hv2ray-Instance-Identifier");
|
RunGuard guard("Hv2ray-Instance-Identifier");
|
||||||
|
|
||||||
if (!guard.isSingleInstance()) {
|
if (!guard.isSingleInstance()) {
|
||||||
@ -100,11 +74,23 @@ int main(int argc, char *argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GlobalConfig = StructFromJSON("");
|
|
||||||
// Set file startup path as Path
|
// Set file startup path as Path
|
||||||
// WARNING: This may be changed in the future.
|
// WARNING: This may be changed in the future.
|
||||||
QDir::setCurrent(QFileInfo(QCoreApplication::applicationFilePath()).path());
|
QDir::setCurrent(QFileInfo(QCoreApplication::applicationFilePath()).path());
|
||||||
firstRunCheck();
|
// Hv2ray Initialize
|
||||||
|
initializeHv();
|
||||||
|
|
||||||
|
if (_qApp.installTranslator(getTranslator(GetGlobalConfig().language))) {
|
||||||
|
cout << "Loaded translations " << GetGlobalConfig().language << endl;
|
||||||
|
} else if (_qApp.installTranslator(getTranslator("en-US"))) {
|
||||||
|
cout << "Loaded default translations" << endl;
|
||||||
|
} else {
|
||||||
|
showWarnMessageBox(
|
||||||
|
nullptr, "Failed to load translations 无法加载语言文件",
|
||||||
|
"Failed to load translations, user experience may be downgraded. \r\n"
|
||||||
|
"无法加载语言文件,用户体验可能会降级.");
|
||||||
|
}
|
||||||
|
|
||||||
// Show MainWindow
|
// Show MainWindow
|
||||||
Ui::MainWindow w;
|
Ui::MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
|
|
||||||
#include "runguard.h"
|
#include "runguard.hpp"
|
||||||
namespace Hv2ray
|
namespace Hv2ray
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#include "HUtils.h"
|
#include "HUtils.hpp"
|
||||||
#include "vinteract.h"
|
#include "vinteract.hpp"
|
||||||
#include "w_MainWindow.h"
|
#include "w_MainWindow.h"
|
||||||
|
|
||||||
namespace Hv2ray
|
namespace Hv2ray
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#pragma pop_macro("slots")
|
#pragma pop_macro("slots")
|
||||||
|
|
||||||
#include "HUtils.h"
|
#include "HUtils.hpp"
|
||||||
#include "vinteract.h"
|
#include "vinteract.hpp"
|
||||||
#include "w_ConnectionEditWindow.h"
|
#include "w_ConnectionEditWindow.h"
|
||||||
#include "w_ImportConfig.h"
|
#include "w_ImportConfig.h"
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
#include "HUtils.h"
|
#include "HUtils.hpp"
|
||||||
#include "vinteract.h"
|
#include "vinteract.hpp"
|
||||||
#include "w_ConnectionEditWindow.h"
|
#include "w_ConnectionEditWindow.h"
|
||||||
#include "w_ImportConfig.h"
|
#include "w_ImportConfig.h"
|
||||||
#include "w_MainWindow.h"
|
#include "w_MainWindow.h"
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
|
|
||||||
#include "ui_w_MainWindow.h"
|
#include "ui_w_MainWindow.h"
|
||||||
#include "vinteract.h"
|
#include "vinteract.hpp"
|
||||||
#include "Hv2ConfigObject.h"
|
#include "V2ConfigObjects.hpp"
|
||||||
|
|
||||||
namespace Hv2ray
|
namespace Hv2ray
|
||||||
{
|
{
|
||||||
|
@ -202,6 +202,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>#ConnectionSettings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QPushButton" name="pushButton">
|
<widget class="QPushButton" name="pushButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -215,13 +222,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="text">
|
|
||||||
<string>#ConnectionSettings</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -294,7 +294,6 @@
|
|||||||
<tabstop>restartButton</tabstop>
|
<tabstop>restartButton</tabstop>
|
||||||
<tabstop>clearlogButton</tabstop>
|
<tabstop>clearlogButton</tabstop>
|
||||||
<tabstop>listWidget</tabstop>
|
<tabstop>listWidget</tabstop>
|
||||||
<tabstop>pushButton</tabstop>
|
|
||||||
<tabstop>logText</tabstop>
|
<tabstop>logText</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -8,10 +8,13 @@
|
|||||||
#include <QJsonValue>
|
#include <QJsonValue>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#include "HUtils.h"
|
#include "HUtils.hpp"
|
||||||
#include "vinteract.h"
|
#include "vinteract.hpp"
|
||||||
#include "w_PrefrencesWindow.h"
|
#include "w_PrefrencesWindow.h"
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Hv2ray;
|
using namespace Hv2ray;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@ -20,33 +23,27 @@ namespace Hv2ray
|
|||||||
{
|
{
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
PrefrencesWindow::PrefrencesWindow(QWidget *parent)
|
PrefrencesWindow::PrefrencesWindow(QWidget *parent) : QDialog(parent), CurrentConfig(), ui(new Ui_PrefrencesWindow)
|
||||||
: QDialog(parent)
|
|
||||||
, ui(new Ui_PrefrencesWindow)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
rootObj = loadRootObjFromConf();
|
CurrentConfig = GetGlobalConfig();
|
||||||
QJsonObject http = findValueFromJsonArray(rootObj.value("inbounds").toArray(), "tag", "http-in");
|
ui->languageComboBox->setCurrentText(QString::fromStdString(CurrentConfig.language));
|
||||||
QJsonObject socks = findValueFromJsonArray(rootObj.value("inbounds").toArray(), "tag", "socks-in");
|
ui->runAsRootCheckBox->setChecked(CurrentConfig.runAsRoot);
|
||||||
|
ui->logLevelCheckBox->setCurrentText(QString::fromStdString(CurrentConfig.logLevel));
|
||||||
if (rootObj.value("v2suidEnabled").toBool()) {
|
//
|
||||||
ui->runAsRootCheckBox->setCheckState(Qt::Checked);
|
ui->httpCB->setChecked(CurrentConfig.httpSetting.enabled);
|
||||||
}
|
ui->httpPortLE->setText(QString::fromStdString(to_string(CurrentConfig.httpSetting.port)));
|
||||||
|
ui->httpAuthCB->setChecked(CurrentConfig.httpSetting.useAuthentication);
|
||||||
if (!http.isEmpty()) {
|
ui->httpAuthUsernameTxt->setText(QString::fromStdString(CurrentConfig.httpSetting.authUsername));
|
||||||
ui->httpPortLE->setText(http.value("port").toString());
|
ui->httpAuthPasswordTxt->setText(QString::fromStdString(CurrentConfig.httpSetting.authPassword));
|
||||||
ui->httpCB->setCheckState(Qt::Checked);
|
ui->httpPortLE->setValidator(new QIntValidator());
|
||||||
} else {
|
//
|
||||||
ui->httpPortLE->setDisabled(true);
|
ui->socksCB->setChecked(CurrentConfig.socksSetting.enabled);
|
||||||
}
|
ui->socksPortLE->setText(QString::fromStdString(to_string(CurrentConfig.socksSetting.port)));
|
||||||
|
ui->socksAuthCB->setChecked(CurrentConfig.socksSetting.useAuthentication);
|
||||||
if (!socks.isEmpty()) {
|
ui->socksAuthUsernameTxt->setText(QString::fromStdString(CurrentConfig.socksSetting.authUsername));
|
||||||
ui->socksPortLE->setText(socks.value("port").toString());
|
ui->socksAuthPasswordTxt->setText(QString::fromStdString(CurrentConfig.socksSetting.authPassword));
|
||||||
ui->socksCB->setCheckState(Qt::Checked);
|
//
|
||||||
} else {
|
|
||||||
ui->socksPortLE->setDisabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->httpPortLE->setValidator(new QIntValidator());
|
ui->httpPortLE->setValidator(new QIntValidator());
|
||||||
ui->socksPortLE->setValidator(new QIntValidator());
|
ui->socksPortLE->setValidator(new QIntValidator());
|
||||||
parentMW = parent;
|
parentMW = parent;
|
||||||
@ -61,55 +58,9 @@ namespace Hv2ray
|
|||||||
{
|
{
|
||||||
if (v2Instance::checkVCoreExes()) {
|
if (v2Instance::checkVCoreExes()) {
|
||||||
if (ui->httpPortLE->text().toInt() != ui->socksPortLE->text().toInt()) {
|
if (ui->httpPortLE->text().toInt() != ui->socksPortLE->text().toInt()) {
|
||||||
QJsonArray inbounds;
|
|
||||||
QJsonDocument modifiedDoc;
|
|
||||||
inbounds = rootObj.value("inbounds").toArray();
|
|
||||||
int socksId = getIndexByValue(inbounds, "tag", "socks-in");
|
|
||||||
|
|
||||||
if (socksId != -1) {
|
|
||||||
inbounds.removeAt(socksId);
|
|
||||||
}
|
|
||||||
|
|
||||||
int httpId = getIndexByValue(inbounds, "tag", "http-in");
|
|
||||||
|
|
||||||
if (httpId != -1) {
|
|
||||||
inbounds.removeAt(httpId);
|
|
||||||
}
|
|
||||||
|
|
||||||
rootObj.remove("inbounds");
|
|
||||||
rootObj.remove("v2suidEnabled");
|
|
||||||
|
|
||||||
if (ui->socksCB->isChecked()) {
|
|
||||||
QJsonObject socks;
|
|
||||||
QJsonObject settings;
|
|
||||||
socks.insert("tag", "socks-in");
|
|
||||||
socks.insert("port", ui->socksPortLE->text().toInt());
|
|
||||||
socks.insert("listen", "127.0.0.1");
|
|
||||||
socks.insert("protocol", "socks");
|
|
||||||
settings.insert("auth", "noauth");
|
|
||||||
settings.insert("udp", true);
|
|
||||||
settings.insert("ip", "127.0.0.1");
|
|
||||||
socks.insert("settings", QJsonValue(settings));
|
|
||||||
inbounds.append(socks);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ui->httpCB->isChecked()) {
|
|
||||||
QJsonObject http;
|
|
||||||
QJsonObject settings;
|
|
||||||
http.insert("tag", "http-in");
|
|
||||||
http.insert("port", ui->httpPortLE->text().toInt());
|
|
||||||
http.insert("listen", "127.0.0.1");
|
|
||||||
http.insert("protocol", "http");
|
|
||||||
settings.insert("auth", "noauth");
|
|
||||||
settings.insert("udp", true);
|
|
||||||
settings.insert("ip", "127.0.0.1");
|
|
||||||
http.insert("settings", QJsonValue(settings));
|
|
||||||
inbounds.append(http);
|
|
||||||
}
|
|
||||||
|
|
||||||
rootObj.insert("inbounds", QJsonValue(inbounds));
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// Set UID and GID in *nix
|
// Set UID and GID in *nix
|
||||||
|
// The file is actually not here
|
||||||
QFileInfo v2rayCoreExeFile("v2ray");
|
QFileInfo v2rayCoreExeFile("v2ray");
|
||||||
|
|
||||||
if (ui->runAsRootCheckBox->isChecked() && v2rayCoreExeFile.ownerId() != 0) {
|
if (ui->runAsRootCheckBox->isChecked() && v2rayCoreExeFile.ownerId() != 0) {
|
||||||
@ -123,21 +74,10 @@ namespace Hv2ray
|
|||||||
}
|
}
|
||||||
|
|
||||||
v2rayCoreExeFile.refresh();
|
v2rayCoreExeFile.refresh();
|
||||||
rootObj.insert("v2suidEnabled", v2rayCoreExeFile.ownerId() == 0);
|
//rootObj.insert("v2suidEnabled", v2rayCoreExeFile.ownerId() == 0);
|
||||||
#else
|
#else
|
||||||
// No such uid gid thing on windows....
|
// No such uid gid thing on windows....
|
||||||
#endif
|
#endif
|
||||||
modifiedDoc.setObject(rootObj);
|
|
||||||
QByteArray byteArray = modifiedDoc.toJson(QJsonDocument::Indented);
|
|
||||||
QFile confFile("conf/Hv2ray.config.json");
|
|
||||||
|
|
||||||
if (!confFile.open(QIODevice::WriteOnly)) {
|
|
||||||
showWarnMessageBox(this, tr("#Prefrences"), tr("#CannotOpenConfigFile"));
|
|
||||||
qDebug() << "Cannot open Hv2ray.config.json for modifying";
|
|
||||||
}
|
|
||||||
|
|
||||||
confFile.write(byteArray);
|
|
||||||
confFile.close();
|
|
||||||
} else {
|
} else {
|
||||||
showWarnMessageBox(this, tr("Prefrences"), tr("PortNumbersCannotBeSame"));
|
showWarnMessageBox(this, tr("Prefrences"), tr("PortNumbersCannotBeSame"));
|
||||||
}
|
}
|
||||||
@ -150,17 +90,15 @@ namespace Hv2ray
|
|||||||
ui->httpPortLE->setDisabled(true);
|
ui->httpPortLE->setDisabled(true);
|
||||||
} else {
|
} else {
|
||||||
ui->httpPortLE->setEnabled(true);
|
ui->httpPortLE->setEnabled(true);
|
||||||
ui->httpPortLE->setText("6666");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrefrencesWindow::on_socksCB_stateChanged(int checked)
|
void PrefrencesWindow::on_socksCB_stateChanged(int checked)
|
||||||
{
|
{
|
||||||
if (checked != Qt::Checked) {
|
if (checked != Qt::Checked) {
|
||||||
ui->socksPortLE->setDisabled(true);
|
ui->socksPortLE->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
ui->socksPortLE->setEnabled(true);
|
ui->socksPortLE->setEnabled(true);
|
||||||
ui->socksPortLE->setText("1080");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <ui_w_PrefrencesWindow.h>
|
#include <ui_w_PrefrencesWindow.h>
|
||||||
#include <QJsonObject>
|
#include "HConfigObjects.hpp"
|
||||||
|
|
||||||
namespace Hv2ray
|
namespace Hv2ray
|
||||||
{
|
{
|
||||||
@ -16,7 +16,6 @@ namespace Hv2ray
|
|||||||
public:
|
public:
|
||||||
explicit PrefrencesWindow(QWidget *parent = nullptr);
|
explicit PrefrencesWindow(QWidget *parent = nullptr);
|
||||||
~PrefrencesWindow();
|
~PrefrencesWindow();
|
||||||
QJsonObject rootObj;
|
|
||||||
QWidget *parentMW;
|
QWidget *parentMW;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@ -29,6 +28,7 @@ namespace Hv2ray
|
|||||||
void on_runAsRootCheckBox_stateChanged(int arg1);
|
void on_runAsRootCheckBox_stateChanged(int arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Hv2ray::HConfigModels::Hv2Config CurrentConfig;
|
||||||
Ui_PrefrencesWindow *ui;
|
Ui_PrefrencesWindow *ui;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -197,56 +197,56 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="20"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="20"/>
|
||||||
<source>#ConnectionSettings</source>
|
<source>#ConnectionSettings</source>
|
||||||
<translation type="unfinished">Connection Settings</translation>
|
<translation>Connection Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="28"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="28"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="335"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="335"/>
|
||||||
<source>#Host</source>
|
<source>#Host</source>
|
||||||
<translation type="unfinished">Host</translation>
|
<translation>Host</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="42"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="42"/>
|
||||||
<source>#Port</source>
|
<source>#Port</source>
|
||||||
<translation type="unfinished">Port</translation>
|
<translation>Port</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="56"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="56"/>
|
||||||
<source>#Name</source>
|
<source>#Name</source>
|
||||||
<translation type="unfinished">Name</translation>
|
<translation>Name</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="73"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="73"/>
|
||||||
<source>#UUID</source>
|
<source>#UUID</source>
|
||||||
<translation type="unfinished">UUID</translation>
|
<translation>UUID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="90"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="90"/>
|
||||||
<source>#AlterID</source>
|
<source>#AlterID</source>
|
||||||
<translation type="unfinished">Alter ID</translation>
|
<translation>Alter ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="104"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="104"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="702"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="702"/>
|
||||||
<source>#Security</source>
|
<source>#Security</source>
|
||||||
<translation type="unfinished">Security Settings</translation>
|
<translation>Security Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="112"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="112"/>
|
||||||
<source>auto</source>
|
<source>auto</source>
|
||||||
<translation type="unfinished">Auto</translation>
|
<translation>Auto</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="117"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="117"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="721"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="721"/>
|
||||||
<source>aes-128-gcm</source>
|
<source>aes-128-gcm</source>
|
||||||
<translation type="unfinished">aes-128-gcm</translation>
|
<translation>aes-128-gcm</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="122"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="122"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="726"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="726"/>
|
||||||
<source>chacha20-poly1305</source>
|
<source>chacha20-poly1305</source>
|
||||||
<translation type="unfinished">chacha20-poly1305</translation>
|
<translation>chacha20-poly1305</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="127"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="127"/>
|
||||||
@ -255,199 +255,199 @@
|
|||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="716"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="716"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="783"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="783"/>
|
||||||
<source>none</source>
|
<source>none</source>
|
||||||
<translation type="unfinished">Do not use</translation>
|
<translation>Do not use</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="135"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="135"/>
|
||||||
<source>#Transport</source>
|
<source>#Transport</source>
|
||||||
<translation type="unfinished">Transport Settings</translation>
|
<translation>Transport Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="143"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="143"/>
|
||||||
<source>tcp (TCP)</source>
|
<source>tcp (TCP)</source>
|
||||||
<translation type="unfinished">tcp (TCP)</translation>
|
<translation>tcp (TCP)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="148"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="148"/>
|
||||||
<source>http (HTTP)</source>
|
<source>http (HTTP)</source>
|
||||||
<translation type="unfinished">http (HTTP)</translation>
|
<translation>http (HTTP)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="153"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="153"/>
|
||||||
<source>ws (WebSocket)</source>
|
<source>ws (WebSocket)</source>
|
||||||
<translation type="unfinished">ws (WebSocket)</translation>
|
<translation>ws (WebSocket)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="158"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="158"/>
|
||||||
<source>kcp (mKCP)</source>
|
<source>kcp (mKCP)</source>
|
||||||
<translation type="unfinished">kcp (mKCP)</translation>
|
<translation>kcp (mKCP)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="163"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="163"/>
|
||||||
<source>domainsocket (Domain Socket)</source>
|
<source>domainsocket (Domain Socket)</source>
|
||||||
<translation type="unfinished">domainsocket (Domain Socket)</translation>
|
<translation>domainsocket (Domain Socket)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="168"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="168"/>
|
||||||
<source>quic (Quick UDP Internet Connection)</source>
|
<source>quic (Quick UDP Internet Connection)</source>
|
||||||
<translation type="unfinished">quic (Quick UDP Internet Connection)</translation>
|
<translation>quic (Quick UDP Internet Connection)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="194"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="194"/>
|
||||||
<source>#TransportSettings</source>
|
<source>#TransportSettings</source>
|
||||||
<translation type="unfinished">Transport Settings</translation>
|
<translation>Transport Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="225"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="225"/>
|
||||||
<source>TCP</source>
|
<source>TCP</source>
|
||||||
<translation type="unfinished">TCP</translation>
|
<translation>TCP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="241"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="241"/>
|
||||||
<source>http</source>
|
<source>http</source>
|
||||||
<translation type="unfinished">HTTP</translation>
|
<translation>HTTP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="249"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="249"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="618"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="618"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="769"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="769"/>
|
||||||
<source>#Type</source>
|
<source>#Type</source>
|
||||||
<translation type="unfinished">Type</translation>
|
<translation>Type</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="262"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="262"/>
|
||||||
<source>#Request</source>
|
<source>#Request</source>
|
||||||
<translation type="unfinished">Request</translation>
|
<translation>Request</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="282"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="282"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="310"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="310"/>
|
||||||
<source>#InsertDefaultContent</source>
|
<source>#InsertDefaultContent</source>
|
||||||
<translation type="unfinished">Insert Default Content</translation>
|
<translation>Insert Default Content</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="293"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="293"/>
|
||||||
<source>#Response</source>
|
<source>#Response</source>
|
||||||
<translation type="unfinished">Response</translation>
|
<translation>Response</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="324"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="324"/>
|
||||||
<source>HTTP</source>
|
<source>HTTP</source>
|
||||||
<translation type="unfinished">HTTP</translation>
|
<translation>HTTP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="342"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="342"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="369"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="369"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="677"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="677"/>
|
||||||
<source>#Path</source>
|
<source>#Path</source>
|
||||||
<translation type="unfinished">Path</translation>
|
<translation>Path</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="359"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="359"/>
|
||||||
<source>WebSocket</source>
|
<source>WebSocket</source>
|
||||||
<translation type="unfinished">WebSocket</translation>
|
<translation>WebSocket</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="385"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="385"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="748"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="748"/>
|
||||||
<source>#Headers</source>
|
<source>#Headers</source>
|
||||||
<translation type="unfinished">Headers</translation>
|
<translation>Headers</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="440"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="440"/>
|
||||||
<source>mKCP</source>
|
<source>mKCP</source>
|
||||||
<translation type="unfinished">mKCP</translation>
|
<translation>mKCP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="448"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="448"/>
|
||||||
<source>#MTU</source>
|
<source>#MTU</source>
|
||||||
<translation type="unfinished">MTU</translation>
|
<translation>MTU</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="474"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="474"/>
|
||||||
<source>#TTI (ms)</source>
|
<source>#TTI (ms)</source>
|
||||||
<translation type="unfinished">TTI (ms)</translation>
|
<translation>TTI (ms)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="500"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="500"/>
|
||||||
<source>#UplinkCapacity (MB/s)</source>
|
<source>#UplinkCapacity (MB/s)</source>
|
||||||
<translation type="unfinished">Uplink Capacity (MB/s)</translation>
|
<translation>Uplink Capacity (MB/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="523"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="523"/>
|
||||||
<source>#Congestion</source>
|
<source>#Congestion</source>
|
||||||
<translation type="unfinished">Congestion Control</translation>
|
<translation>Congestion Control</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="530"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="530"/>
|
||||||
<source>#Enabled</source>
|
<source>#Enabled</source>
|
||||||
<translation type="unfinished">Enabled</translation>
|
<translation>Enabled</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="541"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="541"/>
|
||||||
<source>#DownlinkCapacity (MB/s)</source>
|
<source>#DownlinkCapacity (MB/s)</source>
|
||||||
<translation type="unfinished">Downlink Capacity (MB/s)</translation>
|
<translation>Downlink Capacity (MB/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="564"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="564"/>
|
||||||
<source>#ReadBufferSize (MB)</source>
|
<source>#ReadBufferSize (MB)</source>
|
||||||
<translation type="unfinished">Read Buffer Size (MB)</translation>
|
<translation>Read Buffer Size (MB)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="587"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="587"/>
|
||||||
<source>#WriteBufferSize (MB)</source>
|
<source>#WriteBufferSize (MB)</source>
|
||||||
<translation type="unfinished">Write Buffer Size (MB)</translation>
|
<translation>Write Buffer Size (MB)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="612"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="612"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="761"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="761"/>
|
||||||
<source>#Header</source>
|
<source>#Header</source>
|
||||||
<translation type="unfinished">Headers</translation>
|
<translation>Headers</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="637"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="637"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="788"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="788"/>
|
||||||
<source>srtp (SRTP, FaceTime)</source>
|
<source>srtp (SRTP, FaceTime)</source>
|
||||||
<translation type="unfinished">srtp (SRTP, FaceTime)</translation>
|
<translation>srtp (SRTP, FaceTime)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="642"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="642"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="793"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="793"/>
|
||||||
<source>utp (BitTorrent)</source>
|
<source>utp (BitTorrent)</source>
|
||||||
<translation type="unfinished">utp (BitTorrent)</translation>
|
<translation>utp (BitTorrent)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="647"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="647"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="798"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="798"/>
|
||||||
<source>wechat-video (WeChat Video Message)</source>
|
<source>wechat-video (WeChat Video Message)</source>
|
||||||
<translation type="unfinished">wechat-video (WeChat Video Message)</translation>
|
<translation>wechat-video (WeChat Video Message)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="652"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="652"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="803"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="803"/>
|
||||||
<source>dtls (DTLS 1.2)</source>
|
<source>dtls (DTLS 1.2)</source>
|
||||||
<translation type="unfinished">dtls (DTLS 1.2)</translation>
|
<translation>dtls (DTLS 1.2)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="657"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="657"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="808"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="808"/>
|
||||||
<source>wireguard (WireGuard fake packets)</source>
|
<source>wireguard (WireGuard fake packets)</source>
|
||||||
<translation type="unfinished">wireguard (WireGuard fake packets)</translation>
|
<translation>wireguard (WireGuard fake packets)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="669"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="669"/>
|
||||||
<source>DomainSocket</source>
|
<source>DomainSocket</source>
|
||||||
<translation type="unfinished">DomainSocket</translation>
|
<translation>DomainSocket</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="694"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="694"/>
|
||||||
<source>QUIC</source>
|
<source>QUIC</source>
|
||||||
<translation type="unfinished">QUIC</translation>
|
<translation>QUIC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="734"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="734"/>
|
||||||
<source>#Key</source>
|
<source>#Key</source>
|
||||||
<translation type="unfinished">Key</translation>
|
<translation>Key</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -455,82 +455,82 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="20"/>
|
<location filename="../src/w_ImportConfig.ui" line="20"/>
|
||||||
<source>Import file</source>
|
<source>Import file</source>
|
||||||
<translation type="unfinished">Import file</translation>
|
<translation>Import file</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="28"/>
|
<location filename="../src/w_ImportConfig.ui" line="28"/>
|
||||||
<source>#ImportFrom</source>
|
<source>#ImportFrom</source>
|
||||||
<translation type="unfinished">Import From</translation>
|
<translation>Import From</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="36"/>
|
<location filename="../src/w_ImportConfig.ui" line="36"/>
|
||||||
<source>Existing File</source>
|
<source>Existing File</source>
|
||||||
<translation type="unfinished">Existing File</translation>
|
<translation>Existing File</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="41"/>
|
<location filename="../src/w_ImportConfig.ui" line="41"/>
|
||||||
<source>VMess Connection String</source>
|
<source>VMess Connection String</source>
|
||||||
<translation type="unfinished">VMess Connection String</translation>
|
<translation>VMess Connection String</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="51"/>
|
<location filename="../src/w_ImportConfig.ui" line="51"/>
|
||||||
<source>#FromFile</source>
|
<source>#FromFile</source>
|
||||||
<translation type="unfinished">From file</translation>
|
<translation>From file</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="57"/>
|
<location filename="../src/w_ImportConfig.ui" line="57"/>
|
||||||
<source>#Path</source>
|
<source>#Path</source>
|
||||||
<translation type="unfinished">Path</translation>
|
<translation>Path</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="73"/>
|
<location filename="../src/w_ImportConfig.ui" line="73"/>
|
||||||
<source>#SelectFile</source>
|
<source>#SelectFile</source>
|
||||||
<translation type="unfinished">Select File</translation>
|
<translation>Select File</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="82"/>
|
<location filename="../src/w_ImportConfig.ui" line="82"/>
|
||||||
<source>#Name</source>
|
<source>#Name</source>
|
||||||
<translation type="unfinished">Name</translation>
|
<translation>Name</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="92"/>
|
<location filename="../src/w_ImportConfig.ui" line="92"/>
|
||||||
<source>#Inbound</source>
|
<source>#Inbound</source>
|
||||||
<translation type="unfinished">Inbound Settings</translation>
|
<translation>Inbound Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="101"/>
|
<location filename="../src/w_ImportConfig.ui" line="101"/>
|
||||||
<source>#UseCurrent</source>
|
<source>#UseCurrent</source>
|
||||||
<translation type="unfinished">Use Current Settings</translation>
|
<translation>Use Current Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="111"/>
|
<location filename="../src/w_ImportConfig.ui" line="111"/>
|
||||||
<source>#UseImported</source>
|
<source>#UseImported</source>
|
||||||
<translation type="unfinished">Use Imported Inbound Settings</translation>
|
<translation>Use Imported Inbound Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="123"/>
|
<location filename="../src/w_ImportConfig.ui" line="123"/>
|
||||||
<source>#From VMess Connection String</source>
|
<source>#From VMess Connection String</source>
|
||||||
<translation type="unfinished">From VMess Connection String</translation>
|
<translation>From VMess Connection String</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="129"/>
|
<location filename="../src/w_ImportConfig.ui" line="129"/>
|
||||||
<source>#VMess Connection String</source>
|
<source>#VMess Connection String</source>
|
||||||
<translation type="unfinished">VMess Connection String</translation>
|
<translation>VMess Connection String</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.cpp" line="38"/>
|
<location filename="../src/w_ImportConfig.cpp" line="38"/>
|
||||||
<source>OpenConfigFile</source>
|
<source>OpenConfigFile</source>
|
||||||
<translation type="unfinished">Open Config File</translation>
|
<translation>Open Config File</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
||||||
<source>ImportConfig</source>
|
<source>ImportConfig</source>
|
||||||
<translation type="unfinished">Import Config</translation>
|
<translation>Import Config</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
||||||
<source>CannotGenerateConfig</source>
|
<source>CannotGenerateConfig</source>
|
||||||
<translation type="unfinished">Failed to generate config file</translation>
|
<translation>Failed to generate config file</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -539,147 +539,147 @@
|
|||||||
<location filename="../src/w_MainWindow.ui" line="26"/>
|
<location filename="../src/w_MainWindow.ui" line="26"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="25"/>
|
<location filename="../src/w_MainWindow.cpp" line="25"/>
|
||||||
<source>Hv2ray</source>
|
<source>Hv2ray</source>
|
||||||
<translation type="unfinished">Hv2ray</translation>
|
<translation>Hv2ray</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="46"/>
|
<location filename="../src/w_MainWindow.ui" line="46"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="35"/>
|
<location filename="../src/w_MainWindow.cpp" line="35"/>
|
||||||
<source>#Start</source>
|
<source>#Start</source>
|
||||||
<translation type="unfinished">Start</translation>
|
<translation>Start</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="53"/>
|
<location filename="../src/w_MainWindow.ui" line="53"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="36"/>
|
<location filename="../src/w_MainWindow.cpp" line="36"/>
|
||||||
<source>#Stop</source>
|
<source>#Stop</source>
|
||||||
<translation type="unfinished">Stop</translation>
|
<translation>Stop</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="60"/>
|
<location filename="../src/w_MainWindow.ui" line="60"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="37"/>
|
<location filename="../src/w_MainWindow.cpp" line="37"/>
|
||||||
<source>#Restart</source>
|
<source>#Restart</source>
|
||||||
<translation type="unfinished">Restart</translation>
|
<translation>Restart</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="70"/>
|
<location filename="../src/w_MainWindow.ui" line="70"/>
|
||||||
<source>#ClearLog</source>
|
<source>#ClearLog</source>
|
||||||
<translation type="unfinished">Clear Log</translation>
|
<translation>Clear Log</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="97"/>
|
<location filename="../src/w_MainWindow.ui" line="97"/>
|
||||||
<source>#HostList</source>
|
<source>#HostList</source>
|
||||||
<translation type="unfinished">Host List</translation>
|
<translation>Host List</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="140"/>
|
<location filename="../src/w_MainWindow.ui" line="140"/>
|
||||||
<source>#ConfigDetail</source>
|
<source>#ConfigDetail</source>
|
||||||
<translation type="unfinished">Detailed Config Info</translation>
|
<translation>Detailed Config Info</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="152"/>
|
<location filename="../src/w_MainWindow.ui" line="152"/>
|
||||||
<source>#Host</source>
|
<source>#Host</source>
|
||||||
<translation type="unfinished">Host</translation>
|
<translation>Host</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="166"/>
|
<location filename="../src/w_MainWindow.ui" line="166"/>
|
||||||
<source>#Port</source>
|
<source>#Port</source>
|
||||||
<translation type="unfinished">Port</translation>
|
<translation>Port</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="180"/>
|
<location filename="../src/w_MainWindow.ui" line="180"/>
|
||||||
<source>#UUID</source>
|
<source>#UUID</source>
|
||||||
<translation type="unfinished">UUID</translation>
|
<translation>UUID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="194"/>
|
<location filename="../src/w_MainWindow.ui" line="194"/>
|
||||||
<source>#Transport</source>
|
<source>#Transport</source>
|
||||||
<translation type="unfinished">Transport Settings</translation>
|
<translation>Transport Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="214"/>
|
<location filename="../src/w_MainWindow.ui" line="214"/>
|
||||||
<location filename="../src/w_MainWindow.ui" line="221"/>
|
<location filename="../src/w_MainWindow.ui" line="221"/>
|
||||||
<source>#ConnectionSettings</source>
|
<source>#ConnectionSettings</source>
|
||||||
<translation type="unfinished">Connection Settings</translation>
|
<translation>Connection Settings</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="252"/>
|
<location filename="../src/w_MainWindow.ui" line="252"/>
|
||||||
<source>#File</source>
|
<source>#File</source>
|
||||||
<translation type="unfinished">File</translation>
|
<translation>File</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="256"/>
|
<location filename="../src/w_MainWindow.ui" line="256"/>
|
||||||
<source>#NewConnection</source>
|
<source>#NewConnection</source>
|
||||||
<translation type="unfinished">New Connection</translation>
|
<translation>New Connection</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="271"/>
|
<location filename="../src/w_MainWindow.ui" line="271"/>
|
||||||
<source>#ManuallyInput</source>
|
<source>#ManuallyInput</source>
|
||||||
<translation type="unfinished">Manually Input Config</translation>
|
<translation>Manually Input Config</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="276"/>
|
<location filename="../src/w_MainWindow.ui" line="276"/>
|
||||||
<source>#ImportConnection</source>
|
<source>#ImportConnection</source>
|
||||||
<translation type="unfinished">Import Config File</translation>
|
<translation>Import Config File</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="281"/>
|
<location filename="../src/w_MainWindow.ui" line="281"/>
|
||||||
<source>#Exit</source>
|
<source>#Exit</source>
|
||||||
<translation type="unfinished">Exit</translation>
|
<translation>Exit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="286"/>
|
<location filename="../src/w_MainWindow.ui" line="286"/>
|
||||||
<source>#Preferences</source>
|
<source>#Preferences</source>
|
||||||
<translation type="unfinished">Preferences</translation>
|
<translation>Preferences</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="33"/>
|
<location filename="../src/w_MainWindow.cpp" line="33"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="236"/>
|
<location filename="../src/w_MainWindow.cpp" line="236"/>
|
||||||
<source>#Hide</source>
|
<source>#Hide</source>
|
||||||
<translation type="unfinished">Hide</translation>
|
<translation>Hide</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="34"/>
|
<location filename="../src/w_MainWindow.cpp" line="34"/>
|
||||||
<source>#Quit</source>
|
<source>#Quit</source>
|
||||||
<translation type="unfinished">Quit</translation>
|
<translation>Quit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="239"/>
|
<location filename="../src/w_MainWindow.cpp" line="239"/>
|
||||||
<source>#Show</source>
|
<source>#Show</source>
|
||||||
<translation type="unfinished">Show</translation>
|
<translation>Show</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Hv2ray::Ui::PrefrencesWindow</name>
|
<name>Hv2ray::Ui::PrefrencesWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="20"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="20"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="142"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="66"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="177"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="99"/>
|
||||||
<source>Prefrences</source>
|
<source>Prefrences</source>
|
||||||
<translation type="unfinished">Preferences</translation>
|
<translation>Preferences</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="26"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="26"/>
|
||||||
<source>#General</source>
|
<source>#General</source>
|
||||||
<translation type="unfinished">General</translation>
|
<translation>General</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="34"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="34"/>
|
||||||
<source>#Language</source>
|
<source>#Language</source>
|
||||||
<translation type="unfinished">Language</translation>
|
<translation>Language</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="48"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="48"/>
|
||||||
<source>zh-CN</source>
|
<source>zh-CN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="53"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="53"/>
|
||||||
<source>en-US</source>
|
<source>en-US</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="61"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="61"/>
|
||||||
<source>#RunAsRoot</source>
|
<source>#RunAsRoot</source>
|
||||||
<translation type="unfinished">Run v2ray as root</translation>
|
<translation>Run v2ray as root</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="68"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="68"/>
|
||||||
@ -690,7 +690,7 @@
|
|||||||
<location filename="../src/w_PrefrencesWindow.ui" line="270"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="270"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="298"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="298"/>
|
||||||
<source>#Enabled</source>
|
<source>#Enabled</source>
|
||||||
<translation type="unfinished">Enabled</translation>
|
<translation>Enabled</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="75"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="75"/>
|
||||||
@ -769,37 +769,35 @@
|
|||||||
<location filename="../src/w_PrefrencesWindow.ui" line="227"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="227"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="291"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="291"/>
|
||||||
<source>#Password</source>
|
<source>#Password</source>
|
||||||
<translation type="unfinished">Password</translation>
|
<translation>Password</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="250"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="250"/>
|
||||||
<source>SOCKS</source>
|
<source>SOCKS</source>
|
||||||
<translation type="unfinished">SOCKS</translation>
|
<translation>SOCKS</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="263"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="263"/>
|
||||||
<source>9001</source>
|
<source>9001</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="135"/>
|
|
||||||
<source>#Prefrences</source>
|
<source>#Prefrences</source>
|
||||||
<translation type="unfinished">Preferences</translation>
|
<translation type="obsolete">Preferences</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="135"/>
|
|
||||||
<source>#CannotOpenConfigFile</source>
|
<source>#CannotOpenConfigFile</source>
|
||||||
<translation type="unfinished">Cannot open config file</translation>
|
<translation type="obsolete">Cannot open config file</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="142"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="66"/>
|
||||||
<source>PortNumbersCannotBeSame</source>
|
<source>PortNumbersCannotBeSame</source>
|
||||||
<translation type="unfinished">Port numbers cannot be the same</translation>
|
<translation>Port numbers cannot be the same</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="177"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="99"/>
|
||||||
<source>RunAsRootNotOnWindows</source>
|
<source>RunAsRootNotOnWindows</source>
|
||||||
<translation type="unfinished">Run as root is not avaliable on Windows Platform</translation>
|
<translation>Run as root is not avaliable on Windows Platform</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -1070,12 +1068,12 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QObject</name>
|
<name>QObject</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/main.cpp" line="99"/>
|
<location filename="../src/main.cpp" line="73"/>
|
||||||
<source>Hv2Ray</source>
|
<source>Hv2Ray</source>
|
||||||
<translation>Hv2ray</translation>
|
<translation>Hv2ray</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/main.cpp" line="99"/>
|
<location filename="../src/main.cpp" line="73"/>
|
||||||
<source>AnotherInstanceRunning</source>
|
<source>AnotherInstanceRunning</source>
|
||||||
<translation>Another instance is already running</translation>
|
<translation>Another instance is already running</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -197,56 +197,56 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="20"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="20"/>
|
||||||
<source>#ConnectionSettings</source>
|
<source>#ConnectionSettings</source>
|
||||||
<translation type="unfinished">连接设置</translation>
|
<translation>连接设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="28"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="28"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="335"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="335"/>
|
||||||
<source>#Host</source>
|
<source>#Host</source>
|
||||||
<translation type="unfinished">域名</translation>
|
<translation>域名</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="42"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="42"/>
|
||||||
<source>#Port</source>
|
<source>#Port</source>
|
||||||
<translation type="unfinished">端口</translation>
|
<translation>端口</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="56"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="56"/>
|
||||||
<source>#Name</source>
|
<source>#Name</source>
|
||||||
<translation type="unfinished">名称</translation>
|
<translation>名称</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="73"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="73"/>
|
||||||
<source>#UUID</source>
|
<source>#UUID</source>
|
||||||
<translation type="unfinished">UUID</translation>
|
<translation>UUID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="90"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="90"/>
|
||||||
<source>#AlterID</source>
|
<source>#AlterID</source>
|
||||||
<translation type="unfinished">Alter ID</translation>
|
<translation>Alter ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="104"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="104"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="702"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="702"/>
|
||||||
<source>#Security</source>
|
<source>#Security</source>
|
||||||
<translation type="unfinished">安全设置</translation>
|
<translation>安全设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="112"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="112"/>
|
||||||
<source>auto</source>
|
<source>auto</source>
|
||||||
<translation type="unfinished">自动</translation>
|
<translation>自动</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="117"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="117"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="721"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="721"/>
|
||||||
<source>aes-128-gcm</source>
|
<source>aes-128-gcm</source>
|
||||||
<translation type="unfinished">aes-128-gcm</translation>
|
<translation>aes-128-gcm</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="122"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="122"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="726"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="726"/>
|
||||||
<source>chacha20-poly1305</source>
|
<source>chacha20-poly1305</source>
|
||||||
<translation type="unfinished">chacha20-poly1305</translation>
|
<translation>chacha20-poly1305</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="127"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="127"/>
|
||||||
@ -255,199 +255,199 @@
|
|||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="716"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="716"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="783"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="783"/>
|
||||||
<source>none</source>
|
<source>none</source>
|
||||||
<translation type="unfinished">不使用</translation>
|
<translation>不使用</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="135"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="135"/>
|
||||||
<source>#Transport</source>
|
<source>#Transport</source>
|
||||||
<translation type="unfinished">传输设置</translation>
|
<translation>传输设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="143"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="143"/>
|
||||||
<source>tcp (TCP)</source>
|
<source>tcp (TCP)</source>
|
||||||
<translation type="unfinished">tcp (TCP)</translation>
|
<translation>tcp (TCP)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="148"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="148"/>
|
||||||
<source>http (HTTP)</source>
|
<source>http (HTTP)</source>
|
||||||
<translation type="unfinished">http (HTTP)</translation>
|
<translation>http (HTTP)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="153"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="153"/>
|
||||||
<source>ws (WebSocket)</source>
|
<source>ws (WebSocket)</source>
|
||||||
<translation type="unfinished">ws (WebSocket)</translation>
|
<translation>ws (WebSocket)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="158"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="158"/>
|
||||||
<source>kcp (mKCP)</source>
|
<source>kcp (mKCP)</source>
|
||||||
<translation type="unfinished">kcp (mKCP)</translation>
|
<translation>kcp (mKCP)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="163"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="163"/>
|
||||||
<source>domainsocket (Domain Socket)</source>
|
<source>domainsocket (Domain Socket)</source>
|
||||||
<translation type="unfinished">domainsocket (Domain Socket)</translation>
|
<translation>domainsocket (Domain Socket)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="168"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="168"/>
|
||||||
<source>quic (Quick UDP Internet Connection)</source>
|
<source>quic (Quick UDP Internet Connection)</source>
|
||||||
<translation type="unfinished">quic (Quick UDP Internet Connection)</translation>
|
<translation>quic (Quick UDP Internet Connection)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="194"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="194"/>
|
||||||
<source>#TransportSettings</source>
|
<source>#TransportSettings</source>
|
||||||
<translation type="unfinished">传输设置</translation>
|
<translation>传输设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="225"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="225"/>
|
||||||
<source>TCP</source>
|
<source>TCP</source>
|
||||||
<translation type="unfinished">TCP</translation>
|
<translation>TCP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="241"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="241"/>
|
||||||
<source>http</source>
|
<source>http</source>
|
||||||
<translation type="unfinished">HTTP</translation>
|
<translation>HTTP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="249"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="249"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="618"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="618"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="769"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="769"/>
|
||||||
<source>#Type</source>
|
<source>#Type</source>
|
||||||
<translation type="unfinished">类型</translation>
|
<translation>类型</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="262"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="262"/>
|
||||||
<source>#Request</source>
|
<source>#Request</source>
|
||||||
<translation type="unfinished">请求</translation>
|
<translation>请求</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="282"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="282"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="310"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="310"/>
|
||||||
<source>#InsertDefaultContent</source>
|
<source>#InsertDefaultContent</source>
|
||||||
<translation type="unfinished">默认值</translation>
|
<translation>默认值</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="293"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="293"/>
|
||||||
<source>#Response</source>
|
<source>#Response</source>
|
||||||
<translation type="unfinished">相应</translation>
|
<translation>相应</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="324"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="324"/>
|
||||||
<source>HTTP</source>
|
<source>HTTP</source>
|
||||||
<translation type="unfinished">HTTP</translation>
|
<translation>HTTP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="342"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="342"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="369"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="369"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="677"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="677"/>
|
||||||
<source>#Path</source>
|
<source>#Path</source>
|
||||||
<translation type="unfinished">路径</translation>
|
<translation>路径</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="359"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="359"/>
|
||||||
<source>WebSocket</source>
|
<source>WebSocket</source>
|
||||||
<translation type="unfinished">WebSocket</translation>
|
<translation>WebSocket</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="385"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="385"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="748"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="748"/>
|
||||||
<source>#Headers</source>
|
<source>#Headers</source>
|
||||||
<translation type="unfinished">头伪装</translation>
|
<translation>头伪装</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="440"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="440"/>
|
||||||
<source>mKCP</source>
|
<source>mKCP</source>
|
||||||
<translation type="unfinished">mKCP</translation>
|
<translation>mKCP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="448"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="448"/>
|
||||||
<source>#MTU</source>
|
<source>#MTU</source>
|
||||||
<translation type="unfinished">最大传输单元</translation>
|
<translation>最大传输单元</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="474"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="474"/>
|
||||||
<source>#TTI (ms)</source>
|
<source>#TTI (ms)</source>
|
||||||
<translation type="unfinished">传输时间间隔</translation>
|
<translation>传输时间间隔</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="500"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="500"/>
|
||||||
<source>#UplinkCapacity (MB/s)</source>
|
<source>#UplinkCapacity (MB/s)</source>
|
||||||
<translation type="unfinished">上行链路容量 (MB/s)</translation>
|
<translation>上行链路容量 (MB/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="523"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="523"/>
|
||||||
<source>#Congestion</source>
|
<source>#Congestion</source>
|
||||||
<translation type="unfinished">拥塞控制</translation>
|
<translation>拥塞控制</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="530"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="530"/>
|
||||||
<source>#Enabled</source>
|
<source>#Enabled</source>
|
||||||
<translation type="unfinished">启用</translation>
|
<translation>启用</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="541"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="541"/>
|
||||||
<source>#DownlinkCapacity (MB/s)</source>
|
<source>#DownlinkCapacity (MB/s)</source>
|
||||||
<translation type="unfinished">下行链路容量 (MB/s)</translation>
|
<translation>下行链路容量 (MB/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="564"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="564"/>
|
||||||
<source>#ReadBufferSize (MB)</source>
|
<source>#ReadBufferSize (MB)</source>
|
||||||
<translation type="unfinished">读取缓冲区大小 (MB)</translation>
|
<translation>读取缓冲区大小 (MB)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="587"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="587"/>
|
||||||
<source>#WriteBufferSize (MB)</source>
|
<source>#WriteBufferSize (MB)</source>
|
||||||
<translation type="unfinished">写入缓冲区大小 (MB)</translation>
|
<translation>写入缓冲区大小 (MB)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="612"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="612"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="761"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="761"/>
|
||||||
<source>#Header</source>
|
<source>#Header</source>
|
||||||
<translation type="unfinished">头伪装</translation>
|
<translation>头伪装</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="637"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="637"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="788"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="788"/>
|
||||||
<source>srtp (SRTP, FaceTime)</source>
|
<source>srtp (SRTP, FaceTime)</source>
|
||||||
<translation type="unfinished">srtp (SRTP, FaceTime)</translation>
|
<translation>srtp (SRTP, FaceTime)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="642"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="642"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="793"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="793"/>
|
||||||
<source>utp (BitTorrent)</source>
|
<source>utp (BitTorrent)</source>
|
||||||
<translation type="unfinished">utp (BitTorrent)</translation>
|
<translation>utp (BitTorrent)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="647"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="647"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="798"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="798"/>
|
||||||
<source>wechat-video (WeChat Video Message)</source>
|
<source>wechat-video (WeChat Video Message)</source>
|
||||||
<translation type="unfinished">wechat-video (WeChat Video Message)</translation>
|
<translation>wechat-video (WeChat Video Message)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="652"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="652"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="803"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="803"/>
|
||||||
<source>dtls (DTLS 1.2)</source>
|
<source>dtls (DTLS 1.2)</source>
|
||||||
<translation type="unfinished">dtls (DTLS 1.2)</translation>
|
<translation>dtls (DTLS 1.2)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="657"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="657"/>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="808"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="808"/>
|
||||||
<source>wireguard (WireGuard fake packets)</source>
|
<source>wireguard (WireGuard fake packets)</source>
|
||||||
<translation type="unfinished">wireguard (WireGuard fake packets)</translation>
|
<translation>wireguard (WireGuard fake packets)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="669"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="669"/>
|
||||||
<source>DomainSocket</source>
|
<source>DomainSocket</source>
|
||||||
<translation type="unfinished">DomainSocket</translation>
|
<translation>DomainSocket</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="694"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="694"/>
|
||||||
<source>QUIC</source>
|
<source>QUIC</source>
|
||||||
<translation type="unfinished">QUIC</translation>
|
<translation>QUIC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ConnectionEditWindow.ui" line="734"/>
|
<location filename="../src/w_ConnectionEditWindow.ui" line="734"/>
|
||||||
<source>#Key</source>
|
<source>#Key</source>
|
||||||
<translation type="unfinished">密钥</translation>
|
<translation>密钥</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -455,82 +455,82 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="20"/>
|
<location filename="../src/w_ImportConfig.ui" line="20"/>
|
||||||
<source>Import file</source>
|
<source>Import file</source>
|
||||||
<translation type="unfinished">导入文件</translation>
|
<translation>导入文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="28"/>
|
<location filename="../src/w_ImportConfig.ui" line="28"/>
|
||||||
<source>#ImportFrom</source>
|
<source>#ImportFrom</source>
|
||||||
<translation type="unfinished">导入源</translation>
|
<translation>导入源</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="36"/>
|
<location filename="../src/w_ImportConfig.ui" line="36"/>
|
||||||
<source>Existing File</source>
|
<source>Existing File</source>
|
||||||
<translation type="unfinished">现有文件</translation>
|
<translation>现有文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="41"/>
|
<location filename="../src/w_ImportConfig.ui" line="41"/>
|
||||||
<source>VMess Connection String</source>
|
<source>VMess Connection String</source>
|
||||||
<translation type="unfinished">VMess 连接字符串</translation>
|
<translation>VMess 连接字符串</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="51"/>
|
<location filename="../src/w_ImportConfig.ui" line="51"/>
|
||||||
<source>#FromFile</source>
|
<source>#FromFile</source>
|
||||||
<translation type="unfinished">从文件</translation>
|
<translation>从文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="57"/>
|
<location filename="../src/w_ImportConfig.ui" line="57"/>
|
||||||
<source>#Path</source>
|
<source>#Path</source>
|
||||||
<translation type="unfinished">路径</translation>
|
<translation>路径</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="73"/>
|
<location filename="../src/w_ImportConfig.ui" line="73"/>
|
||||||
<source>#SelectFile</source>
|
<source>#SelectFile</source>
|
||||||
<translation type="unfinished">选择文件</translation>
|
<translation>选择文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="82"/>
|
<location filename="../src/w_ImportConfig.ui" line="82"/>
|
||||||
<source>#Name</source>
|
<source>#Name</source>
|
||||||
<translation type="unfinished">名称</translation>
|
<translation>名称</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="92"/>
|
<location filename="../src/w_ImportConfig.ui" line="92"/>
|
||||||
<source>#Inbound</source>
|
<source>#Inbound</source>
|
||||||
<translation type="unfinished">入站设置</translation>
|
<translation>入站设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="101"/>
|
<location filename="../src/w_ImportConfig.ui" line="101"/>
|
||||||
<source>#UseCurrent</source>
|
<source>#UseCurrent</source>
|
||||||
<translation type="unfinished">使用现有设置</translation>
|
<translation>使用现有设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="111"/>
|
<location filename="../src/w_ImportConfig.ui" line="111"/>
|
||||||
<source>#UseImported</source>
|
<source>#UseImported</source>
|
||||||
<translation type="unfinished">使用导入的设置</translation>
|
<translation>使用导入的设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="123"/>
|
<location filename="../src/w_ImportConfig.ui" line="123"/>
|
||||||
<source>#From VMess Connection String</source>
|
<source>#From VMess Connection String</source>
|
||||||
<translation type="unfinished">从 VMess 连接字符串</translation>
|
<translation>从 VMess 连接字符串</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.ui" line="129"/>
|
<location filename="../src/w_ImportConfig.ui" line="129"/>
|
||||||
<source>#VMess Connection String</source>
|
<source>#VMess Connection String</source>
|
||||||
<translation type="unfinished">VMess 连接字符串</translation>
|
<translation>VMess 连接字符串</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.cpp" line="38"/>
|
<location filename="../src/w_ImportConfig.cpp" line="38"/>
|
||||||
<source>OpenConfigFile</source>
|
<source>OpenConfigFile</source>
|
||||||
<translation type="unfinished">打开配置文件</translation>
|
<translation>打开配置文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
||||||
<source>ImportConfig</source>
|
<source>ImportConfig</source>
|
||||||
<translation type="unfinished">导入配置</translation>
|
<translation>导入配置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
<location filename="../src/w_ImportConfig.cpp" line="125"/>
|
||||||
<source>CannotGenerateConfig</source>
|
<source>CannotGenerateConfig</source>
|
||||||
<translation type="unfinished">无法生成配置文件</translation>
|
<translation>无法生成配置文件</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -539,147 +539,147 @@
|
|||||||
<location filename="../src/w_MainWindow.ui" line="26"/>
|
<location filename="../src/w_MainWindow.ui" line="26"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="25"/>
|
<location filename="../src/w_MainWindow.cpp" line="25"/>
|
||||||
<source>Hv2ray</source>
|
<source>Hv2ray</source>
|
||||||
<translation type="unfinished">Hv2ray</translation>
|
<translation>Hv2ray</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="46"/>
|
<location filename="../src/w_MainWindow.ui" line="46"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="35"/>
|
<location filename="../src/w_MainWindow.cpp" line="35"/>
|
||||||
<source>#Start</source>
|
<source>#Start</source>
|
||||||
<translation type="unfinished">启动</translation>
|
<translation>启动</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="53"/>
|
<location filename="../src/w_MainWindow.ui" line="53"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="36"/>
|
<location filename="../src/w_MainWindow.cpp" line="36"/>
|
||||||
<source>#Stop</source>
|
<source>#Stop</source>
|
||||||
<translation type="unfinished">停止</translation>
|
<translation>停止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="60"/>
|
<location filename="../src/w_MainWindow.ui" line="60"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="37"/>
|
<location filename="../src/w_MainWindow.cpp" line="37"/>
|
||||||
<source>#Restart</source>
|
<source>#Restart</source>
|
||||||
<translation type="unfinished">重新启动</translation>
|
<translation>重新启动</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="70"/>
|
<location filename="../src/w_MainWindow.ui" line="70"/>
|
||||||
<source>#ClearLog</source>
|
<source>#ClearLog</source>
|
||||||
<translation type="unfinished">清除日志</translation>
|
<translation>清除日志</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="97"/>
|
<location filename="../src/w_MainWindow.ui" line="97"/>
|
||||||
<source>#HostList</source>
|
<source>#HostList</source>
|
||||||
<translation type="unfinished">服务器列表</translation>
|
<translation>服务器列表</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="140"/>
|
<location filename="../src/w_MainWindow.ui" line="140"/>
|
||||||
<source>#ConfigDetail</source>
|
<source>#ConfigDetail</source>
|
||||||
<translation type="unfinished">配置详细信息</translation>
|
<translation>配置详细信息</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="152"/>
|
<location filename="../src/w_MainWindow.ui" line="152"/>
|
||||||
<source>#Host</source>
|
<source>#Host</source>
|
||||||
<translation type="unfinished">域名</translation>
|
<translation>域名</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="166"/>
|
<location filename="../src/w_MainWindow.ui" line="166"/>
|
||||||
<source>#Port</source>
|
<source>#Port</source>
|
||||||
<translation type="unfinished">端口</translation>
|
<translation>端口</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="180"/>
|
<location filename="../src/w_MainWindow.ui" line="180"/>
|
||||||
<source>#UUID</source>
|
<source>#UUID</source>
|
||||||
<translation type="unfinished">UUID</translation>
|
<translation>UUID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="194"/>
|
<location filename="../src/w_MainWindow.ui" line="194"/>
|
||||||
<source>#Transport</source>
|
<source>#Transport</source>
|
||||||
<translation type="unfinished">传输设置</translation>
|
<translation>传输设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="214"/>
|
<location filename="../src/w_MainWindow.ui" line="214"/>
|
||||||
<location filename="../src/w_MainWindow.ui" line="221"/>
|
<location filename="../src/w_MainWindow.ui" line="221"/>
|
||||||
<source>#ConnectionSettings</source>
|
<source>#ConnectionSettings</source>
|
||||||
<translation type="unfinished">连接设置</translation>
|
<translation>连接设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="252"/>
|
<location filename="../src/w_MainWindow.ui" line="252"/>
|
||||||
<source>#File</source>
|
<source>#File</source>
|
||||||
<translation type="unfinished">文件</translation>
|
<translation>文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="256"/>
|
<location filename="../src/w_MainWindow.ui" line="256"/>
|
||||||
<source>#NewConnection</source>
|
<source>#NewConnection</source>
|
||||||
<translation type="unfinished">新建连接</translation>
|
<translation>新建连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="271"/>
|
<location filename="../src/w_MainWindow.ui" line="271"/>
|
||||||
<source>#ManuallyInput</source>
|
<source>#ManuallyInput</source>
|
||||||
<translation type="unfinished">手动输入配置</translation>
|
<translation>手动输入配置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="276"/>
|
<location filename="../src/w_MainWindow.ui" line="276"/>
|
||||||
<source>#ImportConnection</source>
|
<source>#ImportConnection</source>
|
||||||
<translation type="unfinished">导入配置文件</translation>
|
<translation>导入配置文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="281"/>
|
<location filename="../src/w_MainWindow.ui" line="281"/>
|
||||||
<source>#Exit</source>
|
<source>#Exit</source>
|
||||||
<translation type="unfinished">退出</translation>
|
<translation>退出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.ui" line="286"/>
|
<location filename="../src/w_MainWindow.ui" line="286"/>
|
||||||
<source>#Preferences</source>
|
<source>#Preferences</source>
|
||||||
<translation type="unfinished">首选项</translation>
|
<translation>首选项</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="33"/>
|
<location filename="../src/w_MainWindow.cpp" line="33"/>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="236"/>
|
<location filename="../src/w_MainWindow.cpp" line="236"/>
|
||||||
<source>#Hide</source>
|
<source>#Hide</source>
|
||||||
<translation type="unfinished">隐藏</translation>
|
<translation>隐藏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="34"/>
|
<location filename="../src/w_MainWindow.cpp" line="34"/>
|
||||||
<source>#Quit</source>
|
<source>#Quit</source>
|
||||||
<translation type="unfinished">退出</translation>
|
<translation>退出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_MainWindow.cpp" line="239"/>
|
<location filename="../src/w_MainWindow.cpp" line="239"/>
|
||||||
<source>#Show</source>
|
<source>#Show</source>
|
||||||
<translation type="unfinished">显示</translation>
|
<translation>显示</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Hv2ray::Ui::PrefrencesWindow</name>
|
<name>Hv2ray::Ui::PrefrencesWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="20"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="20"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="142"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="66"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="177"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="99"/>
|
||||||
<source>Prefrences</source>
|
<source>Prefrences</source>
|
||||||
<translation type="unfinished">首选项</translation>
|
<translation>首选项</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="26"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="26"/>
|
||||||
<source>#General</source>
|
<source>#General</source>
|
||||||
<translation type="unfinished">一般</translation>
|
<translation>一般</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="34"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="34"/>
|
||||||
<source>#Language</source>
|
<source>#Language</source>
|
||||||
<translation type="unfinished">语言</translation>
|
<translation>语言</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="48"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="48"/>
|
||||||
<source>zh-CN</source>
|
<source>zh-CN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="53"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="53"/>
|
||||||
<source>en-US</source>
|
<source>en-US</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="61"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="61"/>
|
||||||
<source>#RunAsRoot</source>
|
<source>#RunAsRoot</source>
|
||||||
<translation type="unfinished">使用 root 启动</translation>
|
<translation>使用 root 启动</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="68"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="68"/>
|
||||||
@ -690,7 +690,7 @@
|
|||||||
<location filename="../src/w_PrefrencesWindow.ui" line="270"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="270"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="298"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="298"/>
|
||||||
<source>#Enabled</source>
|
<source>#Enabled</source>
|
||||||
<translation type="unfinished">启用</translation>
|
<translation>启用</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="75"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="75"/>
|
||||||
@ -769,37 +769,35 @@
|
|||||||
<location filename="../src/w_PrefrencesWindow.ui" line="227"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="227"/>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="291"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="291"/>
|
||||||
<source>#Password</source>
|
<source>#Password</source>
|
||||||
<translation type="unfinished">密码</translation>
|
<translation>密码</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="250"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="250"/>
|
||||||
<source>SOCKS</source>
|
<source>SOCKS</source>
|
||||||
<translation type="unfinished">SOCKS</translation>
|
<translation>SOCKS</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.ui" line="263"/>
|
<location filename="../src/w_PrefrencesWindow.ui" line="263"/>
|
||||||
<source>9001</source>
|
<source>9001</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="135"/>
|
|
||||||
<source>#Prefrences</source>
|
<source>#Prefrences</source>
|
||||||
<translation type="unfinished">首选项</translation>
|
<translation type="obsolete">首选项</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="135"/>
|
|
||||||
<source>#CannotOpenConfigFile</source>
|
<source>#CannotOpenConfigFile</source>
|
||||||
<translation type="unfinished">无法打开配置文件</translation>
|
<translation type="obsolete">无法打开配置文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="142"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="66"/>
|
||||||
<source>PortNumbersCannotBeSame</source>
|
<source>PortNumbersCannotBeSame</source>
|
||||||
<translation type="unfinished">端口号不能相同</translation>
|
<translation>端口号不能相同</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/w_PrefrencesWindow.cpp" line="177"/>
|
<location filename="../src/w_PrefrencesWindow.cpp" line="99"/>
|
||||||
<source>RunAsRootNotOnWindows</source>
|
<source>RunAsRootNotOnWindows</source>
|
||||||
<translation type="unfinished">Windows 平台不支持这个选项</translation>
|
<translation>Windows 平台不支持这个选项</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -1070,12 +1068,12 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QObject</name>
|
<name>QObject</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/main.cpp" line="99"/>
|
<location filename="../src/main.cpp" line="73"/>
|
||||||
<source>Hv2Ray</source>
|
<source>Hv2Ray</source>
|
||||||
<translation>Hv2ray</translation>
|
<translation>Hv2ray</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/main.cpp" line="99"/>
|
<location filename="../src/main.cpp" line="73"/>
|
||||||
<source>AnotherInstanceRunning</source>
|
<source>AnotherInstanceRunning</source>
|
||||||
<translation>另一个实例正在运行</translation>
|
<translation>另一个实例正在运行</translation>
|
||||||
</message>
|
</message>
|
||||||
|
Loading…
Reference in New Issue
Block a user