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
path: root/sub
diff options
context:
space:
mode:
Diffstat (limited to 'sub')
-rw-r--r--sub/subJsonService.go4
-rw-r--r--sub/subService.go3
2 files changed, 6 insertions, 1 deletions
diff --git a/sub/subJsonService.go b/sub/subJsonService.go
index 742c403c..8d90876f 100644
--- a/sub/subJsonService.go
+++ b/sub/subJsonService.go
@@ -282,6 +282,9 @@ func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_ut
usersData[0].ID = client.ID
usersData[0].Level = 8
+ if inbound.Protocol == model.VMESS {
+ usersData[0].Security = client.Security
+ }
if inbound.Protocol == model.VLESS {
usersData[0].Flow = client.Flow
usersData[0].Encryption = "none"
@@ -371,6 +374,7 @@ type UserVnext struct {
Encryption string `json:"encryption,omitempty"`
Flow string `json:"flow,omitempty"`
ID string `json:"id"`
+ Security string `json:"security,omitempty"`
Level int `json:"level"`
}
diff --git a/sub/subService.go b/sub/subService.go
index 0ee18129..2f5b2f98 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -168,7 +168,7 @@ func (s *SubService) getLink(inbound *model.Inbound, email string) string {
}
func (s *SubService) genVmessLink(inbound *model.Inbound, email string) string {
- if inbound.Protocol != model.VMess {
+ if inbound.Protocol != model.VMESS {
return ""
}
obj := map[string]interface{}{
@@ -281,6 +281,7 @@ func (s *SubService) genVmessLink(inbound *model.Inbound, email string) string {
}
}
obj["id"] = clients[clientIndex].ID
+ obj["scy"] = clients[clientIndex].Security
externalProxies, _ := stream["externalProxy"].([]interface{})