mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-21 19:30:26 +08:00
fix: added V2ray tests, close #685
This commit is contained in:
parent
148f91c83f
commit
95b67e5080
@ -1 +1 @@
|
||||
5689
|
||||
5691
|
||||
|
@ -265,8 +265,10 @@ namespace Qv2ray::base::objects
|
||||
QList<QString> alpn;
|
||||
QList<CertificateObject> certificates;
|
||||
bool disableSystemRoot;
|
||||
TLSObject() : serverName(), allowInsecure(), allowInsecureCiphers(), disableSessionResumption(true), certificates(), disableSystemRoot(){};
|
||||
JSONSTRUCT_REGISTER(TLSObject, F(serverName, allowInsecure, allowInsecureCiphers, disableSessionResumption, alpn, certificates, disableSystemRoot))
|
||||
TLSObject()
|
||||
: serverName(), allowInsecure(), allowInsecureCiphers(), disableSessionResumption(true), certificates(), disableSystemRoot(){};
|
||||
JSONSTRUCT_REGISTER(TLSObject, F(serverName, allowInsecure, allowInsecureCiphers, disableSessionResumption, alpn, certificates,
|
||||
disableSystemRoot))
|
||||
};
|
||||
} // namespace transfer
|
||||
//
|
||||
@ -363,8 +365,9 @@ namespace Qv2ray::base::objects
|
||||
int alterId;
|
||||
QString security;
|
||||
int level;
|
||||
UserObject() : id(""), alterId(64), security("auto"), level(0){};
|
||||
JSONSTRUCT_REGISTER(UserObject, F(id, alterId, security, level))
|
||||
QString testsEnabled;
|
||||
UserObject() : id(), alterId(64), security("auto"), level(0), testsEnabled("none"){};
|
||||
JSONSTRUCT_REGISTER(UserObject, F(id, alterId, security, level, testsEnabled))
|
||||
};
|
||||
|
||||
QString address;
|
||||
|
@ -93,8 +93,8 @@ OUTBOUND OutboundEditor::GenerateConnectionJson()
|
||||
}
|
||||
else if (outboundType == "shadowsocks")
|
||||
{
|
||||
//streaming = QJsonObject();
|
||||
//LOG(MODULE_CONNECTION, "Shadowsocks outbound does not need StreamSettings.")
|
||||
// streaming = QJsonObject();
|
||||
// LOG(MODULE_CONNECTION, "Shadowsocks outbound does not need StreamSettings.")
|
||||
QJsonArray servers;
|
||||
shadowsocks.address = address;
|
||||
shadowsocks.port = port;
|
||||
@ -110,8 +110,8 @@ OUTBOUND OutboundEditor::GenerateConnectionJson()
|
||||
}
|
||||
socks.address = address;
|
||||
socks.port = port;
|
||||
//streaming = QJsonObject();
|
||||
//LOG(MODULE_CONNECTION, "Socks outbound does not need StreamSettings.")
|
||||
// streaming = QJsonObject();
|
||||
// LOG(MODULE_CONNECTION, "Socks outbound does not need StreamSettings.")
|
||||
QJsonArray servers;
|
||||
servers.append(socks.toJson());
|
||||
settings["servers"] = servers;
|
||||
@ -170,6 +170,7 @@ void OutboundEditor::ReloadGUI()
|
||||
idLineEdit->setText(vmess.users.front().id);
|
||||
alterLineEdit->setValue(vmess.users.front().alterId);
|
||||
securityCombo->setCurrentText(vmess.users.front().security);
|
||||
testsEnabledCombo->setCurrentText(vmess.users.front().testsEnabled);
|
||||
}
|
||||
else if (outboundType == "shadowsocks")
|
||||
{
|
||||
@ -343,3 +344,8 @@ void OutboundEditor::on_socks_PasswordTxt_textEdited(const QString &arg1)
|
||||
socks.users.push_back({});
|
||||
socks.users.front().pass = arg1;
|
||||
}
|
||||
|
||||
void OutboundEditor::on_testsEnabledCombo_currentIndexChanged(const QString &arg1)
|
||||
{
|
||||
vmess.users.front().testsEnabled = arg1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "base/Qv2rayBase.hpp"
|
||||
#include "components/plugins/QvPluginHost.hpp"
|
||||
#include "ui/messaging/QvMessageBus.hpp"
|
||||
@ -44,6 +44,8 @@ class OutboundEditor
|
||||
void on_socks_PasswordTxt_textEdited(const QString &arg1);
|
||||
void on_securityCombo_currentIndexChanged(const QString &arg1);
|
||||
|
||||
void on_testsEnabledCombo_currentIndexChanged(const QString &arg1);
|
||||
|
||||
private:
|
||||
QString tag;
|
||||
void ReloadGUI();
|
||||
|
@ -285,6 +285,30 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Tests</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="testsEnabledCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">none</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">VMessAEAD</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page">
|
||||
|
Loading…
Reference in New Issue
Block a user