update 2023-07-16 23:35:21

This commit is contained in:
github-actions[bot] 2023-07-16 23:35:21 +08:00
parent 77b88dbf46
commit ec4c104675
10 changed files with 59 additions and 22 deletions

View File

@ -11,12 +11,13 @@ PKG_NAME:=ddns-go
PKG_VERSION:=5.3.7 PKG_VERSION:=5.3.7
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 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_MIRROR_HASH:=264e1ff04eb10f5d8ee3f793e5c5d33b0f2dfe8e3f724e68ab6a3c1f3bf657bb
PKG_SOURCE_VERSION:=e009a82a470d6a702ce0159fae17c24e872b8e57 PKG_SOURCE_VERSION:=e009a82a470d6a702ce0159fae17c24e872b8e57
PKG_LICENSE:=MIT PKG_LICENSE:=AGPL-3.0-only
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=herboy2008 <herboy2008@gmail.com> PKG_MAINTAINER:=herboy2008 <herboy2008@gmail.com>

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/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 enable
/etc/init.d/ddns-go start /etc/init.d/ddns-go start
rm -f /tmp/luci* rm -f /tmp/luci*

View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ddns-go PKG_NAME:=luci-app-ddns-go
PKG_VERSION:=1.3.1 PKG_VERSION:=1.3.2
PKG_RELEASE:=10 PKG_RELEASE:=10
LUCI_TITLE:=LuCI Support for Dynamic ddns-go Client LUCI_TITLE:=LuCI Support for Dynamic ddns-go Client

Binary file not shown.

View File

@ -1,14 +1,14 @@
ipv4: ipv4:
enable: true enable: true
gettype: url 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 netinterface: br-lan
domains: domains:
- "" - ""
ipv6: ipv6:
enable: false enable: false
gettype: url 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: "" netinterface: ""
ipv6reg: "" ipv6reg: ""
domains: domains:

View File

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

View File

@ -59,6 +59,11 @@ config_t_get() {
echo "${ret:=${3}}" 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() { get_enabled_anonymous_secs() {
uci -q show "${CONFIG}" | grep "${1}\[.*\.enabled='1'" | cut -d '.' -sf2 uci -q show "${CONFIG}" | grep "${1}\[.*\.enabled='1'" | cut -d '.' -sf2
} }
@ -197,6 +202,21 @@ check_port_exists() {
echo "${result}" 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() { get_new_port() {
port=$1 port=$1
[ "$port" == "auto" ] && port=2082 [ "$port" == "auto" ] && port=2082
@ -1525,16 +1545,30 @@ start() {
nftflag=0 nftflag=0
local use_nft=$(config_t_get global_forwarding use_nft 0) local use_nft=$(config_t_get global_forwarding use_nft 0)
local USE_TABLES local USE_TABLES
if [ "$use_nft" == 1 ] && [ -z "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then if [ "$use_nft" == 0 ]; then
echolog "Dnsmasq软件包不满足nftables透明代理要求如需使用请确保dnsmasq版本在2.87以上并开启nftset支持。" if [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ] || [ -z "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then
elif [ "$use_nft" == 1 ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then if [ -n "$(command -v nft)" ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
echolog "检测到fw4使用nftables进行透明代理。"
USE_TABLES="nftables" USE_TABLES="nftables"
nftflag=1 nftflag=1
elif [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ] || [ -z "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then config_t_set global_forwarding use_nft 1
uci commit
else
echolog "系统未安装iptables或ipset或Dnsmasq没有开启ipset支持无法透明代理" echolog "系统未安装iptables或ipset或Dnsmasq没有开启ipset支持无法透明代理"
fi
else else
USE_TABLES="iptables" USE_TABLES="iptables"
fi fi
else
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 ] && { [ "$ENABLED_DEFAULT_ACL" == 1 ] && {
start_redir TCP start_redir TCP

View File

@ -705,7 +705,7 @@ add_firewall_rule() {
gen_nftset $NFTSET_GFW ipv4_addr gen_nftset $NFTSET_GFW ipv4_addr
gen_nftset $NFTSET_LANLIST ipv4_addr $(gen_lanlist) 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 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 nft -f $RULES_PATH/chnroute.nft
else else
gen_nftset $NFTSET_CHN ipv4_addr $(cat $RULES_PATH/chnroute | tr -s '\n' | grep -v "^#") 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_GFW6 ipv6_addr
gen_nftset $NFTSET_LANLIST6 ipv6_addr $(gen_lanlist_6) 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 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 nft -f $RULES_PATH/chnroute6.nft
else else
gen_nftset $NFTSET_CHN6 ipv6_addr $(cat $RULES_PATH/chnroute6 | tr -s '\n' | grep -v "^#") gen_nftset $NFTSET_CHN6 ipv6_addr $(cat $RULES_PATH/chnroute6 | tr -s '\n' | grep -v "^#")

View File

@ -67,10 +67,11 @@ end
local function gen_cache(set_name, ip_type, input_file, output_file) local function gen_cache(set_name, ip_type, input_file, output_file)
local tmp_dir = "/tmp/" local tmp_dir = "/tmp/"
local tmp_file = output_file .. "_tmp" local tmp_file = output_file .. "_tmp"
gen_nftset(set_name, ip_type, tmp_file, input_file) local tmp_set_name = set_name .. "_tmp"
luci.sys.call("nft list set inet fw4 " ..set_name.. " > " ..output_file) gen_nftset(tmp_set_name, ip_type, tmp_file, input_file)
luci.sys.call("nft flush set inet fw4 " ..set_name) 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 delete set inet fw4 " ..set_name) luci.sys.call("nft flush set inet fw4 " ..tmp_set_name)
luci.sys.call("nft delete set inet fw4 " ..tmp_set_name)
end end
-- curl -- curl

View File

@ -21,13 +21,13 @@ define Download/geoip
HASH:=e641e4490ab88e914d0f0f249c8722ad8d8684ba9935390b1c04da8c7b9161c1 HASH:=e641e4490ab88e914d0f0f249c8722ad8d8684ba9935390b1c04da8c7b9161c1
endef endef
GEOSITE_VER:=20230713075615 GEOSITE_VER:=20230716062159
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE) FILE:=$(GEOSITE_FILE)
HASH:=f993ed799c61ddcf8b5226f7a03f546c37d31a948ec2ff7871458508e5d85a84 HASH:=f7030f0c0953044621f80c0ed766f9168b8e55a3f855bdcfa1736dcf0a36b6e4
endef endef
define Package/v2ray-geodata/template define Package/v2ray-geodata/template