mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-09 12:50:59 +00:00
fix(sub): emit VLESS encryption in Clash configs (#5053)
Co-authored-by: jq <fs187438@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user