refactor: Improve proxy config masking

This commit is contained in:
Ivan K
2024-12-13 19:28:34 +03:00
parent ab5e0afb92
commit e31b8b79a4

View File

@@ -1132,12 +1132,15 @@ check_proxy() {
fi fi
jq ' jq '
.outbounds |= map(. + { walk(
uuid: "MASKED-UUID", if type == "object" then
server: "MASKED-SERVER", with_entries(
tls: (if .tls.reality then .tls + {reality: (.reality + {public_key: "MASKED-PUBLIC-KEY"})} else .tls end) if [.key] | inside(["uuid", "server", "server_name", "password", "public_key", "short_id"]) then
}) .value = "MASKED"
' $SING_BOX_CONFIG else . end
)
else . end
)' $SING_BOX_CONFIG
nolog "Checking proxy connection..." nolog "Checking proxy connection..."