🛸 Sync 2026-08-19 20:38:21

This commit is contained in:
github-actions[bot] committed 2026-08-19 20:38:21 +08:00
1 parent 7549efdb5e
commit 7cb3d8fcff
55 files changed
+403 -252

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall2
PKG_VERSION:=26.8.17
PKG_RELEASE:=90
PKG_RELEASE:=91
PKG_PO_VERSION:=$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
@@ -63,15 +63,9 @@ o:value("shadowsocks", "Shadowsocks")
o:value("trojan", "Trojan")
o:value("hysteria2", "Hysteria2")
o:value("wireguard", "WireGuard")
o:value("dokodemo-door", "dokodemo-door")
o:value("tunnel", "Tunnel")
o:depends({ custom = false })
o = s:option(DummyValue, "is_endpoint", "")
o.not_rewrite = true
o.template = m:template_path("/cbi/hidevalue")
o.value = "1"
o:depends({ custom = false, protocol = "wireguard" })
o = s:option(Value, "port", translate("Listen Port"))
o.datatype = "port"
o:depends({ custom = false })
@@ -93,14 +87,14 @@ o = s:option(ListValue, "d_protocol", translate("Destination protocol"))
o:value("tcp", "TCP")
o:value("udp", "UDP")
o:value("tcp,udp", "TCP,UDP")
o:depends({ protocol = "dokodemo-door" })
o:depends({ protocol = "tunnel" })
o = s:option(Value, "d_address", translate("Destination address"))
o:depends({ protocol = "dokodemo-door" })
o:depends({ protocol = "tunnel" })
o = s:option(Value, "d_port", translate("Destination port"))
o.datatype = "port"
o:depends({ protocol = "dokodemo-door" })
o:depends({ protocol = "tunnel" })
o = s:option(Value, "decryption", translate("Encrypt Method") .. " (decryption)")
o.default = "none"
@@ -416,7 +410,8 @@ end
--[[acceptProxyProtocol]]
o = s:option(Flag, "acceptProxyProtocol", translate("acceptProxyProtocol"), translate("Whether to receive PROXY protocol, when this node want to be fallback or forwarded by proxy, it must be enable, otherwise it cannot be used."))
o.default = "0"
o:depends({ custom = false, is_endpoint = "" })
o:depends({ transport = "raw" })
o:depends({ transport = "ws" })
--[[Fast Open]]
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"))
@@ -575,11 +575,11 @@ function gen_config_server(node)
version = 2,
users = users
}
elseif node.protocol == "dokodemo-door" then
elseif node.protocol == "tunnel" then
settings = {
network = node.d_protocol,
address = node.d_address,
port = tonumber(node.d_port)
allowedNetwork = node.d_protocol,
rewriteAddress = node.d_address,
rewritePort = tonumber(node.d_port)
}
elseif node.protocol == "wireguard" then
settings = {
@@ -1227,8 +1227,8 @@ function gen_config(var)
tag = in_tag,
listen = "127.0.0.1",
port = new_port,
protocol = "dokodemo-door",
settings = {network = "tcp,udp", address = to_node.address, port = tonumber(to_node.port)}
protocol = "tunnel",
settings = {allowedNetwork = "tcp,udp", rewriteAddress = to_node.address, rewritePort = tonumber(to_node.port)}
})
if to_node.tls_serverName == nil then
to_node.tls_serverName = to_node.address
@@ -1712,11 +1712,10 @@ function gen_config(var)
table.insert(inbounds, {
listen = "127.0.0.1",
port = tonumber(dns_listen_port),
protocol = "dokodemo-door",
protocol = "tunnel",
tag = "dns-in",
settings = {
address = "0.0.0.0",
network = "tcp,udp"
allowedNetwork = "tcp,udp"
}
})
local direct_type_dns = {
@@ -1949,8 +1948,8 @@ function gen_config(var)
if redir_port then
local inbound = {
port = tonumber(redir_port),
protocol = "dokodemo-door",
settings = {network = "tcp,udp", followRedirect = true},
protocol = "tunnel",
settings = {allowedNetwork = "tcp,udp", followRedirect = true},
streamSettings = {sockopt = {tproxy = "tproxy"}},
sniffing = {
enabled = xray_settings.sniffing_override_dest == "1" or node.protocol == "_shunt"
@@ -1975,13 +1974,13 @@ function gen_config(var)
local tcp_inbound = api.clone(inbound)
tcp_inbound.tag = "tcp_redir"
tcp_inbound.settings.network = "tcp"
tcp_inbound.settings.allowedNetwork = "tcp"
tcp_inbound.streamSettings.sockopt.tproxy = tcp_proxy_way
table.insert(inbounds, tcp_inbound)
local udp_inbound = api.clone(inbound)
udp_inbound.tag = "udp_redir"
udp_inbound.settings.network = "udp"
udp_inbound.settings.allowedNetwork = "udp"
table.insert(inbounds, udp_inbound)
end
@@ -18,9 +18,10 @@ while [ "$ENABLED" -eq 1 ]; do
for filename in $(ls ${TMP_SCRIPT_FUNC_PATH} | grep -v "^_"); do
cmd=$(cat ${TMP_SCRIPT_FUNC_PATH}/${filename})
cmd_check=$(echo $cmd | awk -F '>' '{print $1}')
icount=$(busybox pgrep -f "$(echo $cmd_check)" | wc -l)
escape_cmd="$(echo $cmd_check | sed 's/[^a-zA-Z0-9]/\\&/g')"
icount=$(busybox pgrep -f "${escape_cmd}" | wc -l)
if [ $icount = 0 ]; then
#echo "${cmd} crashed, restarting." >> /tmp/log/passwall2.log
log 0 "${cmd} crashed, restarting."
eval $(echo "nohup ${cmd} 2>&1 &") >/dev/null 2>&1 &
fi
done