diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js
index 9531f19b..af663923 100644
--- a/web/assets/js/model/inbound.js
+++ b/web/assets/js/model/inbound.js
@@ -1207,15 +1207,15 @@ class QuicParams extends XrayCommonClass {
constructor(
congestion = 'bbr',
debug = false,
- brutalUp = '',
- brutalDown = '',
+ brutalUp = 65537,
+ brutalDown = 65537,
udpHop = undefined,
initStreamReceiveWindow = 8388608,
maxStreamReceiveWindow = 8388608,
initConnectionReceiveWindow = 20971520,
maxConnectionReceiveWindow = 20971520,
maxIdleTimeout = 30,
- keepAlivePeriod = 0,
+ keepAlivePeriod = 5,
disablePathMTUDiscovery = false,
maxIncomingStreams = 1024,
) {
@@ -1265,8 +1265,10 @@ class QuicParams extends XrayCommonClass {
toJson() {
const result = { congestion: this.congestion };
if (this.debug) result.debug = this.debug;
- if (this.brutalUp) result.brutalUp = this.brutalUp;
- if (this.brutalDown) result.brutalDown = this.brutalDown;
+ if (['brutal', 'force-brutal'].includes(this.congestion)) {
+ if (this.brutalUp) result.brutalUp = this.brutalUp;
+ if (this.brutalDown) result.brutalDown = this.brutalDown;
+ }
if (this.udpHop) result.udpHop = { ports: this.udpHop.ports, interval: this.udpHop.interval };
if (this.initStreamReceiveWindow > 0) result.initStreamReceiveWindow = this.initStreamReceiveWindow;
if (this.maxStreamReceiveWindow > 0) result.maxStreamReceiveWindow = this.maxStreamReceiveWindow;
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index 5bcc8550..1c2d67d9 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -6,10 +6,10 @@ const Protocols = {
VLESS: "vless",
Trojan: "trojan",
Shadowsocks: "shadowsocks",
+ Wireguard: "wireguard",
+ Hysteria: "hysteria",
Socks: "socks",
HTTP: "http",
- Wireguard: "wireguard",
- Hysteria: "hysteria"
};
const SSMethods = {
@@ -500,7 +500,7 @@ class HysteriaStreamSettings extends CommonClass {
initConnectionReceiveWindow = 20971520,
maxConnectionReceiveWindow = 20971520,
maxIdleTimeout = 30,
- keepAlivePeriod = 0,
+ keepAlivePeriod = 2,
disablePathMTUDiscovery = false
) {
super();
@@ -789,9 +789,17 @@ class QuicParams extends CommonClass {
constructor(
congestion = 'bbr',
debug = false,
- brutalUp = '',
- brutalDown = '',
+ brutalUp = 65537,
+ brutalDown = 65537,
udpHop = undefined,
+ initStreamReceiveWindow = 8388608,
+ maxStreamReceiveWindow = 8388608,
+ initConnectionReceiveWindow = 20971520,
+ maxConnectionReceiveWindow = 20971520,
+ maxIdleTimeout = 30,
+ keepAlivePeriod = 5,
+ disablePathMTUDiscovery = false,
+ maxIncomingStreams = 1024,
) {
super();
this.congestion = congestion;
@@ -799,6 +807,14 @@ class QuicParams extends CommonClass {
this.brutalUp = brutalUp;
this.brutalDown = brutalDown;
this.udpHop = udpHop;
+ this.initStreamReceiveWindow = initStreamReceiveWindow;
+ this.maxStreamReceiveWindow = maxStreamReceiveWindow;
+ this.initConnectionReceiveWindow = initConnectionReceiveWindow;
+ this.maxConnectionReceiveWindow = maxConnectionReceiveWindow;
+ this.maxIdleTimeout = maxIdleTimeout;
+ this.keepAlivePeriod = keepAlivePeriod;
+ this.disablePathMTUDiscovery = disablePathMTUDiscovery;
+ this.maxIncomingStreams = maxIncomingStreams;
}
get hasUdpHop() {
@@ -817,15 +833,33 @@ class QuicParams extends CommonClass {
json.brutalUp,
json.brutalDown,
json.udpHop ? { ports: json.udpHop.ports, interval: json.udpHop.interval } : undefined,
+ json.initStreamReceiveWindow,
+ json.maxStreamReceiveWindow,
+ json.initConnectionReceiveWindow,
+ json.maxConnectionReceiveWindow,
+ json.maxIdleTimeout,
+ json.keepAlivePeriod,
+ json.disablePathMTUDiscovery,
+ json.maxIncomingStreams,
);
}
toJson() {
const result = { congestion: this.congestion };
if (this.debug) result.debug = this.debug;
- if (this.brutalUp) result.brutalUp = this.brutalUp;
- if (this.brutalDown) result.brutalDown = this.brutalDown;
+ if (['brutal', 'force-brutal'].includes(this.congestion)) {
+ if (this.brutalUp) result.brutalUp = this.brutalUp;
+ if (this.brutalDown) result.brutalDown = this.brutalDown;
+ }
if (this.udpHop) result.udpHop = { ports: this.udpHop.ports, interval: this.udpHop.interval };
+ if (this.initStreamReceiveWindow > 0) result.initStreamReceiveWindow = this.initStreamReceiveWindow;
+ if (this.maxStreamReceiveWindow > 0) result.maxStreamReceiveWindow = this.maxStreamReceiveWindow;
+ if (this.initConnectionReceiveWindow > 0) result.initConnectionReceiveWindow = this.initConnectionReceiveWindow;
+ if (this.maxConnectionReceiveWindow > 0) result.maxConnectionReceiveWindow = this.maxConnectionReceiveWindow;
+ if (this.maxIdleTimeout !== 30 && this.maxIdleTimeout > 0) result.maxIdleTimeout = this.maxIdleTimeout;
+ if (this.keepAlivePeriod > 0) result.keepAlivePeriod = this.keepAlivePeriod;
+ if (this.disablePathMTUDiscovery) result.disablePathMTUDiscovery = this.disablePathMTUDiscovery;
+ if (this.maxIncomingStreams > 0) result.maxIncomingStreams = this.maxIncomingStreams;
return result;
}
}
diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html
index 90eb24c9..519c4cbc 100644
--- a/web/html/form/outbound.html
+++ b/web/html/form/outbound.html
@@ -579,23 +579,23 @@
-
+
-
+
-
+
-
+
-
@@ -934,10 +934,10 @@
-
+
-
+
@@ -964,24 +964,24 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/web/html/form/stream/stream_finalmask.html b/web/html/form/stream/stream_finalmask.html
index 1259b660..0e28b476 100644
--- a/web/html/form/stream/stream_finalmask.html
+++ b/web/html/form/stream/stream_finalmask.html
@@ -356,10 +356,10 @@
-
+
-
+
@@ -377,30 +377,30 @@
-
+
-
+
-
+
-
+
-
+
-
+