diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index e2c9e092..ba2304ef 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -1221,6 +1221,14 @@ class Inbound extends XrayCommonClass { return false; } + // Vision seed applies only when vision flow is selected + canEnableVisionSeed() { + if (!this.canEnableTlsFlow()) return false; + const clients = this.settings?.vlesses; + if (!Array.isArray(clients)) return false; + return clients.some(c => c?.flow === TLS_FLOW_CONTROL.VISION || c?.flow === TLS_FLOW_CONTROL.VISION_UDP443); + } + canEnableReality() { if (![Protocols.VLESS, Protocols.TROJAN].includes(this.protocol)) return false; return ["tcp", "http", "grpc", "xhttp"].includes(this.network); @@ -1902,7 +1910,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings { if (json.testseed && Array.isArray(json.testseed) && json.testseed.length >= 4) { testseed = json.testseed; } - + const obj = new Inbound.VLESSSettings( Protocols.VLESS, (json.clients || []).map(client => Inbound.VLESSSettings.VLESS.fromJson(client)), diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index c631040e..295ac812 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -621,6 +621,13 @@ class Outbound extends CommonClass { return false; } + // Vision seed applies only when vision flow is selected + canEnableVisionSeed() { + if (!this.canEnableTlsFlow()) return false; + const flow = this.settings?.flow; + return flow === TLS_FLOW_CONTROL.VISION || flow === TLS_FLOW_CONTROL.VISION_UDP443; + } + canEnableReality() { if (![Protocols.VLESS, Protocols.Trojan].includes(this.protocol)) return false; return ["tcp", "http", "grpc", "xhttp"].includes(this.stream.network); diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html index 1926c30e..511caefe 100644 --- a/web/html/form/outbound.html +++ b/web/html/form/outbound.html @@ -1,6 +1,7 @@ {{define "form/outbound"}} - + @@ -8,8 +9,10 @@ [[ y ]] - - + + @@ -59,12 +62,13 @@ - - - + + + Noise [[ index + 1 ]] - @@ -108,7 +112,7 @@ [[ s ]] - + @@ -129,21 +133,21 @@ - - + + - + [[ wds ]] @@ -171,8 +175,11 @@ - - Peer [[ index + 1 ]] + + Peer [[ index + 1 ]] @@ -190,7 +197,8 @@ @@ -210,7 +218,7 @@ - + -