From f96d16010d343e94e92408f3b262a5a564e6bb21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:23:02 +0800 Subject: [PATCH] update 2023-12-15 16:23:02 --- luci-app-systools/Makefile | 2 +- .../luasrc/controller/systools.lua | 4 +- luci-app-systools/po/zh-cn/systools.po | 6 ++ .../root/usr/libexec/istorec/systools.sh | 6 +- .../root/usr/share/systools/full_ipv6.run | 75 +++++++++++++++++++ .../root/usr/share/systools/half_ipv6.run | 34 +++++++++ natflow/Makefile | 4 +- v2ray-geodata/Makefile | 4 +- 8 files changed, 128 insertions(+), 7 deletions(-) create mode 100755 luci-app-systools/root/usr/share/systools/full_ipv6.run create mode 100755 luci-app-systools/root/usr/share/systools/half_ipv6.run diff --git a/luci-app-systools/Makefile b/luci-app-systools/Makefile index 516a1da75..f44fa775b 100644 --- a/luci-app-systools/Makefile +++ b/luci-app-systools/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.0.4-20230718 +PKG_VERSION:=1.0.5-20231215 PKG_RELEASE:= LUCI_TITLE:=LuCI support for SysTools diff --git a/luci-app-systools/luasrc/controller/systools.lua b/luci-app-systools/luasrc/controller/systools.lua index 96adccd2a..d600593d4 100755 --- a/luci-app-systools/luasrc/controller/systools.lua +++ b/luci-app-systools/luasrc/controller/systools.lua @@ -87,9 +87,11 @@ function main_container(data, extra) required = true, title = "可执行操作", type = "string", - enum = {"turn_off_ipv6", "reset_rom_pkgs", "qb_reset_password", "disk_power_mode", "speedtest", "openssl-aes256gcm", "openssl-chacha20-poly1305", "istore-reinstall", "disable-wandrop"}, + enum = {"turn_off_ipv6", "full_ipv6", "half_ipv6", "reset_rom_pkgs", "qb_reset_password", "disk_power_mode", "speedtest", "openssl-aes256gcm", "openssl-chacha20-poly1305", "istore-reinstall", "disable-wandrop"}, enumNames = { lng.translate("Turn off IPv6"), + lng.translate("Full IPv6"), + lng.translate("Half IPv6 (Only Router)"), lng.translate("Reset rom pkgs"), lng.translate("Reset qBittorrent Password"), lng.translate("HDD hibernation Status"), diff --git a/luci-app-systools/po/zh-cn/systools.po b/luci-app-systools/po/zh-cn/systools.po index ed8ec386c..50b24fa50 100644 --- a/luci-app-systools/po/zh-cn/systools.po +++ b/luci-app-systools/po/zh-cn/systools.po @@ -13,6 +13,12 @@ msgstr "修复系统软件" msgid "Turn off IPv6" msgstr "关闭 IPv6" +msgid "Full IPv6" +msgstr "开启 IPv6" + +msgid "Half IPv6 (Only Router)" +msgstr "半 IPv6(仅路由器)" + msgid "Reset qBittorrent Password" msgstr "重置 qBittorrent 密码" diff --git a/luci-app-systools/root/usr/libexec/istorec/systools.sh b/luci-app-systools/root/usr/libexec/istorec/systools.sh index 415c697dd..8b00a8088 100755 --- a/luci-app-systools/root/usr/libexec/istorec/systools.sh +++ b/luci-app-systools/root/usr/libexec/istorec/systools.sh @@ -8,6 +8,8 @@ usage() { echo "usage: $0 sub-command" echo "where sub-command is one of:" echo " turn_off_ipv6 Disable IPv6" + echo " full_ipv6 Full IPv6" + echo " half_ipv6 Half IPv6 (Only Router)" echo " reset_rom_pkgs Reset pkgs from rom" echo " qb_reset_password Reset qBitorent password" echo " disk_power_mode Show disk power status" @@ -15,7 +17,9 @@ usage() { } case ${ACTION} in - "turn_off_ipv6") + "turn_off_ipv6"|\ + "full_ipv6"|\ + "half_ipv6") bash "/usr/share/systools/${ACTION}.run" ;; "reset_rom_pkgs") diff --git a/luci-app-systools/root/usr/share/systools/full_ipv6.run b/luci-app-systools/root/usr/share/systools/full_ipv6.run new file mode 100755 index 000000000..56807a7c3 --- /dev/null +++ b/luci-app-systools/root/usr/share/systools/full_ipv6.run @@ -0,0 +1,75 @@ +#!/bin/sh + +ipv6_disable_lan_server() { + uci -q batch <<-EOF >/dev/null + del dhcp.lan.ra + del dhcp.lan.ra_slaac + del dhcp.lan.ra_flags + del dhcp.lan.dhcpv6 + del dhcp.lan.ndp +EOF +} + +ipv6_dns_on() { + uci -q delete 'dhcp.@dnsmasq[0].filter_aaaa' +} + +ipv6_relay_mode() { + uci -q batch <<-EOF >/dev/null + del network.wan6.auto + + set dhcp.wan6=dhcp + set dhcp.wan6.interface='wan6' + set dhcp.wan6.ignore='1' + set dhcp.wan6.master='1' + set dhcp.wan6.ra='relay' + set dhcp.wan6.dhcpv6='relay' + set dhcp.wan6.ndp='relay' + + set dhcp.lan.ra='relay' + del dhcp.lan.ra_slaac + del dhcp.lan.ra_flags + set dhcp.lan.dhcpv6='relay' + set dhcp.lan.ndp='relay' +EOF + ipv6_dns_on +} + +ipv6_pppoe_mode() { + ipv6_disable_lan_server + ipv6_dns_on +} + +is_lan_gateway() { + [ "$(uci -q get network.lan.defaultroute)" = "0" ] && return 1 + [ "$(uci -q get network.lan.proto)" = "dhcp" ] && return 0 + [ "$(uci -q get network.lan.proto)" = "static" ] || return 1 + [ -n "$(uci -q get network.lan.gateway)" ] +} + +is_wan_pppoe() { + [ "$(uci -q get network.wan.proto)" = "pppoe" ] +} + +if is_lan_gateway; then + echo "Single-Port Router (LAN Gateway) mode" + ipv6_pppoe_mode +elif is_wan_pppoe; then + echo "PPPoE mode" + ipv6_pppoe_mode + uci -q delete network.wan.ipv6 +else + echo "DHCP-Client mode" + ipv6_relay_mode +fi + +uci -q batch <<-EOF >/dev/null + commit dhcp + commit network +EOF + +/etc/init.d/odhcpd reload +/etc/init.d/dnsmasq reload +/etc/init.d/network reload + +echo "Done" diff --git a/luci-app-systools/root/usr/share/systools/half_ipv6.run b/luci-app-systools/root/usr/share/systools/half_ipv6.run new file mode 100755 index 000000000..e23a0912e --- /dev/null +++ b/luci-app-systools/root/usr/share/systools/half_ipv6.run @@ -0,0 +1,34 @@ +#!/bin/sh + +ipv6_dns_on() { + uci -q delete 'dhcp.@dnsmasq[0].filter_aaaa' +} + +ipv6_half_mode() { + uci -q batch <<-EOF >/dev/null + del network.wan.ipv6 + del network.wan6.auto + + del dhcp.wan6 + + set dhcp.lan.ra='relay' + del dhcp.lan.ra_slaac + del dhcp.lan.ra_flags + set dhcp.lan.dhcpv6='relay' + set dhcp.lan.ndp='relay' +EOF + ipv6_dns_on +} + +ipv6_half_mode + +uci -q batch <<-EOF >/dev/null + commit dhcp + commit network +EOF + +/etc/init.d/odhcpd reload +/etc/init.d/dnsmasq reload +/etc/init.d/network reload + +echo "Done" diff --git a/natflow/Makefile b/natflow/Makefile index 9fc45b7aa..a3852f4ae 100644 --- a/natflow/Makefile +++ b/natflow/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=natflow -PKG_VERSION:=20231217 +PKG_VERSION:=20231218 PKG_SOURCE_URL:=https://codeload.github.com/ptpt52/natflow/tar.gz/$(PKG_VERSION)? -PKG_HASH:=9d5abfe4714763664514517f89cec3415b76401c5dd7251948343044992abca3 +PKG_HASH:=d4c4cb35cd79e61d96d17e6d7c88d8f6264a64118d330d9eefc1c4edd8b14982 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_MAINTAINER:=Chen Minqiang diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index e328f1574..4e22c02ac 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=03c0e86452ca6dafea570e9fa727eb44f91f54dd572d7b9c6f2fda8565555e45 endef -GEOSITE_VER:=20231212122459 +GEOSITE_VER:=20231215080745 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:=954adf9b4e999839073715566ab5df3f2177ad97741ce78dcea9b0795ef30614 + HASH:=071f911cfb07252e8959923b9f795e3a731eaecbb561f13dc07f6b9beffca343 endef GEOSITE_IRAN_VER:=202312110026