diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-05-04 18:42:55 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-05-04 18:42:55 +0300 |
| commit | d44b70682c400e3cd12f7a84701b153b7182dedb (patch) | |
| tree | ed29719ded50301f2ec2e3701bf84b5ef51fe2ee /web/assets/js/model/inbound.js | |
| parent | fb75e3d7c7455f349b007961cdf3e668fe34fb93 (diff) | |
Update QUIC params defaults and UI validations
#4142
Adjust QUIC parameter defaults and tighten form validation across inbound/outbound components.
- Set default brutalUp/brutalDown to 65537 and only include them in JSON when congestion is 'brutal' or 'force-brutal'.
- Change keepAlivePeriod defaults (inbound QUIC -> 5s, Hysteria stream -> 2s) and enforce minimums in the UI.
- Expose and serialize additional QUIC fields in outbound QuicParams: init/max stream windows, init/max connection windows, maxIdleTimeout, disablePathMTUDiscovery, maxIncomingStreams.
- Add UI min/placeholder constraints: stream/connection receive windows min=16384 and updated placeholders to show defaults, brutal fields min=65537, maxIncomingStreams min=8 (placeholders updated), keepAlive min adjusted.
- Add Wireguard and Hysteria entries to Protocols.
Touched files: web/assets/js/model/inbound.js, web/assets/js/model/outbound.js, web/html/form/outbound.html, web/html/form/stream/stream_finalmask.html.
Diffstat (limited to 'web/assets/js/model/inbound.js')
| -rw-r--r-- | web/assets/js/model/inbound.js | 12 |
1 files changed, 7 insertions, 5 deletions
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; |
