fix(sub): emit VLESS encryption in Clash configs (#5053)

Co-authored-by: jq <fs187438@gmail.com>
This commit is contained in:
jq
2026-06-08 20:39:54 +08:00
committed by GitHub
parent 1ca5924a44
commit 46684dd164
2 changed files with 64 additions and 2 deletions
+5 -2
View File
@@ -221,8 +221,11 @@ func (s *SubClashService) buildProxy(inbound *model.Inbound, client model.Client
}
var inboundSettings map[string]any
json.Unmarshal([]byte(inbound.Settings), &inboundSettings)
if encryption, ok := inboundSettings["encryption"].(string); ok && encryption != "" {
proxy["packet-encoding"] = encryption
if encryption, ok := inboundSettings["encryption"].(string); ok {
encryption = strings.TrimSpace(encryption)
if encryption != "" && encryption != "none" {
proxy["encryption"] = encryption
}
}
case model.Trojan:
proxy["type"] = "trojan"