mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 10:43:56 +08:00
🏅 Sync 2026-05-16 23:47:29
This commit is contained in:
1 parent
2868347dd9
commit
22f46d41d8
4 files changed
+18
-9
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-passwall
|
PKG_NAME:=luci-app-passwall
|
||||||
PKG_VERSION:=26.5.11
|
PKG_VERSION:=26.5.11
|
||||||
PKG_RELEASE:=125
|
PKG_RELEASE:=126
|
||||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
|||||||
@@ -358,11 +358,13 @@ function is_special_node(e)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function is_ip(val)
|
function is_ip(val)
|
||||||
|
val = trim(val):lower()
|
||||||
local str = val:match("%[(.-)%]") or val
|
local str = val:match("%[(.-)%]") or val
|
||||||
return datatypes.ipaddr(str) or false
|
return datatypes.ipaddr(str) or false
|
||||||
end
|
end
|
||||||
|
|
||||||
function is_ipv6(val)
|
function is_ipv6(val)
|
||||||
|
val = trim(val):lower()
|
||||||
local str = val:match("%[(.-)%]") or val
|
local str = val:match("%[(.-)%]") or val
|
||||||
return datatypes.ip6addr(str) or false
|
return datatypes.ip6addr(str) or false
|
||||||
end
|
end
|
||||||
@@ -470,9 +472,9 @@ function get_valid_nodes()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local port = e.port or e.hysteria_hop or e.hysteria2_hop
|
local port = e.port or e.hysteria_hop or e.hysteria2_hop
|
||||||
if port and e.address then
|
if (port and e.address) or e.hysteria2_realms then
|
||||||
local address = e.address
|
local address = e.address
|
||||||
if is_ip(address) or datatypes.hostname(address) then
|
if is_ip(address) or datatypes.hostname(address) or e.hysteria2_realms then
|
||||||
if (e.type == "sing-box" or e.type == "Xray") and e.protocol then
|
if (e.type == "sing-box" or e.type == "Xray") and e.protocol then
|
||||||
local protocol = e.protocol
|
local protocol = e.protocol
|
||||||
if protocol == "vmess" then
|
if protocol == "vmess" then
|
||||||
@@ -501,8 +503,10 @@ function get_valid_nodes()
|
|||||||
if is_ipv6(address) then address = get_ipv6_full(address) end
|
if is_ipv6(address) then address = get_ipv6_full(address) end
|
||||||
e["remark"] = trim("%s:[%s]" % {type_name, e.remarks})
|
e["remark"] = trim("%s:[%s]" % {type_name, e.remarks})
|
||||||
if show_node_info == "1" then
|
if show_node_info == "1" then
|
||||||
port = port:gsub(":", "-")
|
port = (port or ""):gsub(":", "-")
|
||||||
e["remark"] = trim("%s:[%s] %s:%s" % {type_name, e.remarks, address, port})
|
if not e.hysteria2_realms then
|
||||||
|
e["remark"] = trim("%s:[%s] %s:%s" % {type_name, e.remarks, address, port})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
e.node_type = "normal"
|
e.node_type = "normal"
|
||||||
if not e.group or e.group == "" then
|
if not e.group or e.group == "" then
|
||||||
|
|||||||
@@ -61,15 +61,16 @@ function gen_config(var)
|
|||||||
local local_http_password = var["local_http_password"]
|
local local_http_password = var["local_http_password"]
|
||||||
local tcp_proxy_way = var["tcp_proxy_way"]
|
local tcp_proxy_way = var["tcp_proxy_way"]
|
||||||
local server_host = var["server_host"] or (node.address or ""):lower()
|
local server_host = var["server_host"] or (node.address or ""):lower()
|
||||||
local server_port = var["server_port"] or (node.port or "443")
|
local server_port = var["server_port"] or node.port
|
||||||
|
|
||||||
if api.is_ipv6(server_host) then
|
if api.is_ipv6(server_host) then
|
||||||
server_host = api.get_ipv6_full(server_host)
|
server_host = api.get_ipv6_full(server_host)
|
||||||
end
|
end
|
||||||
local server = server_host .. ":" .. server_port
|
|
||||||
|
|
||||||
if (node.hysteria2_hop) then
|
local server = server_host .. (server_port and ":" .. server_port or "")
|
||||||
server = server .. "," .. string.gsub(node.hysteria2_hop, ":", "-")
|
|
||||||
|
if node.hysteria2_hop then
|
||||||
|
server = server .. (server_port and "," or ":") .. string.gsub(node.hysteria2_hop, ":", "-")
|
||||||
end
|
end
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@@ -374,6 +374,10 @@ run_socks() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${error_msg}" ] && [ "$(config_n_get $node hysteria2_realms)" = "1" ]; then
|
||||||
|
unset error_msg
|
||||||
|
fi
|
||||||
|
|
||||||
[ -n "${error_msg}" ] && {
|
[ -n "${error_msg}" ] && {
|
||||||
[ "$bind" != "127.0.0.1" ] && echolog " - Socks节点:[$remarks]${tmp},启动中止 ${bind}:${socks_port} ${error_msg}"
|
[ "$bind" != "127.0.0.1" ] && echolog " - Socks节点:[$remarks]${tmp},启动中止 ${bind}:${socks_port} ${error_msg}"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in new issue
Block a user