fix vless flow in client configs #354

This commit is contained in:
Alireza Ahmadi
2025-01-07 02:25:20 +01:00
parent 9e63944d83
commit 7621b7a348
2 changed files with 16 additions and 13 deletions
+6 -2
View File
@@ -105,9 +105,13 @@ func (s *ClientService) updateLinksWithFixedInbounds(tx *gorm.DB, clients []*mod
}
}
for index, client := range clients {
var clientLinks, newClientLinks []map[string]string
json.Unmarshal(client.Links, &clientLinks)
var clientLinks []map[string]string
err = json.Unmarshal(client.Links, &clientLinks)
if err != nil {
return err
}
newClientLinks := []map[string]string{}
for _, inbound := range inbounds {
newLinks := util.LinkGenerator(client.Config, &inbound, hostname)
for _, newLink := range newLinks {