diff --git a/ddns-go/Makefile b/ddns-go/Makefile index 4c7286b1e..90fec4d64 100644 --- a/ddns-go/Makefile +++ b/ddns-go/Makefile @@ -11,12 +11,13 @@ PKG_NAME:=ddns-go PKG_VERSION:=5.3.7 PKG_RELEASE:=1 +PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/jeessy2/ddns-go/tar.gz/v$(PKG_VERSION)? +PKG_SOURCE_URL:=https://github.com/jeessy2/ddns-go.git PKG_MIRROR_HASH:=264e1ff04eb10f5d8ee3f793e5c5d33b0f2dfe8e3f724e68ab6a3c1f3bf657bb PKG_SOURCE_VERSION:=e009a82a470d6a702ce0159fae17c24e872b8e57 -PKG_LICENSE:=MIT +PKG_LICENSE:=AGPL-3.0-only PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=herboy2008 diff --git a/ddns-go/file/luci-ddns-go.uci-default b/ddns-go/file/luci-ddns-go.uci-default index 54501747c..0c01cacc1 100644 --- a/ddns-go/file/luci-ddns-go.uci-default +++ b/ddns-go/file/luci-ddns-go.uci-default @@ -1,5 +1,6 @@ #!/bin/sh +[ -s "/etc/ddns-go/localtime" ] && mv -f /etc/ddns-go/localtime /etc/localtime /etc/init.d/ddns-go enable /etc/init.d/ddns-go start rm -f /tmp/luci* diff --git a/luci-app-ddns-go/Makefile b/luci-app-ddns-go/Makefile index 1abc25aa4..daca91ad3 100644 --- a/luci-app-ddns-go/Makefile +++ b/luci-app-ddns-go/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ddns-go -PKG_VERSION:=1.3.1 +PKG_VERSION:=1.3.2 PKG_RELEASE:=10 LUCI_TITLE:=LuCI Support for Dynamic ddns-go Client diff --git a/luci-app-ddns-go/root/etc/ddns-go/localtime b/luci-app-ddns-go/root/etc/ddns-go/localtime new file mode 100644 index 000000000..91f6f8bc2 Binary files /dev/null and b/luci-app-ddns-go/root/etc/ddns-go/localtime differ diff --git a/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml b/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml index 74b2fd127..b07775622 100644 --- a/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml +++ b/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml @@ -1,14 +1,14 @@ ipv4: enable: true gettype: url - url: https://myip4.ipip.net, https://ddns.oray.com/checkip, https://ip.3322.net + url: https://4.ipw.cn,https://myip4.ipip.net,https://ddns.oray.com/checkip,https://ip.3322.net netinterface: br-lan domains: - "" ipv6: enable: false gettype: url - url: https://myip6.ipip.net, https://speed.neu6.edu.cn/getIP.php, https://v6.ident.me + url: https://6.ipw.cn, https://speed.neu6.edu.cn/getIP.php, https://v6.ident.me netinterface: "" ipv6reg: "" domains: diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 18bedc124..e7464d4e3 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall -PKG_VERSION:=4.66-8 +PKG_VERSION:=4.66-9 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh index fc0ba8d9d..3004886f1 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -59,6 +59,11 @@ config_t_get() { echo "${ret:=${3}}" } +config_t_set() { + local index=${4:-0} + local ret=$(uci -q set "${CONFIG}.@${1}[${index}].${2}=${3}" 2>/dev/null) +} + get_enabled_anonymous_secs() { uci -q show "${CONFIG}" | grep "${1}\[.*\.enabled='1'" | cut -d '.' -sf2 } @@ -197,6 +202,21 @@ check_port_exists() { echo "${result}" } +check_depends() { + local tables=${1} + local status=0 + if [ tables == "iptables" ]; then + for depends in "iptables-mod-tproxy" "iptables-mod-socket" "iptables-mod-iprange" "iptables-mod-conntrack-extra" "kmod-ipt-nat"; do + [ -z "$(opkg status ${depends} 2>/dev/null | grep 'Status' | awk -F ': ' '{print $2}' 2>/dev/null)" ] && echolog "$tables透明代理基础依赖 $depends 未安装..." && status=1 + done + else + for depends in "kmod-nft-socket" "kmod-nft-tproxy" "kmod-nft-nat"; do + [ -z "$(opkg status ${depends} 2>/dev/null | grep 'Status' | awk -F ': ' '{print $2}' 2>/dev/null)" ] && echolog "$tables透明代理基础依赖 $depends 未安装..." && status=1 + done + fi + echo $status +} + get_new_port() { port=$1 [ "$port" == "auto" ] && port=2082 @@ -1525,17 +1545,31 @@ start() { nftflag=0 local use_nft=$(config_t_get global_forwarding use_nft 0) local USE_TABLES - if [ "$use_nft" == 1 ] && [ -z "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then - echolog "Dnsmasq软件包不满足nftables透明代理要求,如需使用请确保dnsmasq版本在2.87以上并开启nftset支持。" - elif [ "$use_nft" == 1 ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then - USE_TABLES="nftables" - nftflag=1 - elif [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ] || [ -z "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then - echolog "系统未安装iptables或ipset或Dnsmasq没有开启ipset支持,无法透明代理!" + if [ "$use_nft" == 0 ]; then + if [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ] || [ -z "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then + if [ -n "$(command -v nft)" ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then + echolog "检测到fw4,使用nftables进行透明代理。" + USE_TABLES="nftables" + nftflag=1 + config_t_set global_forwarding use_nft 1 + uci commit + else + echolog "系统未安装iptables或ipset或Dnsmasq没有开启ipset支持,无法透明代理!" + fi + else + USE_TABLES="iptables" + fi else - USE_TABLES="iptables" + if [ -z "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then + echolog "Dnsmasq软件包不满足nftables透明代理要求,如需使用请确保dnsmasq版本在2.87以上并开启nftset支持。" + elif [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then + USE_TABLES="nftables" + nftflag=1 + fi fi + [ "$(check_depends $USE_TABLES)" == "0" ] || unset USE_TABLES + [ "$ENABLED_DEFAULT_ACL" == 1 ] && { start_redir TCP start_redir UDP diff --git a/luci-app-passwall/root/usr/share/passwall/nftables.sh b/luci-app-passwall/root/usr/share/passwall/nftables.sh index 005165828..26350926d 100755 --- a/luci-app-passwall/root/usr/share/passwall/nftables.sh +++ b/luci-app-passwall/root/usr/share/passwall/nftables.sh @@ -705,7 +705,7 @@ add_firewall_rule() { gen_nftset $NFTSET_GFW ipv4_addr gen_nftset $NFTSET_LANLIST ipv4_addr $(gen_lanlist) if [ -f $RULES_PATH/chnroute.nft ] && [ -s $RULES_PATH/chnroute.nft ] && [ $(awk 'END{print NR}' $RULES_PATH/chnroute.nft) -ge 8 ]; then - echolog "使用缓存加载chnroute..." + #echolog "使用缓存加载chnroute..." nft -f $RULES_PATH/chnroute.nft else gen_nftset $NFTSET_CHN ipv4_addr $(cat $RULES_PATH/chnroute | tr -s '\n' | grep -v "^#") @@ -719,7 +719,7 @@ add_firewall_rule() { gen_nftset $NFTSET_GFW6 ipv6_addr gen_nftset $NFTSET_LANLIST6 ipv6_addr $(gen_lanlist_6) if [ -f $RULES_PATH/chnroute6.nft ] && [ -s $RULES_PATH/chnroute6.nft ] && [ $(awk 'END{print NR}' $RULES_PATH/chnroute6.nft) -ge 8 ]; then - echolog "使用缓存加载chnroute6..." + #echolog "使用缓存加载chnroute6..." nft -f $RULES_PATH/chnroute6.nft else gen_nftset $NFTSET_CHN6 ipv6_addr $(cat $RULES_PATH/chnroute6 | tr -s '\n' | grep -v "^#") diff --git a/luci-app-passwall/root/usr/share/passwall/rule_update.lua b/luci-app-passwall/root/usr/share/passwall/rule_update.lua index d6a3f6166..81c1b5834 100755 --- a/luci-app-passwall/root/usr/share/passwall/rule_update.lua +++ b/luci-app-passwall/root/usr/share/passwall/rule_update.lua @@ -67,10 +67,11 @@ end local function gen_cache(set_name, ip_type, input_file, output_file) local tmp_dir = "/tmp/" local tmp_file = output_file .. "_tmp" - gen_nftset(set_name, ip_type, tmp_file, input_file) - luci.sys.call("nft list set inet fw4 " ..set_name.. " > " ..output_file) - luci.sys.call("nft flush set inet fw4 " ..set_name) - luci.sys.call("nft delete set inet fw4 " ..set_name) + local tmp_set_name = set_name .. "_tmp" + gen_nftset(tmp_set_name, ip_type, tmp_file, input_file) + luci.sys.call("nft list set inet fw4 " ..tmp_set_name.. " | sed 's/" ..tmp_set_name.. "/" ..set_name.. "/g' | cat > " ..output_file) + luci.sys.call("nft flush set inet fw4 " ..tmp_set_name) + luci.sys.call("nft delete set inet fw4 " ..tmp_set_name) end -- curl diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index e5ed2913d..fc2cf2770 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=e641e4490ab88e914d0f0f249c8722ad8d8684ba9935390b1c04da8c7b9161c1 endef -GEOSITE_VER:=20230713075615 +GEOSITE_VER:=20230716062159 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=f993ed799c61ddcf8b5226f7a03f546c37d31a948ec2ff7871458508e5d85a84 + HASH:=f7030f0c0953044621f80c0ed766f9168b8e55a3f855bdcfa1736dcf0a36b6e4 endef define Package/v2ray-geodata/template