🌈 Sync 2026-05-19 02:35:14

This commit is contained in:
github-actions[bot] committed 2026-05-19 02:35:14 +08:00
1 parent 595807ea37
commit ca5e918f4b
81 files changed
+12003 -3193

No files matched your search

@@ -103,8 +103,8 @@ function gen_outbound(flag, node, tag, proxy_table)
local run_socks_instance = true
if proxy_table ~= nil and type(proxy_table) == "table" then
proxy_tag = proxy_table.tag or nil
fragment = (proxy_table.fragment and node.protocol ~= "naive") and true or nil
record_fragment = (proxy_table.record_fragment and node.protocol ~= "naive") and true or nil
fragment = (proxy_table.fragment and node.protocol ~= "naive" and not node.hysteria2_realms) and true or nil
record_fragment = (proxy_table.record_fragment and node.protocol ~= "naive" and not node.hysteria2_realms) and true or nil
run_socks_instance = proxy_table.run_socks_instance
end
@@ -472,6 +472,7 @@ function gen_outbound(flag, node, tag, proxy_table)
table.insert(server_ports, range)
end
end
result.server_port = nil
end
protocol_table = {
server_ports = next(server_ports) and server_ports or nil,
@@ -528,6 +529,10 @@ function gen_outbound(flag, node, tag, proxy_table)
table.insert(server_ports, range)
end
end
result.server_port = nil
end
if node.hysteria2_realms then
server_ports = {}
end
local interval, interval_max
if next(server_ports) then
@@ -571,7 +576,18 @@ function gen_outbound(flag, node, tag, proxy_table)
return (t and t >= 2 and t <= 60) and t or nil
end)(node.hysteria2_keep_alive_period),
disable_path_mtu_discovery = version_ge_1_14_0 and (tonumber(node.hysteria2_disable_mtu_discovery) == 1) or nil,
tls = tls
tls = tls,
realm = node.hysteria2_realms and (function()
result.server = nil
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.stun_servers = realm.stun_servers or node.hysteria2_realm_stun
return realm
end
return nil
end)() or nil
}
end
@@ -908,7 +924,17 @@ function gen_config_server(node)
}
},
ignore_client_bandwidth = (node.hysteria2_ignore_client_bandwidth == "1") and true or false,
tls = tls
tls = tls,
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.stun_servers = realm.stun_servers or node.hysteria2_realm_stun
realm.stun_domain_resolver = "direct"
return realm
end
return nil
end)() or nil
}
end
@@ -2088,7 +2114,7 @@ function gen_config(var)
if not value.detour and value.server then
value.detour = "direct"
end
if value.server and not api.datatypes.hostname(value.server) then
if (value.server and not api.datatypes.hostname(value.server)) and not value.realm then
value.domain_resolver = nil
end
for k, v in pairs(config.outbounds[index]) do