From 697b51505342b167fb5816001b212e2696c44aef Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Fri, 12 Feb 2021 01:59:43 +0800 Subject: [PATCH] Fix tree-shaking default values --- src/base/models/CoreObjectModels.hpp | 16 ++++++++-------- src/base/models/QvCoreSettings.hpp | 3 ++- src/plugins/common/CommonTypes.hpp | 2 +- src/plugins/protocols/ui/outbound/shadowsocks.ui | 5 ----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/base/models/CoreObjectModels.hpp b/src/base/models/CoreObjectModels.hpp index fc004895..a5d434a3 100644 --- a/src/base/models/CoreObjectModels.hpp +++ b/src/base/models/CoreObjectModels.hpp @@ -197,12 +197,12 @@ namespace Qv2ray::base::objects struct KCPObject { int mtu = 1350; - int tti = 20; + int tti = 50; int uplinkCapacity = 5; int downlinkCapacity = 20; bool congestion = false; - int readBufferSize = 1; - int writeBufferSize = 1; + int readBufferSize = 2; + int writeBufferSize = 2; QString seed; ObfsHeaderObject header; KCPObject(){}; @@ -239,7 +239,7 @@ namespace Qv2ray::base::objects // struct QuicObject { - QString security; + QString security = "none"; QString key; ObfsHeaderObject header; JSONSTRUCT_COMPARE(QuicObject, security, key, header) @@ -249,7 +249,7 @@ namespace Qv2ray::base::objects // struct SockoptObject { - int mark = 255; + int mark = 0; bool tcpFastOpen = false; QString tproxy = "off"; JSONSTRUCT_COMPARE(SockoptObject, mark, tcpFastOpen, tproxy) @@ -275,7 +275,7 @@ namespace Qv2ray::base::objects bool allowInsecure = false; bool disableSessionResumption = true; bool disableSystemRoot = false; - QList alpn = { "http/1.1" }; + QList alpn; QList certificates; JSONSTRUCT_COMPARE(TLSObject, 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 disableSessionResumption = true; bool disableSystemRoot = false; - QList alpn = { "http/1.1" }; + QList alpn; QList certificates; JSONSTRUCT_COMPARE(XTLSObject, 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 { QString address; - QString method = "aes-256-cfb"; + QString method; QString password; int port; JSONSTRUCT_COMPARE(ShadowSocksServerObject, address, method, password) diff --git a/src/base/models/QvCoreSettings.hpp b/src/base/models/QvCoreSettings.hpp index 11e830af..2512418b 100644 --- a/src/base/models/QvCoreSettings.hpp +++ b/src/base/models/QvCoreSettings.hpp @@ -131,7 +131,8 @@ namespace Qv2ray::base::config JSONSTRUCT_COMPARE(QvConfig_Inbounds, listenip, useSocks, useHTTP, useTPROXY, tProxySettings, httpSettings, socksSettings, systemProxySettings) JSONSTRUCT_REGISTER(QvConfig_Inbounds, // + A(socksSettings), // F(listenip, useSocks, useHTTP, useTPROXY), // - F(tProxySettings, httpSettings, socksSettings, systemProxySettings)) + F(tProxySettings, httpSettings, systemProxySettings)) }; } // namespace Qv2ray::base::config diff --git a/src/plugins/common/CommonTypes.hpp b/src/plugins/common/CommonTypes.hpp index f26beaa2..0daf9f32 100644 --- a/src/plugins/common/CommonTypes.hpp +++ b/src/plugins/common/CommonTypes.hpp @@ -46,7 +46,7 @@ struct HttpServerObject struct ShadowSocksServerObject { QString address = "0.0.0.0"; - QString method = "chacha20-ietf-poly1305"; + QString method = "aes-256-gcm"; QString password; int port = 0; JSONSTRUCT_COMPARE(ShadowSocksServerObject, address, method, password) diff --git a/src/plugins/protocols/ui/outbound/shadowsocks.ui b/src/plugins/protocols/ui/outbound/shadowsocks.ui index 3953fadd..36328087 100644 --- a/src/plugins/protocols/ui/outbound/shadowsocks.ui +++ b/src/plugins/protocols/ui/outbound/shadowsocks.ui @@ -56,11 +56,6 @@ aes-128-gcm - - - chacha20-poly1305 - - chacha20-ietf-poly1305