修复vless错误下发的字段
Some checks failed
build / build (api, amd64, linux) (push) Failing after -48s
build / build (api, arm64, linux) (push) Failing after -51s
build / build (api.exe, amd64, windows) (push) Failing after -51s

This commit is contained in:
CN-JS-HuiBai
2026-04-18 01:09:24 +08:00
parent 515b5ae9de
commit 4245bee1d1

View File

@@ -285,10 +285,12 @@ func BuildNodeConfig(node *model.Server) NodeServerConfig {
response.Flow = getMapString(settings, "flow") response.Flow = getMapString(settings, "flow")
response.Multiplex = getMapAny(settings, "multiplex") response.Multiplex = getMapAny(settings, "multiplex")
response.UTLS = getMapAny(settings, "utls") response.UTLS = getMapAny(settings, "utls")
response.Decryption = nil response.Decryption = "none"
if encryption, ok := settings["encryption"].(map[string]any); ok { if encryption, ok := settings["encryption"].(map[string]any); ok {
if enabled, ok := encryption["enabled"].(bool); ok && enabled { 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 { if getMapInt(settings, "tls") == 2 {
@@ -393,10 +395,12 @@ func BuildNodeConfigPayload(node *model.Server) map[string]any {
response["tls"] = getMapInt(settings, "tls") response["tls"] = getMapInt(settings, "tls")
response["flow"] = getMapAny(settings, "flow") response["flow"] = getMapAny(settings, "flow")
response["multiplex"] = getMapAny(settings, "multiplex") response["multiplex"] = getMapAny(settings, "multiplex")
response["decryption"] = nil response["decryption"] = "none"
if encryption, ok := settings["encryption"].(map[string]any); ok { if encryption, ok := settings["encryption"].(map[string]any); ok {
if enabled, ok := encryption["enabled"].(bool); ok && enabled { 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 { if getMapInt(settings, "tls") == 2 {