From 4f3b93171a5e995edfca0d9a3149f8a35631596a Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 23 Dec 2023 16:37:32 +0330 Subject: [PATCH] fix outbound socks/http Co-Authored-By: Alireza Ahmadi --- web/assets/js/model/outbound.js | 16 ++++++++-------- web/html/xui/form/outbound.html | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 5aad52dd..eb5b8c3b 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -839,12 +839,12 @@ Outbound.ShadowsocksSettings = class extends CommonClass { } }; Outbound.SocksSettings = class extends CommonClass { - constructor(address, port, user, password) { + constructor(address, port, user, pass) { super(); this.address = address; this.port = port; this.user = user; - this.password = password; + this.pass = pass; } static fromJson(json={}) { @@ -854,7 +854,7 @@ Outbound.SocksSettings = class extends CommonClass { servers[0].address, servers[0].port, ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user, - ObjectUtil.isArrEmpty(servers[0].password) ? '' : servers[0].users[0].password, + ObjectUtil.isArrEmpty(servers[0].pass) ? '' : servers[0].users[0].pass, ); } @@ -863,18 +863,18 @@ Outbound.SocksSettings = class extends CommonClass { servers: [{ address: this.address, port: this.port, - users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, password: this.password}], + users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, pass: this.pass}], }], }; } }; Outbound.HttpSettings = class extends CommonClass { - constructor(address, port, user, password) { + constructor(address, port, user, pass) { super(); this.address = address; this.port = port; this.user = user; - this.password = password; + this.pass = pass; } static fromJson(json={}) { @@ -884,7 +884,7 @@ Outbound.HttpSettings = class extends CommonClass { servers[0].address, servers[0].port, ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user, - ObjectUtil.isArrEmpty(servers[0].password) ? '' : servers[0].users[0].password, + ObjectUtil.isArrEmpty(servers[0].pass) ? '' : servers[0].users[0].pass, ); } @@ -893,7 +893,7 @@ Outbound.HttpSettings = class extends CommonClass { servers: [{ address: this.address, port: this.port, - users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, password: this.password}], + users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, pass: this.pass}], }], }; } diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 7b1caa91..590a1a93 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -94,12 +94,13 @@