From dbac48f05db6328bb9e19fc354c61d1a9e85de74 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Thu, 4 May 2023 20:58:16 +0430 Subject: [PATCH 1/6] updated sub remark to include inbound name --- web/service/sub.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/service/sub.go b/web/service/sub.go index 2aaee06a..69cafda1 100644 --- a/web/service/sub.go +++ b/web/service/sub.go @@ -105,9 +105,10 @@ func (s *SubService) genVmessLink(inbound *model.Inbound, email string) string { if inbound.Protocol != model.VMess { return "" } + remark := fmt.Sprintf("%s-%s", inbound.Remark, email) obj := map[string]interface{}{ "v": "2", - "ps": email, + "ps": remark, "add": s.address, "port": inbound.Port, "type": "none", @@ -380,7 +381,8 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { // Set the new query values on the URL url.RawQuery = q.Encode() - url.Fragment = email + remark := fmt.Sprintf("%s-%s", inbound.Remark, email) + url.Fragment = remark return url.String() } @@ -558,7 +560,8 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string // Set the new query values on the URL url.RawQuery = q.Encode() - url.Fragment = email + remark := fmt.Sprintf("%s-%s", inbound.Remark, email) + url.Fragment = remark return url.String() } From 4f8de18d1f21518b98aba82cbf14d2d23c0c178c Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Thu, 4 May 2023 21:09:08 +0430 Subject: [PATCH 2/6] renamed setting.html to settings.html and update its route name --- web/controller/xui.go | 6 +++--- web/html/xui/common_sider.html | 2 +- web/html/xui/{setting.html => settings.html} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename web/html/xui/{setting.html => settings.html} (100%) diff --git a/web/controller/xui.go b/web/controller/xui.go index 5832be84..c836057a 100644 --- a/web/controller/xui.go +++ b/web/controller/xui.go @@ -23,7 +23,7 @@ func (a *XUIController) initRouter(g *gin.RouterGroup) { g.GET("/", a.index) g.GET("/inbounds", a.inbounds) - g.GET("/setting", a.setting) + g.GET("/settings", a.settings) a.inboundController = NewInboundController(g) a.settingController = NewSettingController(g) @@ -37,6 +37,6 @@ func (a *XUIController) inbounds(c *gin.Context) { html(c, "inbounds.html", "pages.inbounds.title", nil) } -func (a *XUIController) setting(c *gin.Context) { - html(c, "setting.html", "pages.setting.title", nil) +func (a *XUIController) settings(c *gin.Context) { + html(c, "settings.html", "pages.setting.title", nil) } diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html index 278dc4e5..c7765d60 100644 --- a/web/html/xui/common_sider.html +++ b/web/html/xui/common_sider.html @@ -7,7 +7,7 @@ {{ i18n "menu.inbounds"}} - + {{ i18n "menu.setting"}} diff --git a/web/html/xui/setting.html b/web/html/xui/settings.html similarity index 100% rename from web/html/xui/setting.html rename to web/html/xui/settings.html From a18cbdcf11bdc2b19c0fd6cf2aa16bc00b3b9971 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Thu, 4 May 2023 21:27:42 +0430 Subject: [PATCH 3/6] changed number input tags to 'a-input-number' --- web/html/xui/client_bulk_modal.html | 4 ++-- web/html/xui/component/setting.html | 2 +- web/html/xui/form/client.html | 6 +++--- web/html/xui/form/inbound.html | 2 +- web/html/xui/form/protocol/dokodemo.html | 2 +- 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/form/stream/stream_kcp.html | 16 ++++++++-------- web/html/xui/form/tls_settings.html | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index 00e385b1..827fc951 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -43,7 +43,7 @@ - + @@ -79,7 +79,7 @@ - + diff --git a/web/html/xui/component/setting.html b/web/html/xui/component/setting.html index 00eeb259..efd61684 100644 --- a/web/html/xui/component/setting.html +++ b/web/html/xui/component/setting.html @@ -9,7 +9,7 @@