mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-17 13:43:01 +08:00
update 2026-05-18 10:49:12
This commit is contained in:
1 parent
39a3fb3cf9
commit
cb4dc9ccde
4 files changed
+21
-9
No files matched your search
@@ -472,9 +472,10 @@ function get_valid_nodes()
|
||||
end
|
||||
end
|
||||
local port = e.port or e.hysteria_hop or e.hysteria2_hop
|
||||
if (port and e.address) or e.hysteria2_realms then
|
||||
local is_realm = (e.type == "Hysteria2" or e.protocol == 'hysteria2') and e.hysteria2_realms or nil
|
||||
if (port and e.address) or is_realm then
|
||||
local address = e.address
|
||||
if is_ip(address) or datatypes.hostname(address) or e.hysteria2_realms then
|
||||
if is_ip(address) or datatypes.hostname(address) or is_realm then
|
||||
if (e.type == "sing-box" or e.type == "Xray") and e.protocol then
|
||||
local protocol = e.protocol
|
||||
if protocol == "vmess" then
|
||||
@@ -501,10 +502,11 @@ function get_valid_nodes()
|
||||
type_name = type_name .. " " .. protocol
|
||||
end
|
||||
if is_ipv6(address) then address = get_ipv6_full(address) end
|
||||
type_name = is_realm and type_name .. " Realm" or type_name
|
||||
e["remark"] = trim("%s:[%s]" % {type_name, e.remarks})
|
||||
if show_node_info == "1" then
|
||||
port = (port or ""):gsub(":", "-")
|
||||
if not e.hysteria2_realms then
|
||||
if not is_realm then
|
||||
e["remark"] = trim("%s:[%s] %s:%s" % {type_name, e.remarks, address, port})
|
||||
end
|
||||
end
|
||||
@@ -596,6 +598,9 @@ function get_node_remarks(n)
|
||||
end
|
||||
type_name = type_name .. " " .. protocol
|
||||
end
|
||||
if (n.type == "Hysteria2" or n.protocol == 'hysteria2') and n.hysteria2_realms then
|
||||
type_name = type_name .. " Realm"
|
||||
end
|
||||
remarks = trim("%s:[%s]" % {type_name, n.remarks})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user