修复vless错误下发的字段
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user