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 {