🔥 Sync 2026-06-09 21:02:42

This commit is contained in:
github-actions[bot]
2026-06-09 21:02:42 +08:00
parent 7631f7bfff
commit dccbeb60e0
10 changed files with 101 additions and 42 deletions
@@ -583,8 +583,9 @@ function gen_outbound(flag, node, tag, proxy_table)
result.server_port = nil
local realm = api.parse_realm_uri(node.hysteria2_realm_url)
if realm then
realm.server_url = realm.server_url and "https://" .. realm.server_url or nil
realm.server_url = (realm.scheme == "realm+http" and "http://" or "https://") .. realm.server_url
realm.stun_servers = realm.stun_servers or node.hysteria2_realm_stun
realm.scheme = nil
return realm
end
return nil
@@ -929,8 +930,9 @@ function gen_config_server(node)
realm = node.hysteria2_realms and (function()
local realm = api.parse_realm_uri(node.hysteria2_realm_url)
if realm then
realm.server_url = realm.server_url and "https://" .. realm.server_url or nil
realm.server_url = (realm.scheme == "realm+http" and "http://" or "https://") .. realm.server_url
realm.stun_servers = realm.stun_servers or node.hysteria2_realm_stun
realm.scheme = nil
realm.stun_domain_resolver = "direct"
return realm
end