Fix tree-shaking default values

This commit is contained in:
dyhkwong 2021-02-12 01:59:43 +08:00 committed by QxQ
parent 652afee74c
commit 697b515053
4 changed files with 11 additions and 15 deletions

View File

@ -197,12 +197,12 @@ namespace Qv2ray::base::objects
struct KCPObject struct KCPObject
{ {
int mtu = 1350; int mtu = 1350;
int tti = 20; int tti = 50;
int uplinkCapacity = 5; int uplinkCapacity = 5;
int downlinkCapacity = 20; int downlinkCapacity = 20;
bool congestion = false; bool congestion = false;
int readBufferSize = 1; int readBufferSize = 2;
int writeBufferSize = 1; int writeBufferSize = 2;
QString seed; QString seed;
ObfsHeaderObject header; ObfsHeaderObject header;
KCPObject(){}; KCPObject(){};
@ -239,7 +239,7 @@ namespace Qv2ray::base::objects
// //
struct QuicObject struct QuicObject
{ {
QString security; QString security = "none";
QString key; QString key;
ObfsHeaderObject header; ObfsHeaderObject header;
JSONSTRUCT_COMPARE(QuicObject, security, key, header) JSONSTRUCT_COMPARE(QuicObject, security, key, header)
@ -249,7 +249,7 @@ namespace Qv2ray::base::objects
// //
struct SockoptObject struct SockoptObject
{ {
int mark = 255; int mark = 0;
bool tcpFastOpen = false; bool tcpFastOpen = false;
QString tproxy = "off"; QString tproxy = "off";
JSONSTRUCT_COMPARE(SockoptObject, mark, tcpFastOpen, tproxy) JSONSTRUCT_COMPARE(SockoptObject, mark, tcpFastOpen, tproxy)
@ -275,7 +275,7 @@ namespace Qv2ray::base::objects
bool allowInsecure = false; bool allowInsecure = false;
bool disableSessionResumption = true; bool disableSessionResumption = true;
bool disableSystemRoot = false; bool disableSystemRoot = false;
QList<QString> alpn = { "http/1.1" }; QList<QString> alpn;
QList<CertificateObject> certificates; QList<CertificateObject> certificates;
JSONSTRUCT_COMPARE(TLSObject, serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates) JSONSTRUCT_COMPARE(TLSObject, serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates)
JSONSTRUCT_REGISTER(TLSObject, F(serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates)) JSONSTRUCT_REGISTER(TLSObject, F(serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates))
@ -288,7 +288,7 @@ namespace Qv2ray::base::objects
bool allowInsecure = false; bool allowInsecure = false;
bool disableSessionResumption = true; bool disableSessionResumption = true;
bool disableSystemRoot = false; bool disableSystemRoot = false;
QList<QString> alpn = { "http/1.1" }; QList<QString> alpn;
QList<CertificateObject> certificates; QList<CertificateObject> certificates;
JSONSTRUCT_COMPARE(XTLSObject, serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates) JSONSTRUCT_COMPARE(XTLSObject, serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates)
JSONSTRUCT_REGISTER(XTLSObject, F(serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates)) JSONSTRUCT_REGISTER(XTLSObject, F(serverName, allowInsecure, disableSessionResumption, disableSystemRoot, alpn, certificates))
@ -346,7 +346,7 @@ namespace Qv2ray::base::objects
struct ShadowSocksServerObject struct ShadowSocksServerObject
{ {
QString address; QString address;
QString method = "aes-256-cfb"; QString method;
QString password; QString password;
int port; int port;
JSONSTRUCT_COMPARE(ShadowSocksServerObject, address, method, password) JSONSTRUCT_COMPARE(ShadowSocksServerObject, address, method, password)

View File

@ -131,7 +131,8 @@ namespace Qv2ray::base::config
JSONSTRUCT_COMPARE(QvConfig_Inbounds, listenip, useSocks, useHTTP, useTPROXY, tProxySettings, httpSettings, socksSettings, JSONSTRUCT_COMPARE(QvConfig_Inbounds, listenip, useSocks, useHTTP, useTPROXY, tProxySettings, httpSettings, socksSettings,
systemProxySettings) systemProxySettings)
JSONSTRUCT_REGISTER(QvConfig_Inbounds, // JSONSTRUCT_REGISTER(QvConfig_Inbounds, //
A(socksSettings), //
F(listenip, useSocks, useHTTP, useTPROXY), // F(listenip, useSocks, useHTTP, useTPROXY), //
F(tProxySettings, httpSettings, socksSettings, systemProxySettings)) F(tProxySettings, httpSettings, systemProxySettings))
}; };
} // namespace Qv2ray::base::config } // namespace Qv2ray::base::config

View File

@ -46,7 +46,7 @@ struct HttpServerObject
struct ShadowSocksServerObject struct ShadowSocksServerObject
{ {
QString address = "0.0.0.0"; QString address = "0.0.0.0";
QString method = "chacha20-ietf-poly1305"; QString method = "aes-256-gcm";
QString password; QString password;
int port = 0; int port = 0;
JSONSTRUCT_COMPARE(ShadowSocksServerObject, address, method, password) JSONSTRUCT_COMPARE(ShadowSocksServerObject, address, method, password)

View File

@ -56,11 +56,6 @@
<string notr="true">aes-128-gcm</string> <string notr="true">aes-128-gcm</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string notr="true">chacha20-poly1305</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">chacha20-ietf-poly1305</string> <string notr="true">chacha20-ietf-poly1305</string>