From 07dc8c4803878399ffffb3df0bd0fa1c9ebfc009 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 10:04:21 +0000 Subject: Bump go.uber.org/atomic from 1.10.0 to 1.11.0 Bumps [go.uber.org/atomic](https://github.com/uber-go/atomic) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/uber-go/atomic/releases) - [Changelog](https://github.com/uber-go/atomic/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/atomic/compare/v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: go.uber.org/atomic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 56dbfdd1..0e82ce53 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/shirou/gopsutil/v3 v3.23.4 github.com/xtls/xray-core v1.8.1 - go.uber.org/atomic v1.10.0 + go.uber.org/atomic v1.11.0 golang.org/x/text v0.9.0 google.golang.org/grpc v1.54.0 gorm.io/driver/sqlite v1.5.0 diff --git a/go.sum b/go.sum index e3af703f..3c020b45 100644 --- a/go.sum +++ b/go.sum @@ -172,8 +172,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.starlark.net v0.0.0-20230302034142-4b1e35fe2254 h1:Ss6D3hLXTM0KobyBYEAygXzFfGcjnmfEJOBgSbemCtg= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -- cgit v1.2.3 From dbac48f05db6328bb9e19fc354c61d1a9e85de74 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Thu, 4 May 2023 20:58:16 +0430 Subject: 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() } -- cgit v1.2.3 From 4f8de18d1f21518b98aba82cbf14d2d23c0c178c Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Thu, 4 May 2023 21:09:08 +0430 Subject: 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 | 775 ----------------------------------------- web/html/xui/settings.html | 775 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 779 insertions(+), 779 deletions(-) delete mode 100644 web/html/xui/setting.html create mode 100644 web/html/xui/settings.html 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/setting.html deleted file mode 100644 index 7cbb44a2..00000000 --- a/web/html/xui/setting.html +++ /dev/null @@ -1,775 +0,0 @@ - - -{{template "head" .}} - - - - - {{ template "commonSider" . }} - - - - - - {{ i18n "pages.setting.save" }} - {{ i18n "pages.setting.restartPanel" }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ i18n "confirm" }} - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ i18n "confirm" }} - - - - - {{ i18n "pages.setting.actions"}} - - {{ i18n "pages.setting.resetDefaultConfig" }} - - - {{ i18n "pages.setting.basicTemplate"}} - - - -

- - {{ i18n "pages.setting.generalConfigsDesc" }} -

-
- - - - -
- - -

- - {{ i18n "pages.setting.countryConfigsDesc" }} -

-
- - - - - - -
- - -

- - {{ i18n "pages.setting.ipv4ConfigsDesc" }} -

-
- - -
- - -

- - {{ i18n "pages.setting.warpConfigsDesc" }} -

-
- - - - -
-
- - {{ i18n "pages.setting.advancedTemplate"}} - - - - - - - - - - - - - {{ i18n "pages.setting.completeTemplate"}} - -
-
- - - - - - - - - - - - - - - - - -
-
-
-
-
-
- {{template "js" .}} - {{template "component/setting"}} - - - - diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html new file mode 100644 index 00000000..7cbb44a2 --- /dev/null +++ b/web/html/xui/settings.html @@ -0,0 +1,775 @@ + + +{{template "head" .}} + + + + + {{ template "commonSider" . }} + + + + + + {{ i18n "pages.setting.save" }} + {{ i18n "pages.setting.restartPanel" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ i18n "confirm" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ i18n "confirm" }} + + + + + {{ i18n "pages.setting.actions"}} + + {{ i18n "pages.setting.resetDefaultConfig" }} + + + {{ i18n "pages.setting.basicTemplate"}} + + + +

+ + {{ i18n "pages.setting.generalConfigsDesc" }} +

+
+ + + + +
+ + +

+ + {{ i18n "pages.setting.countryConfigsDesc" }} +

+
+ +