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:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-09-20 12:11:30 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-09-20 14:10:57 +0300
commit37c17357fc45b9acec387f3097be5db074ce880d (patch)
treea3a5aa82c7483c0883070185372c491537173c25 /sub/subService.go
parentb35d33966589f428053b77f51a92ec0214bd92fb (diff)
undo vnext for vmess
Diffstat (limited to 'sub/subService.go')
-rw-r--r--sub/subService.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/sub/subService.go b/sub/subService.go
index 9f28b35b..6204fdee 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -321,9 +321,6 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
if inbound.Protocol != model.VLESS {
return ""
}
- var vlessSettings model.VLESSSettings
- _ = json.Unmarshal([]byte(inbound.Settings), &vlessSettings)
-
var stream map[string]any
json.Unmarshal([]byte(inbound.StreamSettings), &stream)
clients, _ := s.inboundService.GetClients(inbound)
@@ -338,11 +335,15 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
port := inbound.Port
streamNetwork := stream["network"].(string)
params := make(map[string]string)
- if vlessSettings.Encryption != "" {
- params["encryption"] = vlessSettings.Encryption
- }
params["type"] = streamNetwork
+ // Add encryption parameter for VLESS from inbound settings
+ var settings map[string]any
+ json.Unmarshal([]byte(inbound.Settings), &settings)
+ if encryption, ok := settings["encryption"].(string); ok {
+ params["encryption"] = encryption
+ }
+
switch streamNetwork {
case "tcp":
tcp, _ := stream["tcpSettings"].(map[string]any)