mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
add: make stream settings standalone and added tlsSettings
This commit is contained in:
parent
354f3ca750
commit
5c95d5a8b8
@ -1 +1 @@
|
|||||||
3513
|
3560
|
||||||
|
19
Qv2ray.pro
19
Qv2ray.pro
@ -13,7 +13,7 @@ TEMPLATE = app
|
|||||||
_BUILD_NUMBER=$$cat(Build.Counter)
|
_BUILD_NUMBER=$$cat(Build.Counter)
|
||||||
VERSION = 2.0.1.$$_BUILD_NUMBER
|
VERSION = 2.0.1.$$_BUILD_NUMBER
|
||||||
|
|
||||||
no_increase_build_number {
|
no_increase_build_number | qmake_lupdate {
|
||||||
message("Build.Counter will not be increased")
|
message("Build.Counter will not be increased")
|
||||||
} else {
|
} else {
|
||||||
_BUILD_NUMBER = $$num_add($$_BUILD_NUMBER, 1)
|
_BUILD_NUMBER = $$num_add($$_BUILD_NUMBER, 1)
|
||||||
@ -144,11 +144,14 @@ Qv2rayAddSource(ui, _, w_MainWindow_extra, cpp)
|
|||||||
Qv2rayAddSource(ui, _, w_PreferencesWindow, cpp, hpp, ui)
|
Qv2rayAddSource(ui, _, w_PreferencesWindow, cpp, hpp, ui)
|
||||||
Qv2rayAddSource(ui, _, w_ScreenShot_Core, cpp, hpp, ui)
|
Qv2rayAddSource(ui, _, w_ScreenShot_Core, cpp, hpp, ui)
|
||||||
Qv2rayAddSource(ui, _, w_SubscriptionManager, cpp, hpp, ui)
|
Qv2rayAddSource(ui, _, w_SubscriptionManager, cpp, hpp, ui)
|
||||||
|
Qv2rayAddSource(ui, widgets, StreamSettingsWidget, cpp, hpp, ui)
|
||||||
|
|
||||||
SOURCES += $$PWD/src/main.cpp
|
SOURCES += $$PWD/src/main.cpp
|
||||||
|
HEADERS +=
|
||||||
|
FORMS +=
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/src
|
INCLUDEPATH += $$PWD/src
|
||||||
RESOURCES += \
|
RESOURCES += resources.qrc
|
||||||
resources.qrc
|
|
||||||
|
|
||||||
# Fine......
|
# Fine......
|
||||||
message(" ")
|
message(" ")
|
||||||
@ -294,6 +297,7 @@ HEADERS += \
|
|||||||
$$PWD/3rdparty/qhttpserver/src/qhttpserver.h \
|
$$PWD/3rdparty/qhttpserver/src/qhttpserver.h \
|
||||||
$$PWD/3rdparty/qhttpserver/src/qhttpserverapi.h \
|
$$PWD/3rdparty/qhttpserver/src/qhttpserverapi.h \
|
||||||
$$PWD/3rdparty/qhttpserver/src/qhttpserverfwd.h
|
$$PWD/3rdparty/qhttpserver/src/qhttpserverfwd.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/3rdparty/qhttpserver/src/qhttpconnection.cpp \
|
$$PWD/3rdparty/qhttpserver/src/qhttpconnection.cpp \
|
||||||
$$PWD/3rdparty/qhttpserver/src/qhttprequest.cpp \
|
$$PWD/3rdparty/qhttpserver/src/qhttprequest.cpp \
|
||||||
@ -359,6 +363,15 @@ with_metainfo {
|
|||||||
DEFINES += WITH_FLATHUB_CONFIG_PATH
|
DEFINES += WITH_FLATHUB_CONFIG_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qmake_lupdate {
|
||||||
|
message(" ")
|
||||||
|
message("Running lupdate...")
|
||||||
|
message(" ")
|
||||||
|
lupdate_output = $$system(lupdate $$SOURCES $$HEADERS $$FORMS -ts $$PWD/$$TRANSLATIONS -no-ui-lines)
|
||||||
|
message($$lupdate_output)
|
||||||
|
message("lupdate finished.")
|
||||||
|
}
|
||||||
|
|
||||||
message(" ")
|
message(" ")
|
||||||
message("This Qv2ray build contains: ")
|
message("This Qv2ray build contains: ")
|
||||||
message(" --> $${size(SOURCES)} source files")
|
message(" --> $${size(SOURCES)} source files")
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <QString>
|
||||||
|
#include <QList>
|
||||||
|
#include <QMap>
|
||||||
#include "3rdparty/x2struct/x2struct.hpp"
|
#include "3rdparty/x2struct/x2struct.hpp"
|
||||||
|
|
||||||
namespace Qv2ray::base::objects
|
namespace Qv2ray::base::objects
|
||||||
|
@ -13,18 +13,24 @@ OutboundEditor::OutboundEditor(QWidget *parent)
|
|||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
Tag(""),
|
Tag(""),
|
||||||
Mux(),
|
Mux(),
|
||||||
stream(),
|
|
||||||
vmess(),
|
vmess(),
|
||||||
shadowsocks()
|
shadowsocks()
|
||||||
{
|
{
|
||||||
REGISTER_WINDOW
|
REGISTER_WINDOW
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
//
|
||||||
|
ssWidget = new StreamSettingsWidget(this);
|
||||||
|
transportFrame->addWidget(ssWidget);
|
||||||
|
//
|
||||||
shadowsocks = ShadowSocksServerObject();
|
shadowsocks = ShadowSocksServerObject();
|
||||||
socks = SocksServerObject();
|
socks = SocksServerObject();
|
||||||
socks.users.push_back(SocksServerObject::UserObject());
|
|
||||||
vmess = VMessServerObject();
|
vmess = VMessServerObject();
|
||||||
|
socks.users.push_back(SocksServerObject::UserObject());
|
||||||
vmess.users.push_back(VMessServerObject::UserObject());
|
vmess.users.push_back(VMessServerObject::UserObject());
|
||||||
stream = StreamSettingsObject();
|
//
|
||||||
|
auto stream = StreamSettingsObject();
|
||||||
|
ssWidget->SetStreamObject(stream);
|
||||||
|
//
|
||||||
OutboundType = "vmess";
|
OutboundType = "vmess";
|
||||||
Tag = OUTBOUND_TAG_PROXY;
|
Tag = OUTBOUND_TAG_PROXY;
|
||||||
useFProxy = false;
|
useFProxy = false;
|
||||||
@ -40,10 +46,10 @@ OutboundEditor::OutboundEditor(OUTBOUND outboundEntry, QWidget *parent) : Outbou
|
|||||||
OutboundType = outboundEntry["protocol"].toString();
|
OutboundType = outboundEntry["protocol"].toString();
|
||||||
Mux = outboundEntry["mux"].toObject();
|
Mux = outboundEntry["mux"].toObject();
|
||||||
useFProxy = outboundEntry[QV2RAY_USE_FPROXY_KEY].toBool(false);
|
useFProxy = outboundEntry[QV2RAY_USE_FPROXY_KEY].toBool(false);
|
||||||
|
ssWidget->SetStreamObject(StructFromJsonString<StreamSettingsObject>(JsonToString(outboundEntry["streamSettings"].toObject())));
|
||||||
|
|
||||||
if (OutboundType == "vmess") {
|
if (OutboundType == "vmess") {
|
||||||
vmess = StructFromJsonString<VMessServerObject>(JsonToString(outboundEntry["settings"].toObject()["vnext"].toArray().first().toObject()));
|
vmess = StructFromJsonString<VMessServerObject>(JsonToString(outboundEntry["settings"].toObject()["vnext"].toArray().first().toObject()));
|
||||||
stream = StructFromJsonString<StreamSettingsObject>(JsonToString(outboundEntry["streamSettings"].toObject()));
|
|
||||||
shadowsocks.port = vmess.port;
|
shadowsocks.port = vmess.port;
|
||||||
shadowsocks.address = vmess.address;
|
shadowsocks.address = vmess.address;
|
||||||
socks.address = vmess.address;
|
socks.address = vmess.address;
|
||||||
@ -87,6 +93,33 @@ QString OutboundEditor::GetFriendlyName()
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OUTBOUND OutboundEditor::GenerateConnectionJson()
|
||||||
|
{
|
||||||
|
OUTBOUNDSETTING settings;
|
||||||
|
auto streaming = JsonFromString(StructToJsonString(ssWidget->GetStreamSettings()));
|
||||||
|
|
||||||
|
if (OutboundType == "vmess") {
|
||||||
|
// VMess is only a ServerObject, and we need an array { "vnext": [] }
|
||||||
|
QJsonArray vnext;
|
||||||
|
vnext.append(GetRootObject(vmess));
|
||||||
|
settings.insert("vnext", vnext);
|
||||||
|
} else if (OutboundType == "shadowsocks") {
|
||||||
|
streaming = QJsonObject();
|
||||||
|
QJsonArray servers;
|
||||||
|
servers.append(GetRootObject(shadowsocks));
|
||||||
|
settings["servers"] = servers;
|
||||||
|
} else if (OutboundType == "socks") {
|
||||||
|
streaming = QJsonObject();
|
||||||
|
QJsonArray servers;
|
||||||
|
servers.append(GetRootObject(socks));
|
||||||
|
settings["servers"] = servers;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto root = GenerateOutboundEntry(OutboundType, settings, streaming, Mux, "0.0.0.0", Tag);
|
||||||
|
root[QV2RAY_USE_FPROXY_KEY] = useFProxy;
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
void OutboundEditor::ReloadGUI()
|
void OutboundEditor::ReloadGUI()
|
||||||
{
|
{
|
||||||
if (OutboundType == "vmess") {
|
if (OutboundType == "vmess") {
|
||||||
@ -96,49 +129,6 @@ void OutboundEditor::ReloadGUI()
|
|||||||
idLineEdit->setText(vmess.users.front().id);
|
idLineEdit->setText(vmess.users.front().id);
|
||||||
alterLineEdit->setValue(vmess.users.front().alterId);
|
alterLineEdit->setValue(vmess.users.front().alterId);
|
||||||
securityCombo->setCurrentText(vmess.users.front().security);
|
securityCombo->setCurrentText(vmess.users.front().security);
|
||||||
tranportCombo->setCurrentText(stream.network);
|
|
||||||
tlsCB->setChecked(stream.security == "tls");
|
|
||||||
// TCP
|
|
||||||
tcpHeaderTypeCB->setCurrentText(stream.tcpSettings.header.type);
|
|
||||||
tcpRequestTxt->setPlainText(StructToJsonString(stream.tcpSettings.header.request));
|
|
||||||
tcpRespTxt->setPlainText(StructToJsonString(stream.tcpSettings.header.response));
|
|
||||||
// HTTP
|
|
||||||
QString allHosts;
|
|
||||||
|
|
||||||
for (auto host : stream.httpSettings.host) {
|
|
||||||
allHosts = allHosts + host + "\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
httpHostTxt->setPlainText(allHosts);
|
|
||||||
httpPathTxt->setText(stream.httpSettings.path);
|
|
||||||
// WS
|
|
||||||
wsPathTxt->setText(stream.wsSettings.path);
|
|
||||||
QString wsHeaders;
|
|
||||||
|
|
||||||
for (auto item = stream.wsSettings.headers.begin(); item != stream.wsSettings.headers.end(); item++) {
|
|
||||||
wsHeaders += item.key() + "|" + item.value() + NEWLINE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wsHeadersTxt->setPlainText(wsHeaders);
|
|
||||||
// mKCP
|
|
||||||
kcpMTU->setValue(stream.kcpSettings.mtu);
|
|
||||||
kcpTTI->setValue(stream.kcpSettings.tti);
|
|
||||||
kcpHeaderType->setCurrentText(stream.kcpSettings.header.type);
|
|
||||||
kcpCongestionCB->setChecked(stream.kcpSettings.congestion);
|
|
||||||
kcpReadBufferSB->setValue(stream.kcpSettings.readBufferSize);
|
|
||||||
kcpUploadCapacSB->setValue(stream.kcpSettings.uplinkCapacity);
|
|
||||||
kcpDownCapacitySB->setValue(stream.kcpSettings.downlinkCapacity);
|
|
||||||
kcpWriteBufferSB->setValue(stream.kcpSettings.writeBufferSize);
|
|
||||||
// DS
|
|
||||||
dsPathTxt->setText(stream.dsSettings.path);
|
|
||||||
// QUIC
|
|
||||||
quicKeyTxt->setText(stream.quicSettings.key);
|
|
||||||
quicSecurityCB->setCurrentText(stream.quicSettings.security);
|
|
||||||
quicHeaderTypeCB->setCurrentText(stream.quicSettings.header.type);
|
|
||||||
// SOCKOPT
|
|
||||||
tProxyCB->setCurrentText(stream.sockopt.tproxy);
|
|
||||||
tcpFastOpenCB->setChecked(stream.sockopt.tcpFastOpen);
|
|
||||||
soMarkSpinBox->setValue(stream.sockopt.mark);
|
|
||||||
} else if (OutboundType == "shadowsocks") {
|
} else if (OutboundType == "shadowsocks") {
|
||||||
outBoundTypeCombo->setCurrentIndex(1);
|
outBoundTypeCombo->setCurrentIndex(1);
|
||||||
// ShadowSocks Configs
|
// ShadowSocks Configs
|
||||||
@ -201,181 +191,33 @@ void OutboundEditor::on_securityCombo_currentIndexChanged(const QString &arg1)
|
|||||||
vmess.users.front().security = arg1;
|
vmess.users.front().security = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundEditor::on_tranportCombo_currentIndexChanged(const QString &arg1)
|
void OutboundEditor::on_tagTxt_textEdited(const QString &arg1)
|
||||||
{
|
{
|
||||||
stream.network = arg1;
|
Tag = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundEditor::on_httpPathTxt_textEdited(const QString &arg1)
|
void OutboundEditor::on_muxEnabledCB_stateChanged(int arg1)
|
||||||
{
|
{
|
||||||
stream.httpSettings.path = arg1;
|
Mux["enabled"] = arg1 == Qt::Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundEditor::on_httpHostTxt_textChanged()
|
void OutboundEditor::on_muxConcurrencyTxt_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
try {
|
Mux["concurrency"] = arg1;
|
||||||
QStringList hosts = httpHostTxt->toPlainText().replace("\r", "").split("\n");
|
|
||||||
stream.httpSettings.host.clear();
|
|
||||||
|
|
||||||
for (auto host : hosts) {
|
|
||||||
if (!host.trimmed().isEmpty()) {
|
|
||||||
stream.httpSettings.host.push_back(host.trimmed());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BLACK(httpHostTxt)
|
|
||||||
} catch (...) {
|
|
||||||
RED(httpHostTxt)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundEditor::on_wsHeadersTxt_textChanged()
|
void OutboundEditor::on_alterLineEdit_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
try {
|
if (vmess.users.empty()) vmess.users.push_back(VMessServerObject::UserObject());
|
||||||
QStringList headers = SplitLines(wsHeadersTxt->toPlainText());
|
|
||||||
stream.wsSettings.headers.clear();
|
|
||||||
|
|
||||||
for (auto header : headers) {
|
vmess.users.front().alterId = arg1;
|
||||||
if (header.isEmpty()) continue;
|
|
||||||
|
|
||||||
auto index = header.indexOf("|");
|
|
||||||
|
|
||||||
if (index < 0) throw "fast fail to set RED color";
|
|
||||||
|
|
||||||
auto key = header.left(index);
|
|
||||||
auto value = header.right(header.length() - index - 1);
|
|
||||||
stream.wsSettings.headers[key] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
BLACK(wsHeadersTxt)
|
|
||||||
} catch (...) {
|
|
||||||
RED(wsHeadersTxt)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OutboundEditor::on_useFPCB_stateChanged(int arg1)
|
||||||
void OutboundEditor::on_tcpRequestDefBtn_clicked()
|
|
||||||
{
|
{
|
||||||
tcpRequestTxt->clear();
|
useFProxy = arg1 == Qt::Checked;
|
||||||
tcpRequestTxt->insertPlainText("{\"version\":\"1.1\",\"method\":\"GET\",\"path\":[\"/\"],\"headers\":"
|
|
||||||
"{\"Host\":[\"www.baidu.com\",\"www.bing.com\"],\"User-Agent\":"
|
|
||||||
"[\"Mozilla/5.0 (Windows NT 10.0; WOW64) "
|
|
||||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36\","
|
|
||||||
"\"Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) "
|
|
||||||
"AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 "
|
|
||||||
"Safari/601.1.46\"],\"Accept-Encoding\":[\"gzip, deflate\"],"
|
|
||||||
"\"Connection\":[\"keep-alive\"],\"Pragma\":\"no-cache\"}}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundEditor::on_tcpRespDefBtn_clicked()
|
|
||||||
{
|
|
||||||
tcpRespTxt->clear();
|
|
||||||
tcpRespTxt->insertPlainText("{\"version\":\"1.1\",\"status\":\"200\",\"reason\":\"OK\",\"headers\":{\"Content-Type\":[\"application/octet-stream\",\"video/mpeg\"],\"Transfer-Encoding\":[\"chunked\"],\"Connection\":[\"keep-alive\"],\"Pragma\":\"no-cache\"}}");
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTBOUND OutboundEditor::GenerateConnectionJson()
|
|
||||||
{
|
|
||||||
OUTBOUNDSETTING settings;
|
|
||||||
auto streaming = JsonFromString(StructToJsonString(stream));
|
|
||||||
|
|
||||||
if (OutboundType == "vmess") {
|
|
||||||
// VMess is only a ServerObject, and we need an array { "vnext": [] }
|
|
||||||
QJsonArray vnext;
|
|
||||||
vnext.append(GetRootObject(vmess));
|
|
||||||
settings.insert("vnext", vnext);
|
|
||||||
} else if (OutboundType == "shadowsocks") {
|
|
||||||
streaming = QJsonObject();
|
|
||||||
QJsonArray servers;
|
|
||||||
servers.append(GetRootObject(shadowsocks));
|
|
||||||
settings["servers"] = servers;
|
|
||||||
} else if (OutboundType == "socks") {
|
|
||||||
streaming = QJsonObject();
|
|
||||||
QJsonArray servers;
|
|
||||||
servers.append(GetRootObject(socks));
|
|
||||||
settings["servers"] = servers;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto root = GenerateOutboundEntry(OutboundType, settings, streaming, Mux, "0.0.0.0", Tag);
|
|
||||||
root[QV2RAY_USE_FPROXY_KEY] = useFProxy;
|
|
||||||
return root;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_tlsCB_stateChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.security = arg1 == Qt::Checked ? "tls" : "none";
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_soMarkSpinBox_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.sockopt.mark = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_tcpFastOpenCB_stateChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.sockopt.tcpFastOpen = arg1 == Qt::Checked;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_tProxyCB_currentIndexChanged(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.sockopt.tproxy = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_quicSecurityCB_currentTextChanged(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.quicSettings.security = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_quicKeyTxt_textEdited(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.quicSettings.key = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_quicHeaderTypeCB_currentIndexChanged(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.quicSettings.header.type = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_tcpHeaderTypeCB_currentIndexChanged(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.tcpSettings.header.type = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_wsPathTxt_textEdited(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.wsSettings.path = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpMTU_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.mtu = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpTTI_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.tti = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpUploadCapacSB_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.uplinkCapacity = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpCongestionCB_stateChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.congestion = arg1 == Qt::Checked;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpDownCapacitySB_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.downlinkCapacity = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpReadBufferSB_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.readBufferSize = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpWriteBufferSB_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.writeBufferSize = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_kcpHeaderType_currentTextChanged(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.kcpSettings.header.type = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_tranportCombo_currentIndexChanged(int index)
|
|
||||||
{
|
|
||||||
v2rayStackView->setCurrentIndex(index);
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_dsPathTxt_textEdited(const QString &arg1)
|
|
||||||
{
|
|
||||||
stream.dsSettings.path = arg1;
|
|
||||||
}
|
|
||||||
void OutboundEditor::on_outBoundTypeCombo_currentIndexChanged(int index)
|
void OutboundEditor::on_outBoundTypeCombo_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
outboundTypeStackView->setCurrentIndex(index);
|
outboundTypeStackView->setCurrentIndex(index);
|
||||||
@ -416,48 +258,3 @@ void OutboundEditor::on_socks_PasswordTxt_textEdited(const QString &arg1)
|
|||||||
{
|
{
|
||||||
socks.users.front().pass = arg1;
|
socks.users.front().pass = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundEditor::on_tcpRequestEditBtn_clicked()
|
|
||||||
{
|
|
||||||
JsonEditor w(JsonFromString(tcpRequestTxt->toPlainText()), this);
|
|
||||||
auto rString = JsonToString(w.OpenEditor());
|
|
||||||
tcpRequestTxt->setPlainText(rString);
|
|
||||||
auto tcpReqObject = StructFromJsonString<HTTPRequestObject>(rString);
|
|
||||||
stream.tcpSettings.header.request = tcpReqObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_tcpResponseEditBtn_clicked()
|
|
||||||
{
|
|
||||||
JsonEditor w(JsonFromString(tcpRespTxt->toPlainText()), this);
|
|
||||||
auto rString = JsonToString(w.OpenEditor());
|
|
||||||
tcpRespTxt->setPlainText(rString);
|
|
||||||
auto tcpRspObject = StructFromJsonString<HTTPResponseObject>(rString);
|
|
||||||
stream.tcpSettings.header.response = tcpRspObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_tagTxt_textEdited(const QString &arg1)
|
|
||||||
{
|
|
||||||
Tag = arg1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_muxEnabledCB_stateChanged(int arg1)
|
|
||||||
{
|
|
||||||
Mux["enabled"] = arg1 == Qt::Checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_muxConcurrencyTxt_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
Mux["concurrency"] = arg1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_alterLineEdit_valueChanged(int arg1)
|
|
||||||
{
|
|
||||||
if (vmess.users.empty()) vmess.users.push_back(VMessServerObject::UserObject());
|
|
||||||
|
|
||||||
vmess.users.front().alterId = arg1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutboundEditor::on_useFPCB_stateChanged(int arg1)
|
|
||||||
{
|
|
||||||
useFProxy = arg1 == Qt::Checked;
|
|
||||||
}
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "base/Qv2rayBase.hpp"
|
#include "base/Qv2rayBase.hpp"
|
||||||
#include "ui_w_OutboundEditor.h"
|
#include "ui_w_OutboundEditor.h"
|
||||||
|
#include "ui/widgets/StreamSettingsWidget.hpp"
|
||||||
|
|
||||||
class OutboundEditor : public QDialog, private Ui::OutboundEditor
|
class OutboundEditor : public QDialog, private Ui::OutboundEditor
|
||||||
{
|
{
|
||||||
@ -24,57 +25,15 @@ class OutboundEditor : public QDialog, private Ui::OutboundEditor
|
|||||||
|
|
||||||
void on_idLineEdit_textEdited(const QString &arg1);
|
void on_idLineEdit_textEdited(const QString &arg1);
|
||||||
|
|
||||||
void on_securityCombo_currentIndexChanged(const QString &arg1);
|
void on_tagTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
void on_tranportCombo_currentIndexChanged(const QString &arg1);
|
void on_muxEnabledCB_stateChanged(int arg1);
|
||||||
|
|
||||||
void on_httpPathTxt_textEdited(const QString &arg1);
|
void on_muxConcurrencyTxt_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_httpHostTxt_textChanged();
|
void on_alterLineEdit_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_wsHeadersTxt_textChanged();
|
void on_useFPCB_stateChanged(int arg1);
|
||||||
|
|
||||||
void on_tcpRequestDefBtn_clicked();
|
|
||||||
|
|
||||||
void on_tcpRespDefBtn_clicked();
|
|
||||||
|
|
||||||
void on_tlsCB_stateChanged(int arg1);
|
|
||||||
|
|
||||||
void on_soMarkSpinBox_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_tcpFastOpenCB_stateChanged(int arg1);
|
|
||||||
|
|
||||||
void on_tProxyCB_currentIndexChanged(const QString &arg1);
|
|
||||||
|
|
||||||
void on_quicSecurityCB_currentTextChanged(const QString &arg1);
|
|
||||||
|
|
||||||
void on_quicKeyTxt_textEdited(const QString &arg1);
|
|
||||||
|
|
||||||
void on_quicHeaderTypeCB_currentIndexChanged(const QString &arg1);
|
|
||||||
|
|
||||||
void on_tcpHeaderTypeCB_currentIndexChanged(const QString &arg1);
|
|
||||||
|
|
||||||
void on_wsPathTxt_textEdited(const QString &arg1);
|
|
||||||
|
|
||||||
void on_kcpMTU_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpTTI_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpUploadCapacSB_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpCongestionCB_stateChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpDownCapacitySB_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpReadBufferSB_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpWriteBufferSB_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_kcpHeaderType_currentTextChanged(const QString &arg1);
|
|
||||||
|
|
||||||
void on_tranportCombo_currentIndexChanged(int index);
|
|
||||||
|
|
||||||
void on_dsPathTxt_textEdited(const QString &arg1);
|
|
||||||
|
|
||||||
void on_outBoundTypeCombo_currentIndexChanged(int index);
|
void on_outBoundTypeCombo_currentIndexChanged(int index);
|
||||||
|
|
||||||
@ -92,19 +51,7 @@ class OutboundEditor : public QDialog, private Ui::OutboundEditor
|
|||||||
|
|
||||||
void on_socks_PasswordTxt_textEdited(const QString &arg1);
|
void on_socks_PasswordTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
void on_tcpRequestEditBtn_clicked();
|
void on_securityCombo_currentIndexChanged(const QString &arg1);
|
||||||
|
|
||||||
void on_tcpResponseEditBtn_clicked();
|
|
||||||
|
|
||||||
void on_tagTxt_textEdited(const QString &arg1);
|
|
||||||
|
|
||||||
void on_muxEnabledCB_stateChanged(int arg1);
|
|
||||||
|
|
||||||
void on_muxConcurrencyTxt_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_alterLineEdit_valueChanged(int arg1);
|
|
||||||
|
|
||||||
void on_useFPCB_stateChanged(int arg1);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString Tag;
|
QString Tag;
|
||||||
@ -117,9 +64,10 @@ class OutboundEditor : public QDialog, private Ui::OutboundEditor
|
|||||||
//
|
//
|
||||||
// Connection Configs
|
// Connection Configs
|
||||||
QString OutboundType;
|
QString OutboundType;
|
||||||
StreamSettingsObject stream;
|
//
|
||||||
VMessServerObject vmess;
|
VMessServerObject vmess;
|
||||||
ShadowSocksServerObject shadowsocks;
|
ShadowSocksServerObject shadowsocks;
|
||||||
SocksServerObject socks;
|
SocksServerObject socks;
|
||||||
//
|
//
|
||||||
|
StreamSettingsWidget *ssWidget;
|
||||||
};
|
};
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -174,12 +174,8 @@ MainWindow::MainWindow(QWidget *parent):
|
|||||||
connect(action_Tray_Stop, &QAction::triggered, this, &MainWindow::on_stopButton_clicked);
|
connect(action_Tray_Stop, &QAction::triggered, this, &MainWindow::on_stopButton_clicked);
|
||||||
connect(action_Tray_Reconnect, &QAction::triggered, this, &MainWindow::on_reconnectButton_clicked);
|
connect(action_Tray_Reconnect, &QAction::triggered, this, &MainWindow::on_reconnectButton_clicked);
|
||||||
connect(action_Tray_Quit, &QAction::triggered, this, &MainWindow::quit);
|
connect(action_Tray_Quit, &QAction::triggered, this, &MainWindow::quit);
|
||||||
connect(action_Tray_SetSystemProxy, &QAction::triggered, [this]() {
|
connect(action_Tray_SetSystemProxy, &QAction::triggered, this, &MainWindow::MWSetSystemProxy);
|
||||||
this->MWSetSystemProxy();
|
connect(action_Tray_ClearSystemProxy, &QAction::triggered, this, &MainWindow::MWClearSystemProxy);
|
||||||
});
|
|
||||||
connect(action_Tray_ClearSystemProxy, &QAction::triggered, [this]() {
|
|
||||||
this->MWClearSystemProxy(true);
|
|
||||||
});
|
|
||||||
connect(hTray, &QSystemTrayIcon::activated, this, &MainWindow::on_activatedTray);
|
connect(hTray, &QSystemTrayIcon::activated, this, &MainWindow::on_activatedTray);
|
||||||
//
|
//
|
||||||
// Actions for right click the connection list
|
// Actions for right click the connection list
|
||||||
|
264
src/ui/widgets/StreamSettingsWidget.cpp
Normal file
264
src/ui/widgets/StreamSettingsWidget.cpp
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
#include "StreamSettingsWidget.hpp"
|
||||||
|
#include "common/QvHelpers.hpp"
|
||||||
|
#include "ui/editors/w_JsonEditor.hpp"
|
||||||
|
|
||||||
|
StreamSettingsWidget::StreamSettingsWidget(QWidget *parent) :
|
||||||
|
QWidget(parent)
|
||||||
|
{
|
||||||
|
setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamSettingsObject StreamSettingsWidget::GetStreamSettings()
|
||||||
|
{
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::SetStreamObject(StreamSettingsObject sso)
|
||||||
|
{
|
||||||
|
stream = sso;
|
||||||
|
//
|
||||||
|
transportCombo->setCurrentText(stream.network);
|
||||||
|
tlsCB->setChecked(stream.security == "tls");
|
||||||
|
// TCP
|
||||||
|
tcpHeaderTypeCB->setCurrentText(stream.tcpSettings.header.type);
|
||||||
|
tcpRequestTxt->setPlainText(StructToJsonString(stream.tcpSettings.header.request));
|
||||||
|
tcpRespTxt->setPlainText(StructToJsonString(stream.tcpSettings.header.response));
|
||||||
|
// HTTP
|
||||||
|
QString allHosts;
|
||||||
|
|
||||||
|
for (auto host : stream.httpSettings.host) {
|
||||||
|
allHosts = allHosts + host + "\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
httpHostTxt->setPlainText(allHosts);
|
||||||
|
httpPathTxt->setText(stream.httpSettings.path);
|
||||||
|
// WS
|
||||||
|
wsPathTxt->setText(stream.wsSettings.path);
|
||||||
|
QString wsHeaders;
|
||||||
|
|
||||||
|
for (auto item = stream.wsSettings.headers.begin(); item != stream.wsSettings.headers.end(); item++) {
|
||||||
|
wsHeaders += item.key() + "|" + item.value() + NEWLINE;
|
||||||
|
}
|
||||||
|
|
||||||
|
wsHeadersTxt->setPlainText(wsHeaders);
|
||||||
|
// mKCP
|
||||||
|
kcpMTU->setValue(stream.kcpSettings.mtu);
|
||||||
|
kcpTTI->setValue(stream.kcpSettings.tti);
|
||||||
|
kcpHeaderType->setCurrentText(stream.kcpSettings.header.type);
|
||||||
|
kcpCongestionCB->setChecked(stream.kcpSettings.congestion);
|
||||||
|
kcpReadBufferSB->setValue(stream.kcpSettings.readBufferSize);
|
||||||
|
kcpUploadCapacSB->setValue(stream.kcpSettings.uplinkCapacity);
|
||||||
|
kcpDownCapacitySB->setValue(stream.kcpSettings.downlinkCapacity);
|
||||||
|
kcpWriteBufferSB->setValue(stream.kcpSettings.writeBufferSize);
|
||||||
|
// DS
|
||||||
|
dsPathTxt->setText(stream.dsSettings.path);
|
||||||
|
// QUIC
|
||||||
|
quicKeyTxt->setText(stream.quicSettings.key);
|
||||||
|
quicSecurityCB->setCurrentText(stream.quicSettings.security);
|
||||||
|
quicHeaderTypeCB->setCurrentText(stream.quicSettings.header.type);
|
||||||
|
// SOCKOPT
|
||||||
|
tProxyCB->setCurrentText(stream.sockopt.tproxy);
|
||||||
|
tcpFastOpenCB->setChecked(stream.sockopt.tcpFastOpen);
|
||||||
|
soMarkSpinBox->setValue(stream.sockopt.mark);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_transportCombo_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
v2rayStackView->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_httpPathTxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.httpSettings.path = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_httpHostTxt_textChanged()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
QStringList hosts = httpHostTxt->toPlainText().replace("\r", "").split("\n");
|
||||||
|
stream.httpSettings.host.clear();
|
||||||
|
|
||||||
|
for (auto host : hosts) {
|
||||||
|
if (!host.trimmed().isEmpty()) {
|
||||||
|
stream.httpSettings.host.push_back(host.trimmed());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BLACK(httpHostTxt)
|
||||||
|
} catch (...) {
|
||||||
|
RED(httpHostTxt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_wsHeadersTxt_textChanged()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
QStringList headers = SplitLines(wsHeadersTxt->toPlainText());
|
||||||
|
stream.wsSettings.headers.clear();
|
||||||
|
|
||||||
|
for (auto header : headers) {
|
||||||
|
if (header.isEmpty()) continue;
|
||||||
|
|
||||||
|
auto index = header.indexOf("|");
|
||||||
|
|
||||||
|
if (index < 0) throw "fast fail to set RED color";
|
||||||
|
|
||||||
|
auto key = header.left(index);
|
||||||
|
auto value = header.right(header.length() - index - 1);
|
||||||
|
stream.wsSettings.headers[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
BLACK(wsHeadersTxt)
|
||||||
|
} catch (...) {
|
||||||
|
RED(wsHeadersTxt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tcpRequestDefBtn_clicked()
|
||||||
|
{
|
||||||
|
tcpRequestTxt->clear();
|
||||||
|
tcpRequestTxt->setPlainText("{\"version\":\"1.1\",\"method\":\"GET\",\"path\":[\"/\"],\"headers\":"
|
||||||
|
"{\"Host\":[\"www.baidu.com\",\"www.bing.com\"],\"User-Agent\":"
|
||||||
|
"[\"Mozilla/5.0 (Windows NT 10.0; WOW64) "
|
||||||
|
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36\","
|
||||||
|
"\"Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) "
|
||||||
|
"AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 "
|
||||||
|
"Safari/601.1.46\"],\"Accept-Encoding\":[\"gzip, deflate\"],"
|
||||||
|
"\"Connection\":[\"keep-alive\"],\"Pragma\":\"no-cache\"}}");
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tcpRespDefBtn_clicked()
|
||||||
|
{
|
||||||
|
tcpRespTxt->clear();
|
||||||
|
tcpRespTxt->setPlainText("{\"version\":\"1.1\",\"status\":\"200\",\"reason\":\"OK\",\"headers\":{\"Content-Type\":[\"application/octet-stream\",\"video/mpeg\"],\"Transfer-Encoding\":[\"chunked\"],\"Connection\":[\"keep-alive\"],\"Pragma\":\"no-cache\"}}");
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tlsCB_stateChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.security = arg1 == Qt::Checked ? "tls" : "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_soMarkSpinBox_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.sockopt.mark = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tcpFastOpenCB_stateChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.sockopt.tcpFastOpen = arg1 == Qt::Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tProxyCB_currentIndexChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.sockopt.tproxy = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_quicSecurityCB_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.quicSettings.security = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_quicKeyTxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.quicSettings.key = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_quicHeaderTypeCB_currentIndexChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.quicSettings.header.type = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tcpHeaderTypeCB_currentIndexChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.tcpSettings.header.type = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_wsPathTxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.wsSettings.path = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpMTU_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.mtu = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpTTI_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.tti = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpUploadCapacSB_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.uplinkCapacity = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpCongestionCB_stateChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.congestion = arg1 == Qt::Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpDownCapacitySB_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.downlinkCapacity = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpReadBufferSB_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.readBufferSize = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpWriteBufferSB_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.writeBufferSize = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_kcpHeaderType_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.kcpSettings.header.type = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_dsPathTxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.dsSettings.path = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tcpRequestEditBtn_clicked()
|
||||||
|
{
|
||||||
|
JsonEditor w(JsonFromString(tcpRequestTxt->toPlainText()), this);
|
||||||
|
auto rString = JsonToString(w.OpenEditor());
|
||||||
|
tcpRequestTxt->setPlainText(rString);
|
||||||
|
auto tcpReqObject = StructFromJsonString<HTTPRequestObject>(rString);
|
||||||
|
stream.tcpSettings.header.request = tcpReqObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_tcpResponseEditBtn_clicked()
|
||||||
|
{
|
||||||
|
JsonEditor w(JsonFromString(tcpRespTxt->toPlainText()), this);
|
||||||
|
auto rString = JsonToString(w.OpenEditor());
|
||||||
|
tcpRespTxt->setPlainText(rString);
|
||||||
|
auto tcpRspObject = StructFromJsonString<HTTPResponseObject>(rString);
|
||||||
|
stream.tcpSettings.header.response = tcpRspObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_transportCombo_currentIndexChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.network = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_serverNameTxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
stream.tlsSettings.serverName = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_allowInsecureCB_stateChanged(int arg1)
|
||||||
|
{
|
||||||
|
stream.tlsSettings.allowInsecure = arg1 == Qt::Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StreamSettingsWidget::on_alpnTxt_textChanged()
|
||||||
|
{
|
||||||
|
stream.tlsSettings.alpn = SplitLines(alpnTxt->toPlainText());
|
||||||
|
}
|
80
src/ui/widgets/StreamSettingsWidget.hpp
Normal file
80
src/ui/widgets/StreamSettingsWidget.hpp
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "QWidget"
|
||||||
|
#include "base/Qv2rayBase.hpp"
|
||||||
|
#include "ui_StreamSettingsWidget.h"
|
||||||
|
|
||||||
|
class StreamSettingsWidget : public QWidget, private Ui::StreamSettingsWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit StreamSettingsWidget(QWidget *parent = nullptr);
|
||||||
|
void SetStreamObject(StreamSettingsObject sso);
|
||||||
|
StreamSettingsObject GetStreamSettings();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_httpPathTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_httpHostTxt_textChanged();
|
||||||
|
|
||||||
|
void on_wsHeadersTxt_textChanged();
|
||||||
|
|
||||||
|
void on_tcpRequestDefBtn_clicked();
|
||||||
|
|
||||||
|
void on_tcpRespDefBtn_clicked();
|
||||||
|
|
||||||
|
void on_tlsCB_stateChanged(int arg1);
|
||||||
|
|
||||||
|
void on_soMarkSpinBox_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_tcpFastOpenCB_stateChanged(int arg1);
|
||||||
|
|
||||||
|
void on_tProxyCB_currentIndexChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_quicSecurityCB_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_quicKeyTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_quicHeaderTypeCB_currentIndexChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_tcpHeaderTypeCB_currentIndexChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_wsPathTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_kcpMTU_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpTTI_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpUploadCapacSB_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpCongestionCB_stateChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpDownCapacitySB_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpReadBufferSB_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpWriteBufferSB_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_kcpHeaderType_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_dsPathTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_tcpRequestEditBtn_clicked();
|
||||||
|
|
||||||
|
void on_tcpResponseEditBtn_clicked();
|
||||||
|
|
||||||
|
void on_transportCombo_currentIndexChanged(int index);
|
||||||
|
|
||||||
|
void on_transportCombo_currentIndexChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_serverNameTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_allowInsecureCB_stateChanged(int arg1);
|
||||||
|
|
||||||
|
void on_alpnTxt_textChanged();
|
||||||
|
|
||||||
|
private:
|
||||||
|
StreamSettingsObject stream;
|
||||||
|
};
|
||||||
|
|
739
src/ui/widgets/StreamSettingsWidget.ui
Normal file
739
src/ui/widgets/StreamSettingsWidget.ui
Normal file
@ -0,0 +1,739 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>StreamSettingsWidget</class>
|
||||||
|
<widget class="QWidget" name="StreamSettingsWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>804</width>
|
||||||
|
<height>387</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Stream Settings Widget</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>General Stream Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="transportLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Transport Protocol</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="transportCombo">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">tcp</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">http</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">ws</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">kcp</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">domainsocket</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">quic</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="transportLabel_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>TLS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="tlsCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enabled</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Protocol Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QStackedWidget" name="v2rayStackView">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tcpStackPage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,1,0">
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QPushButton" name="tcpRequestDefBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="tcpRequestEditBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Edit in Json Editor</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Request</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="6">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="tcpHeaderTypeCB">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">none</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">http</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="5">
|
||||||
|
<widget class="QPushButton" name="tcpRespDefBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3" colspan="2">
|
||||||
|
<widget class="QPushButton" name="tcpResponseEditBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Edit in Json Editor</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3" colspan="3">
|
||||||
|
<widget class="QPlainTextEdit" name="tcpRespTxt">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="lineWrapMode">
|
||||||
|
<enum>QPlainTextEdit::NoWrap</enum>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="plainText">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3" colspan="3">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Response</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="3">
|
||||||
|
<widget class="QPlainTextEdit" name="tcpRequestTxt">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="lineWrapMode">
|
||||||
|
<enum>QPlainTextEdit::NoWrap</enum>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="plainText">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="backgroundVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="httpStackPage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_8" rowstretch="0,0,0,1">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Path</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLineEdit" name="httpPathTxt">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string notr="true">/</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Host</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QPlainTextEdit" name="httpHostTxt">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string notr="true">myhost.mydomain.com</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="wsStackPage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_9" rowstretch="0,0,1">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Path</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="wsPathTxt">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>/wsPath</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QPlainTextEdit" name="wsHeadersTxt">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string notr="true">Key|Value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="text">
|
||||||
|
<string>Headers</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="mKCPStackPage">
|
||||||
|
<layout class="QFormLayout" name="formLayout_7">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>MTU</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="kcpMTU">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>576</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1460</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1350</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>TTI (ms)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="kcpTTI">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>Uplink Capacity (MB/s)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QSpinBox" name="kcpUploadCapacSB">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>4096</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Congestion</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QCheckBox" name="kcpCongestionCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enabled</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Downlink Capacity (MB/s)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QSpinBox" name="kcpDownCapacitySB">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>4096</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Read Buffer Size (MB)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QSpinBox" name="kcpReadBufferSB">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1024</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="labelx">
|
||||||
|
<property name="text">
|
||||||
|
<string>Write Buffer Size (MB)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QSpinBox" name="kcpWriteBufferSB">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1024</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QComboBox" name="kcpHeaderType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">none</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">srtp</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">utp</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">wechat-video</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">dtls</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">wireguard</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0" colspan="2">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="dsStackPage">
|
||||||
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>Path</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="dsPathTxt">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string notr="true">/dsPath</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="quicStackPage">
|
||||||
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>Security</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="quicSecurityCB">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">none</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">aes-128-gcm</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">chacha20-poly1305</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_19">
|
||||||
|
<property name="text">
|
||||||
|
<string>Key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="quicKeyTxt">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>keys</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_20">
|
||||||
|
<property name="text">
|
||||||
|
<string>Headers</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="quicHeaderTypeCB">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">none</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">srtp</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">utp</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">wechat-video</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">dtls</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">wireguard</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>TLS Settings</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QFormLayout" name="formLayout_6">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Server</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="serverNameTxt"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Insecure</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="allowInsecureCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enabled</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>ALPN</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QPlainTextEdit" name="alpnTxt"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>SOCK Options</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="text">
|
||||||
|
<string>Mark</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="soMarkSpinBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_29">
|
||||||
|
<property name="text">
|
||||||
|
<string>TCP Fast Open</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="tcpFastOpenCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enabled</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_27">
|
||||||
|
<property name="text">
|
||||||
|
<string>TProxy Mode</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="tProxyCB">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">off</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">redirect</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">tproxy</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user