Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHo3ein <ho3ein.sanaei@gmail.com>2023-05-05 00:19:23 +0300
committerGitHub <noreply@github.com>2023-05-05 00:19:23 +0300
commite164c7e7801c2c0a9cae9bc0516f84cdee86672b (patch)
tree8c1cd095b31723d8a16c78c8e65089f841450c37 /web/service/sub.go
parent20bfd71cf18cc60a5e118fc848eb62e49b50906e (diff)
parent481d4beabb2625c51440c734654de24b18d9e1b1 (diff)
Merge pull request #332 from hamid-gh98/main
[Update] sub remark + settings UI
Diffstat (limited to 'web/service/sub.go')
-rw-r--r--web/service/sub.go9
1 files 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()
}