update 2023-04-23 23:35:57

This commit is contained in:
github-actions[bot] 2023-04-23 23:35:57 +08:00
parent 4adbb6e9aa
commit 44378ce2de
5 changed files with 23 additions and 6 deletions

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
PKG_VERSION:=4.65-1
PKG_VERSION:=4.65-2
PKG_RELEASE:=
PKG_CONFIG_DEPENDS:= \

View File

@ -400,7 +400,7 @@ end
o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect."))
o.inputstyle = "remove"
function o.write(e, e)
luci.sys.call("[ -n \"$(nft list sets 2>/dev/null | grep \"gfwlist\")\" ] && /usr/share/" .. appname .. "/nftables.sh flush_nftset || /usr/share/" .. appname .. "/iptables.sh flush_ipset > /dev/null 2>&1 &")
luci.sys.call("[ -n \"$(nft list sets 2>/dev/null | grep \"gfwlist\")\" ] && sh /usr/share/" .. appname .. "/nftables.sh flush_nftset || sh /usr/share/" .. appname .. "/iptables.sh flush_ipset > /dev/null 2>&1 &")
luci.http.redirect(api.url("log"))
end

View File

@ -29,6 +29,15 @@ EOF
[ ! -s "/etc/config/passwall" ] && cp -f /usr/share/passwall/0_default_config /etc/config/passwall
touch /etc/config/passwall_show >/dev/null 2>&1
[ "$(opkg list-installed | grep "firewall4")" ] && [ "$(opkg list-installed | grep "nftables")" ] && {
[ "$(opkg list-installed | grep "kmod\-nft\-socket")" ] && [ "$(opkg list-installed | grep "kmod\-nft\-tproxy")" ] && [ "$(opkg list-installed | grep "kmod\-nft\-nat")" ] && {
uci -q set passwall.@global_forwarding[0].use_nft=1
uci -q commit passwall
sed -i "s#use_nft '0'#use_nft '1'#g" /usr/share/passwall/0_default_config
}
}
rm -f /tmp/luci-indexcache
rm -rf /tmp/luci-modulecache/
killall -HUP rpcd 2>/dev/null

View File

@ -416,14 +416,22 @@ run_chinadns_ng() {
[ -s "${RULES_PATH}/chnlist" ] && {
local _chnlist_file="${TMP_PATH}/chinadns_chnlist"
cp -a "${RULES_PATH}/chnlist" "${_chnlist_file}"
_extra_param="${_extra_param} -m ${_chnlist_file} -M -a"
local chnroute4_set="chnroute"
local chnroute6_set="chnroute6"
[ "$nftflag" = "1" ] && {
chnroute4_set="inet@fw4@chnroute"
chnroute6_set="inet@fw4@chnroute6"
}
_extra_param="${_extra_param} -4 ${chnroute4_set} -6 ${chnroute6_set} -m ${_chnlist_file} -M -a"
}
}
([ -n "$_chnlist" ] || [ -n "$_gfwlist" ]) && [ -s "${RULES_PATH}/gfwlist" ] && {
local _gfwlist_file="${TMP_PATH}/chinadns_gfwlist"
cp -a "${RULES_PATH}/gfwlist" "${_gfwlist_file}"
_extra_param="${_extra_param} -g ${_gfwlist_file} -A gfwlist,gfwlist6"
local gfwlist_set="gfwlist,gfwlist6"
[ "$nftflag" = "1" ] && gfwlist_set="inet@fw4@gfwlist,inet@fw4@gfwlist6"
_extra_param="${_extra_param} -g ${_gfwlist_file} -A ${gfwlist_set}"
#当只有使用gfwlist模式时设置默认DNS为本地直连
[ -n "$_gfwlist" ] && [ -z "$_chnlist" ] && _default_tag="chn"
}

View File

@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=natflow
PKG_VERSION:=20230422
PKG_VERSION:=20230423
PKG_SOURCE_URL:=https://codeload.github.com/ptpt52/natflow/tar.gz/$(PKG_VERSION)?
PKG_HASH:=89bee9ec3b6265d1c3bcbfa44872d703c8af7ab319c95657935e8e4261c74dc9
PKG_HASH:=ddf011339e00b8056c493e3ee957635d104aab7d636fda3230cfc919accc4da6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Chen Minqiang <ptpt52@gmail.com>