From a23a5de540e59dfed05e07eb17dc45e6cb8c2341 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Sun, 9 Mar 2025 05:37:50 +0000 Subject: [PATCH] Revert "chore: add new grpc params for outbound (#2744)" This reverts commit c49ec9a74cf1c407cbe872355f1e2ac03a8e3080. --- web/assets/js/model/inbound.js | 6 ++++- web/assets/js/model/outbound.js | 30 +++-------------------- web/html/xui/form/outbound.html | 15 ------------ web/html/xui/form/stream/stream_grpc.html | 9 ++++--- 4 files changed, 14 insertions(+), 46 deletions(-) diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index d08553d9..5c3235e1 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -420,17 +420,20 @@ class WsStreamSettings extends XrayCommonClass { class GrpcStreamSettings extends XrayCommonClass { constructor( serviceName = "", - authority = "" + authority = "", + multiMode = false, ) { super(); this.serviceName = serviceName; this.authority = authority; + this.multiMode = multiMode; } static fromJson(json = {}) { return new GrpcStreamSettings( json.serviceName, json.authority, + json.multiMode ); } @@ -438,6 +441,7 @@ class GrpcStreamSettings extends XrayCommonClass { return { serviceName: this.serviceName, authority: this.authority, + multiMode: this.multiMode, } } } diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 6de639a1..9104777c 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -251,47 +251,23 @@ class GrpcStreamSettings extends CommonClass { constructor( serviceName = "", authority = "", - multiMode = false, - userAgent = "", - idleTimeout = 60, - healthCheckTimeout = 20, - permitWithoutStream = false, - initialWindowsSize = 0 + multiMode = false ) { super(); this.serviceName = serviceName; this.authority = authority; this.multiMode = multiMode; - this.user_agent = userAgent; - this.idle_timeout = idleTimeout; - this.health_check_timeout = healthCheckTimeout; - this.permit_without_stream = permitWithoutStream; - this.initial_windows_size = initialWindowsSize; } static fromJson(json = {}) { - return new GrpcStreamSettings( - json.serviceName, - json.authority, - json.multiMode, - json.user_agent, - json.idle_timeout, - json.health_check_timeout, - json.permit_without_stream, - json.initial_windows_size - ); + return new GrpcStreamSettings(json.serviceName, json.authority, json.multiMode); } toJson() { return { serviceName: this.serviceName, authority: this.authority, - multiMode: this.multiMode, - user_agent: this.user_agent, - idle_timeout: this.idle_timeout, - health_check_timeout: this.health_check_timeout, - permit_without_stream: this.permit_without_stream, - initial_windows_size: this.initial_windows_size + multiMode: this.multiMode } } } diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 93b0a94f..d4e9e5f6 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -352,21 +352,6 @@ - - - - - - - - - - - - - - - diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html index a036080f..e74a3c3f 100644 --- a/web/html/xui/form/stream/stream_grpc.html +++ b/web/html/xui/form/stream/stream_grpc.html @@ -1,10 +1,13 @@ {{define "form/streamGRPC"}} - - - + + + + + + {{end}}