update 2026-08-29 00:27:35

This commit is contained in:
action
2026-08-29 00:27:35 +08:00
parent 1de7860148
commit 79f234d9d7
10 changed files with 34 additions and 16 deletions
@@ -857,7 +857,8 @@ local backup_files = {
"/usr/share/passwall/rules/direct_host",
"/usr/share/passwall/rules/direct_ip",
"/usr/share/passwall/rules/proxy_host",
"/usr/share/passwall/rules/proxy_ip"
"/usr/share/passwall/rules/proxy_ip",
"/usr/share/passwall/rules/domains_excluded"
}
function create_backup()
@@ -193,7 +193,7 @@ if has_xray then
o.default = 0
o.description = translate("Override the connection destination address with the sniffed domain.<br />Otherwise use sniffed domain for routing only.<br />If using shunt nodes, configure the domain shunt rules correctly.")
local domains_excluded = string.format("/usr/share/%s/domains_excluded", m.config)
local domains_excluded = string.format("/usr/share/%s/rules/domains_excluded", m.config)
o = s_xray:option(TextValue, "excluded_domains", translate("Excluded Domains"), translate("If the traffic sniffing result is in this list, the destination address will not be overridden."))
o.rows = 15
o.wrap = "off"
@@ -2098,7 +2098,7 @@ function gen_config(var)
query_type = dns_rule_query_type,
server = fakedns_tag,
disable_cache = true,
rewrite_ttl = tonumber(remote_rewrite_ttl)
rewrite_ttl = 30
}
table.insert(dns.rules, fakedns_dns_rule)
end
@@ -15,7 +15,7 @@ local xray_version = api.get_app_version("xray")
local xray_min_version = "26.3.27"
local function get_domain_excluded()
local path = "/usr/share/passwall/domains_excluded"
local path = string.format("/usr/share/%s/rules/domains_excluded", api.c_config)
local content = fs.readfile(path)
if not content then return nil end
local hosts = {}
+2 -2
View File
@@ -2098,10 +2098,10 @@ msgid "Access Control:"
msgstr "访问控制:"
msgid "Add node to the load balancer is directly connected to %s[%s]."
msgstr "加入负载均衡节点到%s[%s]直连完成。"
msgstr "加入负载均衡节点IP到%s[%s]直连豁免(防回环)完成。"
msgid "Add all %s nodes to %s[%s] direct connection complete."
msgstr "加入所有%s节点到%s[%s]直连完成。"
msgstr "加入所有%s节点服务器IP到%s[%s]直连豁免(防回环)完成。"
msgid "Starting to load %s firewall rules..."
msgstr "开始加载 %s 防火墙规则..."
@@ -557,6 +557,7 @@ load_acl() {
}
filter_haproxy() {
[ "$(config_n_get @global_haproxy[0] balancing_enable 0)" != "1" ] && return
for item in $(uci show $CONFIG | grep ".lbss=" | cut -d "'" -f 2); do
local ip=$(get_host_ip ipv4 $(echo $item | awk -F ":" '{print $1}') 1)
[ -n "$ip" ] && ipset -q add $IPSET_VPS $ip
@@ -565,10 +566,16 @@ filter_haproxy() {
}
filter_vpsip() {
uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | grep -v "^127\.0\.0\.1$" | sed -e "/^$/d" | sed -e "s/^/add $IPSET_VPS &/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R
#log 1 "$(i18n "Add all %s nodes to %s[%s] direct connection complete." "IPv4" "ipset" "${$IPSET_VPS}")"
uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "/^$/d" | sed -e "s/^/add $IPSET_VPS6 &/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R
#log 1 "$(i18n "Add all %s nodes to %s[%s] direct connection complete." "IPv6" "ipset" "${$IPSET_VPS6}")"
local ipv4_addrs=$(uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | grep -v "^127\.0\.0\.1$")
[ -n "$ipv4_addrs" ] && {
echo "$ipv4_addrs" | sed -e "/^$/d" | sed -e "s/^/add $IPSET_VPS &/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R
log 1 "$(i18n "Add all %s nodes to %s[%s] direct connection complete." "IPv4" "ipset" "${IPSET_VPS}")"
}
local ipv6_addrs=$(uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}")
[ -n "$ipv6_addrs" ] && {
echo "$ipv6_addrs" | sed -e "/^$/d" | sed -e "s/^/add $IPSET_VPS6 &/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R
log 1 "$(i18n "Add all %s nodes to %s[%s] direct connection complete." "IPv6" "ipset" "${IPSET_VPS6}")"
}
}
filter_server_port() {
@@ -585,6 +585,7 @@ load_acl() {
}
filter_haproxy() {
[ "$(config_n_get @global_haproxy[0] balancing_enable 0)" != "1" ] && return
for item in $(uci show $CONFIG | grep ".lbss=" | cut -d "'" -f 2); do
get_host_ip ipv4 $(echo $item | awk -F ":" '{print $1}') 1
done | insert_nftset $NFTSET_VPS "-1"
@@ -602,10 +603,16 @@ filter_vps_addr() {
}
filter_vpsip() {
uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | grep -v "^127\.0\.0\.1$" | insert_nftset $NFTSET_VPS "-1"
#log 1 "$(i18n "Add all %s nodes to %s[%s] direct connection complete." "IPv4" "nftset" "${$NFTSET_VPS}")"
uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | insert_nftset $NFTSET_VPS6 "-1"
#log 1 "$(i18n "Add all %s nodes to %s[%s] direct connection complete." "IPv6" "nftset" "${$NFTSET_VPS6}")"
local ipv4_addrs=$(uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | grep -v "^127\.0\.0\.1$")
[ -n "$ipv4_addrs" ] && {
echo "$ipv4_addrs" | insert_nftset $NFTSET_VPS "-1"
log_i18n 1 "Add all %s nodes to %s[%s] direct connection complete." "IPv4" "nftset" "${NFTSET_VPS}"
}
local ipv6_addrs=$(uci show $CONFIG | grep -E "(.address=|.download_address=)" | cut -d "'" -f 2 | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}")
[ -n "$ipv6_addrs" ] && {
echo "$ipv6_addrs" | insert_nftset $NFTSET_VPS6 "-1"
log_i18n 1 "Add all %s nodes to %s[%s] direct connection complete." "IPv6" "nftset" "${NFTSET_VPS6}"
}
}
filter_server_port() {
+1 -1
View File
@@ -11,7 +11,7 @@ LUCI_DEPENDS:=+luci-lib-xterm +taskd
LUCI_EXTRA_DEPENDS:=taskd (>=1.0.3)
LUCI_PKGARCH:=all
PKG_VERSION:=1.0.25
PKG_VERSION:=1.0.26
PKG_RELEASE:=
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>
+3
View File
@@ -48,3 +48,6 @@ msgstr "任务执行失败!"
msgid "Click the button in the upper right corner of the dialog box to close it, or click here to view the log"
msgstr "点击对话框右上角按钮关闭,或者点此查看日志"
msgid "Upgrade"
msgstr "升级"
@@ -1,7 +1,7 @@
<% if luci.sys.exec("echo -n `uci -q get base_config.@status[0].links`") ~= "0" then %>
<script>
var links = document.createElement('div');
links.innerHTML ='<table class="table"><tr class="tr"><td class="td left"><a href="https://openwrt.ai/" target="_blank">固件下载与定制</a></td><td class="td left" width="25%"><a href="https://openwrt.ai/fadian/" target="_blank" style="color:orangered">赞助</a></td><td class="td left" width="25%"><a href="https://t.me/opwrt" target="_blank">TG频道</a></td><td class="td left" width="25%"><a href="https://github.com/kiddin9/OpenWrt_x86-r2s-r4s" target="_blank">源码与反馈</a></td></tr></table>';
links.innerHTML ='<table class="table"><tr class="tr"><td class="td left"><a href="https://openwrt.ai/" target="_blank">固件下载与定制</a></td><td class="td left" width="25%"><a href="https://openwrt.ai/fadian/" target="_blank" style="color:orangered">赞助</a></td><td class="td left" width="25%"><a href="https://github.com/kiddin9/Kwrt" target="_blank">源码与反馈</a></td><td class="td left" width="25%"><a href="https://t.me/opkwrt" target="_blank">TG交流</a></td></tr></table>';
setTimeout(function(){
var telegram = document.querySelectorAll(".cbi-section")[0];
telegram.appendChild(links);