From 769590d77993d8c26bfb9d056cb94d870cf6c745 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 22 May 2023 18:06:34 +0330 Subject: [feature] separate subscription service Co-Authored-By: Alireza Ahmadi --- web/html/xui/client_bulk_modal.html | 6 ++++-- web/html/xui/form/client.html | 4 ++-- web/html/xui/form/protocol/shadowsocks.html | 4 ++-- web/html/xui/form/protocol/trojan.html | 4 ++-- web/html/xui/form/protocol/vless.html | 4 ++-- web/html/xui/form/protocol/vmess.html | 4 ++-- web/html/xui/inbounds.html | 28 +++++++++++++++++++++++----- web/html/xui/settings.html | 18 ++++++++++++++++++ 8 files changed, 55 insertions(+), 17 deletions(-) (limited to 'web/html') diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index 076579a9..48eb2cbc 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -33,7 +33,7 @@ {{ i18n "pages.client.clientCount" }} - + Subscription @@ -45,7 +45,7 @@ - + Telegram ID @@ -204,6 +204,7 @@ case Protocols.VMESS: return clientSettings.vmesses; case Protocols.VLESS: return clientSettings.vlesses; case Protocols.TROJAN: return clientSettings.trojans; + case Protocols.SHADOWSOCKS: return clientSettings.shadowsockses; default: return null; } }, @@ -212,6 +213,7 @@ case Protocols.VMESS: return new Inbound.VmessSettings.Vmess(); case Protocols.VLESS: return new Inbound.VLESSSettings.VLESS(); case Protocols.TROJAN: return new Inbound.TrojanSettings.Trojan(); + case Protocols.SHADOWSOCKS: return new Inbound.ShadowsocksSettings.Shadowsocks(); default: return null; } }, diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index 625ff0ca..9494f0ac 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -34,7 +34,7 @@ - + Subscription @@ -47,7 +47,7 @@ - + Telegram ID diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html index aa3fde18..45385300 100644 --- a/web/html/xui/form/protocol/shadowsocks.html +++ b/web/html/xui/form/protocol/shadowsocks.html @@ -18,7 +18,7 @@ - + Subscription @@ -31,7 +31,7 @@ - + Telegram ID diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index b6a57644..caec459a 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -18,7 +18,7 @@ - + Subscription @@ -31,7 +31,7 @@ - + Telegram ID diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index f2678065..3155ee28 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -18,7 +18,7 @@ - + Subscription @@ -31,7 +31,7 @@ - + Telegram ID diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html index d46c16f9..469440c6 100644 --- a/web/html/xui/form/protocol/vmess.html +++ b/web/html/xui/form/protocol/vmess.html @@ -23,7 +23,7 @@ - + Subscription @@ -36,7 +36,7 @@ - + Telegram ID diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index b15798d4..e4d76f7e 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -343,7 +343,15 @@ clientCount: {}, isRefreshEnabled: localStorage.getItem("isRefreshEnabled") === "true" ? true : false, refreshing: false, - refreshInterval: Number(localStorage.getItem("refreshInterval")) || 5000 + refreshInterval: Number(localStorage.getItem("refreshInterval")) || 5000, + subSettings: { + enable : false, + port: 0, + path: '', + domain: '', + tls: false + }, + tgBotEnable: false }, methods: { loading(spinning = true) { @@ -365,10 +373,20 @@ if (!msg.success) { return; } - this.expireDiff = msg.obj.expireDiff * 86400000; - this.trafficDiff = msg.obj.trafficDiff * 1073741824; - this.defaultCert = msg.obj.defaultCert; - this.defaultKey = msg.obj.defaultKey; + with(msg.obj){ + this.expireDiff = expireDiff * 86400000; + this.trafficDiff = trafficDiff * 1073741824; + this.defaultCert = defaultCert; + this.defaultKey = defaultKey; + this.tgBotEnable = tgBotEnable; + this.subSettings = { + enable : subEnable, + port: subPort, + path: subPath, + domain: subDomain, + tls: subTLS + }; + } }, setInbounds(dbInbounds) { this.inbounds.splice(0); diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index f5ea4994..b838b17f 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -363,6 +363,24 @@ + + +

+ + {{ i18n "pages.settings.infoDesc" }} +

+
+ + + + + + + + + + +
-- cgit v1.2.3