diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index a46b48343a..93c3ac1e1d 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -2601,9 +2601,14 @@ Inbound.SocksSettings.SocksAccount = class extends XrayCommonClass { }; Inbound.HttpSettings = class extends Inbound.Settings { - constructor(protocol, accounts = [new Inbound.HttpSettings.HttpAccount()]) { + constructor( + protocol, + accounts = [new Inbound.HttpSettings.HttpAccount()], + allowTransparent = false, + ) { super(protocol); this.accounts = accounts; + this.allowTransparent = allowTransparent; } addAccount(account) { @@ -2618,12 +2623,14 @@ Inbound.HttpSettings = class extends Inbound.Settings { return new Inbound.HttpSettings( Protocols.HTTP, json.accounts.map(account => Inbound.HttpSettings.HttpAccount.fromJson(account)), + json.allowTransparent, ); } toJson() { return { accounts: Inbound.HttpSettings.toJsonArray(this.accounts), + allowTransparent: this.allowTransparent, }; } }; diff --git a/web/html/xui/form/protocol/http.html b/web/html/xui/form/protocol/http.html index 3206139eb4..b4c553135a 100644 --- a/web/html/xui/form/protocol/http.html +++ b/web/html/xui/form/protocol/http.html @@ -19,5 +19,8 @@ + + + {{end}}