From 4245bee1d1dc9bf38816d219986c327a0124b51e Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Sat, 18 Apr 2026 01:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dvless=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/service/node.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/internal/service/node.go b/internal/service/node.go index 672ee83..430548e 100644 --- a/internal/service/node.go +++ b/internal/service/node.go @@ -285,10 +285,12 @@ func BuildNodeConfig(node *model.Server) NodeServerConfig { response.Flow = getMapString(settings, "flow") response.Multiplex = getMapAny(settings, "multiplex") response.UTLS = getMapAny(settings, "utls") - response.Decryption = nil + response.Decryption = "none" if encryption, ok := settings["encryption"].(map[string]any); ok { if enabled, ok := encryption["enabled"].(bool); ok && enabled { - response.Decryption = stringify(encryption["decryption"]) + if dec := stringify(encryption["decryption"]); dec != "" { + response.Decryption = dec + } } } if getMapInt(settings, "tls") == 2 { @@ -393,10 +395,12 @@ func BuildNodeConfigPayload(node *model.Server) map[string]any { response["tls"] = getMapInt(settings, "tls") response["flow"] = getMapAny(settings, "flow") response["multiplex"] = getMapAny(settings, "multiplex") - response["decryption"] = nil + response["decryption"] = "none" if encryption, ok := settings["encryption"].(map[string]any); ok { if enabled, ok := encryption["enabled"].(bool); ok && enabled { - response["decryption"] = encryption["decryption"] + if dec := stringify(encryption["decryption"]); dec != "" { + response["decryption"] = dec + } } } if getMapInt(settings, "tls") == 2 {