diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua index a9fd8a78..fd9691ed 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -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() diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua index 4f24a55f..dccc96bd 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua @@ -193,7 +193,7 @@ if has_xray then o.default = 0 o.description = translate("Override the connection destination address with the sniffed domain.
Otherwise use sniffed domain for routing only.
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" diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 419cfce5..1630bb19 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -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 diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index cae6532e..8162ade4 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -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 = {} diff --git a/luci-app-passwall2/po/zh-cn/passwall2.po b/luci-app-passwall2/po/zh-cn/passwall2.po index e4364329..3bbcecf9 100644 --- a/luci-app-passwall2/po/zh-cn/passwall2.po +++ b/luci-app-passwall2/po/zh-cn/passwall2.po @@ -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 防火墙规则..." diff --git a/luci-app-passwall2/root/usr/share/passwall2/iptables.sh b/luci-app-passwall2/root/usr/share/passwall2/iptables.sh index 828a57a0..0382b22b 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/iptables.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/iptables.sh @@ -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() { diff --git a/luci-app-passwall2/root/usr/share/passwall2/nftables.sh b/luci-app-passwall2/root/usr/share/passwall2/nftables.sh index e4378371..c151bc13 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/nftables.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/nftables.sh @@ -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() { diff --git a/luci-lib-taskd/Makefile b/luci-lib-taskd/Makefile index 5217c0ea..d1680d67 100644 --- a/luci-lib-taskd/Makefile +++ b/luci-lib-taskd/Makefile @@ -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 diff --git a/luci-lib-taskd/src/po/zh-cn/lib-tasks.po b/luci-lib-taskd/src/po/zh-cn/lib-tasks.po index 895ccd6b..f9564729 100644 --- a/luci-lib-taskd/src/po/zh-cn/lib-tasks.po +++ b/luci-lib-taskd/src/po/zh-cn/lib-tasks.po @@ -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 "升级" diff --git a/my-default-settings/files/usr/lib/lua/luci/view/admin_status/index/links.htm b/my-default-settings/files/usr/lib/lua/luci/view/admin_status/index/links.htm index 9de13ced..0df8e453 100644 --- a/my-default-settings/files/usr/lib/lua/luci/view/admin_status/index/links.htm +++ b/my-default-settings/files/usr/lib/lua/luci/view/admin_status/index/links.htm @@ -1,7 +1,7 @@ <% if luci.sys.exec("echo -n `uci -q get base_config.@status[0].links`") ~= "0" then %>