diff --git a/trunk/configs/templates/NETGEAR-BZV.config b/trunk/configs/templates/NETGEAR-BZV.config index f844caf8f9..3af352bd37 100644 --- a/trunk/configs/templates/NETGEAR-BZV.config +++ b/trunk/configs/templates/NETGEAR-BZV.config @@ -303,5 +303,4 @@ CONFIG_FIRMWARE_INCLUDE_ALDRIVER=y CONFIG_FIRMWARE_INCLUDE_SQM=n ### wireguard 10k -CONFIG_FIRMWARE_INCLUDE_WIREGUARD=n - +CONFIG_FIRMWARE_INCLUDE_WIREGUARD=n \ No newline at end of file diff --git a/trunk/configs/templates/PSG1218.config b/trunk/configs/templates/PSG1218.config index e2fefc50cb..24e287bf86 100644 --- a/trunk/configs/templates/PSG1218.config +++ b/trunk/configs/templates/PSG1218.config @@ -127,7 +127,7 @@ CONFIG_FIRMWARE_INCLUDE_LPRD=n CONFIG_FIRMWARE_INCLUDE_U2EC=n ### Include "tcpdump" utility. ~0.6MB -CONFIG_FIRMWARE_INCLUDE_TCPDUMP=y +CONFIG_FIRMWARE_INCLUDE_TCPDUMP=n ### Include "hdparm" utility (allow set HDD spindown timeout and APM). ~0.1MB CONFIG_FIRMWARE_INCLUDE_HDPARM=n @@ -139,7 +139,7 @@ CONFIG_FIRMWARE_INCLUDE_PARTED=n CONFIG_FIRMWARE_INCLUDE_SMBD=n ### using samba3.6 instead of samba3 -CONFIG_FIRMWARE_INCLUDE_SMBD36=y +CONFIG_FIRMWARE_INCLUDE_SMBD36=n ### Include WINS server only. ~0.4MB CONFIG_FIRMWARE_INCLUDE_WINS=n @@ -154,13 +154,13 @@ CONFIG_FIRMWARE_INCLUDE_FTPD=n CONFIG_FIRMWARE_INCLUDE_RPL2TP=n ### Include EAP-TTLS and EAP-PEAP authentication support. openssl ~1.2MB, wpa_supplicant +0.04MB -CONFIG_FIRMWARE_INCLUDE_EAP_PEAP=y +CONFIG_FIRMWARE_INCLUDE_EAP_PEAP=n ### Include HTTPS support. openssl ~1.2MB CONFIG_FIRMWARE_INCLUDE_HTTPS=n ### Include sftp-server. openssl ~1.2MB, sftp-server ~0.06MB -CONFIG_FIRMWARE_INCLUDE_SFTP=y +CONFIG_FIRMWARE_INCLUDE_SFTP=n ### Include dropbear SSH. ~0.3MB CONFIG_FIRMWARE_INCLUDE_DROPBEAR=n @@ -169,7 +169,7 @@ CONFIG_FIRMWARE_INCLUDE_DROPBEAR=n CONFIG_FIRMWARE_INCLUDE_DROPBEAR_FAST_CODE=n ### Include OpenSSH instead of dropbear. openssl ~1.2MB, openssh ~1.0MB -CONFIG_FIRMWARE_INCLUDE_OPENSSH=y +CONFIG_FIRMWARE_INCLUDE_OPENSSH=n ### Include OpenVPN. IPv6 required. openssl ~1.2MB, openvpn ~0.4MB CONFIG_FIRMWARE_INCLUDE_OPENVPN=n @@ -181,7 +181,7 @@ CONFIG_FIRMWARE_INCLUDE_OPENSSL_EC=y CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=n ### Include xUPNPd IPTV mediaserver. ~0.3MB -CONFIG_FIRMWARE_INCLUDE_XUPNPD=y +CONFIG_FIRMWARE_INCLUDE_XUPNPD=n ### Include Minidlna UPnP mediaserver. ~1.6MB CONFIG_FIRMWARE_INCLUDE_MINIDLNA=n @@ -190,7 +190,7 @@ CONFIG_FIRMWARE_INCLUDE_MINIDLNA=n CONFIG_FIRMWARE_INCLUDE_FIREFLY=n ### Include ffmpeg 0.11.x instead of 0.6.x for Minidlna and Firefly. ~0.1MB -CONFIG_FIRMWARE_INCLUDE_FFMPEG_NEW=y +CONFIG_FIRMWARE_INCLUDE_FFMPEG_NEW=n ### Include Transmission torrent. openssl ~1.2MB, transmission ~1.5MB CONFIG_FIRMWARE_INCLUDE_TRANSMISSION=n @@ -210,13 +210,13 @@ CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=n CONFIG_FIRMWARE_INCLUDE_GDUT_DRCOM=n -CONFIG_FIRMWARE_INCLUDE_DOGCOM=y +CONFIG_FIRMWARE_INCLUDE_DOGCOM=n -CONFIG_FIRMWARE_INCLUDE_MINIEAP=y +CONFIG_FIRMWARE_INCLUDE_MINIEAP=n -CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT=y +CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT=n -CONFIG_FIRMWARE_INCLUDE_NAPT66=y +CONFIG_FIRMWARE_INCLUDE_NAPT66=n CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER=n @@ -224,27 +224,32 @@ CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT=n CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD=n -CONFIG_FIRMWARE_INCLUDE_VLMCSD=y +CONFIG_FIRMWARE_INCLUDE_VLMCSD=n -CONFIG_FIRMWARE_INCLUDE_TTYD=y +CONFIG_FIRMWARE_INCLUDE_TTYD=n -CONFIG_FIRMWARE_INCLUDE_LRZSZ=y +### Include msd_lite, replaces udpxy +CONFIG_FIRMWARE_INCLUDE_MSD_LITE=y -CONFIG_FIRMWARE_INCLUDE_HTOP=y +CONFIG_FIRMWARE_INCLUDE_LIBCGROUP=n -CONFIG_FIRMWARE_INCLUDE_NANO=y +CONFIG_FIRMWARE_INCLUDE_LRZSZ=n -CONFIG_FIRMWARE_INCLUDE_IPERF3=y +CONFIG_FIRMWARE_INCLUDE_HTOP=n + +CONFIG_FIRMWARE_INCLUDE_NANO=n + +CONFIG_FIRMWARE_INCLUDE_IPERF3=n CONFIG_FIRMWARE_INCLUDE_DUMP1090=n CONFIG_FIRMWARE_INCLUDE_RTL_SDR=n -CONFIG_FIRMWARE_INCLUDE_MTR=y +CONFIG_FIRMWARE_INCLUDE_MTR=n -CONFIG_FIRMWARE_INCLUDE_SOCAT=y +CONFIG_FIRMWARE_INCLUDE_SOCAT=n -CONFIG_FIRMWARE_INCLUDE_SRELAY=y +CONFIG_FIRMWARE_INCLUDE_SRELAY=n CONFIG_FIRMWARE_INCLUDE_MENTOHUST=n @@ -252,6 +257,45 @@ CONFIG_FIRMWARE_INCLUDE_FRPC=n CONFIG_FIRMWARE_INCLUDE_FRPS=n -CONFIG_FIRMWARE_INCLUDE_TUNSAFE=n +CONFIG_FIRMWARE_INCLUDE_REDSOCKS=n + +### Include Shadowsocks +CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=n + +### Include xray ~4.5M +CONFIG_FIRMWARE_INCLUDE_XRAY=n + +### Include v2ray +CONFIG_FIRMWARE_INCLUDE_V2RAY=n + +### Include trojan ~1.2M +CONFIG_FIRMWARE_INCLUDE_TROJAN=n + +### Include simple-obfs +CONFIG_FIRMWARE_INCLUDE_SSOBFS=n + +### Include adbyby plus+ +CONFIG_FIRMWARE_INCLUDE_ADBYBY=y + +### DNS Services +CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=n + +CONFIG_FIRMWARE_INCLUDE_SMARTDNS=y + +CONFIG_FIRMWARE_INCLUDE_ADGUARDHOME=n + +### zerotier ~1.3M +CONFIG_FIRMWARE_INCLUDE_ZEROTIER=y + +CONFIG_FIRMWARE_INCLUDE_ALIDDNS=n + +### ddnsto ~0.5M +CONFIG_FIRMWARE_INCLUDE_DDNSTO=n + +### ALDRIVER ~3m +CONFIG_FIRMWARE_INCLUDE_ALDRIVER=n + +CONFIG_FIRMWARE_INCLUDE_SQM=n +### wireguard 10k CONFIG_FIRMWARE_INCLUDE_WIREGUARD=n diff --git a/trunk/libs/libcares/c-ares-1.26.0.tar.gz b/trunk/libs/libcares/c-ares-1.26.0.tar.gz new file mode 100644 index 0000000000..f156a232ae Binary files /dev/null and b/trunk/libs/libcares/c-ares-1.26.0.tar.gz differ diff --git a/trunk/libs/libjpeg/Makefile b/trunk/libs/libjpeg/Makefile index ee37752864..7afe529ad9 100644 --- a/trunk/libs/libjpeg/Makefile +++ b/trunk/libs/libjpeg/Makefile @@ -1,5 +1,5 @@ -SRC_NAME=jpeg-9e -SRC_URL=http://www.ijg.org/files/jpegsrc.v9e.tar.gz +SRC_NAME=jpeg-9f +SRC_URL=http://www.ijg.org/files/jpegsrc.v9f.tar.gz all: download_test extract_test config_test $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) diff --git a/trunk/libs/libjpeg/jpeg-9f.tar.gz b/trunk/libs/libjpeg/jpeg-9f.tar.gz new file mode 100644 index 0000000000..ad9d3b99e8 Binary files /dev/null and b/trunk/libs/libjpeg/jpeg-9f.tar.gz differ diff --git a/trunk/libs/libjpeg/jpegsrc.v9e.tar.gz b/trunk/libs/libjpeg/jpegsrc.v9e.tar.gz deleted file mode 100644 index b0ac4bdb15..0000000000 Binary files a/trunk/libs/libjpeg/jpegsrc.v9e.tar.gz and /dev/null differ diff --git a/trunk/libs/libjson-c/Makefile b/trunk/libs/libjson-c/Makefile index 43720bdf1d..136558bd53 100644 --- a/trunk/libs/libjson-c/Makefile +++ b/trunk/libs/libjson-c/Makefile @@ -1,5 +1,5 @@ SRC_NAME=json-c-json-c-0.17-20230812 -SRC_URL=https://github.com/json-c/json-c/archive/refs/tags/json-c-json-c-0.17-20230812.tar.gz +SRC_URL=https://codeload.github.com/json-c/json-c/tar.gz/refs/tags/json-c-0.17-20230812 ARCHIVE_NAME=json-c-json-c-0.17-20230812 all: download_test extract_test config_test diff --git a/trunk/libs/libsqlite/Makefile b/trunk/libs/libsqlite/Makefile index 4d3d0d1260..0fe579a238 100644 --- a/trunk/libs/libsqlite/Makefile +++ b/trunk/libs/libsqlite/Makefile @@ -1,5 +1,5 @@ -SRC_NAME=sqlite-autoconf-3440200 -SRC_URL=https://www.sqlite.org/2023/$(SRC_NAME).tar.gz +SRC_NAME=sqlite-autoconf-3450100 +SRC_URL=https://www.sqlite.org/2024/$(SRC_NAME).tar.gz all: download_test extract_test config_test diff --git a/trunk/libs/libsqlite/sqlite-autoconf-3440200.tar.gz b/trunk/libs/libsqlite/sqlite-autoconf-3440200.tar.gz deleted file mode 100644 index 701a6145b1..0000000000 Binary files a/trunk/libs/libsqlite/sqlite-autoconf-3440200.tar.gz and /dev/null differ diff --git a/trunk/libs/libsqlite/sqlite-autoconf-3450100.tar.gz b/trunk/libs/libsqlite/sqlite-autoconf-3450100.tar.gz new file mode 100644 index 0000000000..68f810243d Binary files /dev/null and b/trunk/libs/libsqlite/sqlite-autoconf-3450100.tar.gz differ diff --git a/trunk/libs/libusb-1.0/Makefile b/trunk/libs/libusb-1.0/Makefile index a06a5ef4e3..5166a502b5 100644 --- a/trunk/libs/libusb-1.0/Makefile +++ b/trunk/libs/libusb-1.0/Makefile @@ -1,8 +1,8 @@ -SRC_NAME=libusb-1.0.26 -SRC_URL=https://github.com/libusb/libusb/releases/download/v1.0.25/$(SRC_NAME).tar.bz2 +SRC_NAME=libusb-1.0.27 +SRC_URL=https://github.com/libusb/libusb/releases/download/v1.0.27/$(SRC_NAME).tar.bz2 -#all: download_test extract_test config_test -all: config_test +all: download_test extract_test config_test +#all: config_test $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) download_test: diff --git a/trunk/libs/libusb-1.0/libusb-1.0.27.tar.bz2 b/trunk/libs/libusb-1.0/libusb-1.0.27.tar.bz2 new file mode 100644 index 0000000000..9c5f6ba4cc Binary files /dev/null and b/trunk/libs/libusb-1.0/libusb-1.0.27.tar.bz2 differ diff --git a/trunk/libs/libuv/Makefile b/trunk/libs/libuv/Makefile index 0b93478300..162570035b 100644 --- a/trunk/libs/libuv/Makefile +++ b/trunk/libs/libuv/Makefile @@ -1,5 +1,5 @@ -SRC_NAME=libuv-v1.47.0 -SRC_URL=https://dist.libuv.org/dist/v1.47.0/$(SRC_NAME).tar.gz +SRC_NAME=libuv-v1.48.0 +SRC_URL=https://dist.libuv.org/dist/v1.48.0/$(SRC_NAME).tar.gz all: download_test extract_test config_test $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) diff --git a/trunk/libs/libuv/libuv-v1.44.2.tar.gz b/trunk/libs/libuv/libuv-v1.44.2.tar.gz deleted file mode 100644 index 68abdfc1f2..0000000000 Binary files a/trunk/libs/libuv/libuv-v1.44.2.tar.gz and /dev/null differ diff --git a/trunk/libs/libuv/libuv-v1.48.0.tar.gz b/trunk/libs/libuv/libuv-v1.48.0.tar.gz new file mode 100644 index 0000000000..25133d5233 Binary files /dev/null and b/trunk/libs/libuv/libuv-v1.48.0.tar.gz differ diff --git a/trunk/libs/libxml2/Makefile b/trunk/libs/libxml2/Makefile index 2771af954e..9f314641b5 100644 --- a/trunk/libs/libxml2/Makefile +++ b/trunk/libs/libxml2/Makefile @@ -1,5 +1,5 @@ -SRC_NAME=libxml2-v2.12.3 -SRC_URL=https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.12.3/$(SRC_NAME).tar.gz +SRC_NAME=libxml2-v2.11.7 +SRC_URL=https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.11.7/$(SRC_NAME).tar.gz all: download_test extract_test config_test $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) diff --git a/trunk/libs/libxml2/libxml2-v2.11.7.tar.gz b/trunk/libs/libxml2/libxml2-v2.11.7.tar.gz new file mode 100644 index 0000000000..9f5f0bfe91 Binary files /dev/null and b/trunk/libs/libxml2/libxml2-v2.11.7.tar.gz differ diff --git a/trunk/libs/libz/Makefile b/trunk/libs/libz/Makefile index fe1d42dd7e..dce6dfa7f2 100644 --- a/trunk/libs/libz/Makefile +++ b/trunk/libs/libz/Makefile @@ -1,4 +1,4 @@ -SRC_NAME=zlib-1.3 +SRC_NAME=zlib-1.3.1 SRC_URL=http://www.zlib.net/$(SRC_NAME).tar.gz all: download_test extract_test config_test diff --git a/trunk/libs/libz/zlib-1.2.13.tar.gz b/trunk/libs/libz/zlib-1.2.13.tar.gz deleted file mode 100644 index d115fc690f..0000000000 Binary files a/trunk/libs/libz/zlib-1.2.13.tar.gz and /dev/null differ diff --git a/trunk/libs/libz/zlib-1.3.1.tar.gz b/trunk/libs/libz/zlib-1.3.1.tar.gz new file mode 100644 index 0000000000..53fa48bf97 Binary files /dev/null and b/trunk/libs/libz/zlib-1.3.1.tar.gz differ diff --git a/trunk/libs/mbedtls/Makefile b/trunk/libs/mbedtls/Makefile index 1f40a2ec3d..2caee31aa7 100644 --- a/trunk/libs/mbedtls/Makefile +++ b/trunk/libs/mbedtls/Makefile @@ -1,5 +1,5 @@ -SRC_NAME=mbedtls-2.28.6 -SRC_URL=https://github.com/Mbed-TLS/mbedtls/archive/v2.28.6.tar.gz +SRC_NAME=mbedtls-2.28.7 +SRC_URL=https://github.com/Mbed-TLS/mbedtls/archive/v2.28.7.tar.gz all: download_test extract_test config_test $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)/build diff --git a/trunk/libs/mbedtls/mbedtls-2.28.7.tar.gz b/trunk/libs/mbedtls/mbedtls-2.28.7.tar.gz new file mode 100644 index 0000000000..141396155f Binary files /dev/null and b/trunk/libs/mbedtls/mbedtls-2.28.7.tar.gz differ diff --git a/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/include/os/rt_linux.h b/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/include/os/rt_linux.h index ac3465afdf..43dcf195f6 100644 --- a/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/include/os/rt_linux.h +++ b/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/include/os/rt_linux.h @@ -787,15 +787,17 @@ void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, i #define PCI_FREE_CONSISTENT(_pci_dev, _size, _virtual_addr, _physical_addr) \ pci_free_consistent(_pci_dev, _size, _virtual_addr, _physical_addr) -#ifdef VENDOR_FEATURE2_SUPPORT -#define DEV_ALLOC_SKB(_pAd, _Pkt, _length) \ - _Pkt = dev_alloc_skb(_length); \ - if (_Pkt != NULL) {MEM_DBG_PKT_ALLOC_INC(_Pkt);}; -#else - -#define DEV_ALLOC_SKB(_pAd, _Pkt, _length) \ - _Pkt = dev_alloc_skb(_length); -#endif /* VENDOR_FEATURE2_SUPPORT */ +#ifndef NET_SKB_PAD +#define NET_SKB_PAD 32 +#endif +#define DEV_ALLOC_SKB(_pAd,_Pkt, _length) \ + do {\ + _Pkt = alloc_skb(_length + NET_SKB_PAD, GFP_ATOMIC); \ + if (_Pkt != NULL) { \ + skb_reserve(_Pkt, NET_SKB_PAD); \ + MEM_DBG_PKT_ALLOC_INC(_Pkt); \ + }; \ + } while (0) /*#define PCI_MAP_SINGLE(_handle, _ptr, _size, _dir) (ULONG)0 */ /*#define PCI_UNMAP_SINGLE(_handle, _ptr, _size, _dir) */ diff --git a/trunk/tools/mksquashfs_xz/Makefile b/trunk/tools/mksquashfs_xz/Makefile index a2ccf464be..3d82651289 100644 --- a/trunk/tools/mksquashfs_xz/Makefile +++ b/trunk/tools/mksquashfs_xz/Makefile @@ -1,5 +1,5 @@ SRC_NAME1=squashfs-4.6.1 -SRC_NAME2=xz-5.4.5 +SRC_NAME2=xz-5.4.6 SRC_URL2=https://netactuate.dl.sourceforge.net/project/lzmautils/$(SRC_NAME2).tar.xz all: extract_xz config_xz build_xz build_squashfs diff --git a/trunk/tools/mksquashfs_xz/xz-5.4.5.tar.xz b/trunk/tools/mksquashfs_xz/xz-5.4.5.tar.xz deleted file mode 100644 index c2b7d5311f..0000000000 Binary files a/trunk/tools/mksquashfs_xz/xz-5.4.5.tar.xz and /dev/null differ diff --git a/trunk/tools/mksquashfs_xz/xz-5.4.6.tar.xz b/trunk/tools/mksquashfs_xz/xz-5.4.6.tar.xz new file mode 100644 index 0000000000..127b7dc095 Binary files /dev/null and b/trunk/tools/mksquashfs_xz/xz-5.4.6.tar.xz differ diff --git a/trunk/user/adguardhome/Makefile b/trunk/user/adguardhome/Makefile index 3756674041..4f7ed992c0 100644 --- a/trunk/user/adguardhome/Makefile +++ b/trunk/user/adguardhome/Makefile @@ -1,4 +1,4 @@ -VERSION := 0.107.41 +VERSION := 0.107.44 VERSION_PKG := github.com/AdguardTeam/AdGuardHome/internal/version SRC_NAME := AdGuardHome-$(VERSION) diff --git a/trunk/user/aria2/Makefile b/trunk/user/aria2/Makefile index 8ebba0b17b..d18e3eff46 100644 --- a/trunk/user/aria2/Makefile +++ b/trunk/user/aria2/Makefile @@ -1,8 +1,8 @@ SRC_NAME=aria2-1.37.0 -SRC_URL=https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.xz +SRC_URL=https://github.com/aria2/aria2/releases/download/release-1.37.0/$(SRC_NAME).tar.xz SRC_ARIA_NG_NAME=AriaNg-1.3.7-AllInOne -SRC_ARIA_NG_URL=https://github.com/mayswind/AriaNg/releases/download/1.3.7/AriaNg-1.3.7-AllInOne.zip +SRC_ARIA_NG_URL=https://github.com/mayswind/AriaNg/releases/download/1.3.7/$(SRC_ARIA_NG_NAME).zip CFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden CXXFLAGS += -ffunction-sections -fdata-sections -fvisibility-inlines-hidden diff --git a/trunk/user/htop/Makefile b/trunk/user/htop/Makefile index b2bd4abc38..dd0a3c0f95 100644 --- a/trunk/user/htop/Makefile +++ b/trunk/user/htop/Makefile @@ -1,5 +1,5 @@ -SRC_NAME = htop-3.2.2 -SRC_URL = https://github.com/htop-dev/htop/releases/download/3.2.2/$(SRC_NAME).tar.xz +SRC_NAME = htop-3.3.0 +SRC_URL = https://github.com/htop-dev/htop/releases/download/3.3.0/$(SRC_NAME).tar.xz THISDIR = $(shell pwd) all: download_test extract_test config_test @@ -12,7 +12,7 @@ download_test: extract_test: ( if [ ! -d $(SRC_NAME) ]; then \ - tar -xf $(SRC_NAME).tar.xz; \ + tar xf $(SRC_NAME).tar.xz; \ fi ) config_test: diff --git a/trunk/user/htop/htop-3.2.2.tar.xz b/trunk/user/htop/htop-3.2.2.tar.xz deleted file mode 100644 index c11ac16a08..0000000000 Binary files a/trunk/user/htop/htop-3.2.2.tar.xz and /dev/null differ diff --git a/trunk/user/httpd/ralink.c b/trunk/user/httpd/ralink.c index f59f4a48a1..ac42dbbeab 100644 --- a/trunk/user/httpd/ralink.c +++ b/trunk/user/httpd/ralink.c @@ -893,7 +893,7 @@ get_apcli_wds_entry(const char *ifname, RT_802_11_MAC_ENTRY *pme) wrq.u.data.flags = 0; if (wl_ioctl(ifname, RTPRIV_IOCTL_GET_MAC_TABLE_STRUCT, &wrq) >= 0 && - wrq.u.data.length == sizeof(RT_802_11_MAC_ENTRY)) { + wrq.u.data.length == sizeof(RT_802_11_MAC_ENTRY)) { //bug with mt7615 driver return 1; } @@ -1073,7 +1073,7 @@ print_sta_list(webs_t wp, RT_802_11_MAC_TABLE *mp, int num_ss_rx, int ap_idx) bzero(&RxRate, sizeof(RxRate)); RxRate.word = mp->Entry[i].LastRxRate; - ret += websWrite(wp, "%02X:%02X:%02X:%02X:%02X:%02X %-7s %3s %3d %3s %4s %4s %5dM %5dM %4d %3s %02d:%02d:%02d\n", + ret += websWrite(wp, "%02X:%02X:%02X:%02X:%02X:%02X %-7s %3s %3d %3s %4s %4s %5dM %5dM %4d %3s %02d:%02d:%02d\n", mp->Entry[i].Addr[0], mp->Entry[i].Addr[1], mp->Entry[i].Addr[2], mp->Entry[i].Addr[3], mp->Entry[i].Addr[4], mp->Entry[i].Addr[5], GetPhyMode(mp->Entry[i].TxRate.field.MODE), diff --git a/trunk/user/httpd/variables.c b/trunk/user/httpd/variables.c index 9c9ae5523d..3c4b0179e4 100644 --- a/trunk/user/httpd/variables.c +++ b/trunk/user/httpd/variables.c @@ -756,7 +756,7 @@ {"ddns2_hname", "", NULL, EVM_RESTART_DDNS }, {"ddns2_user", "", NULL, EVM_RESTART_DDNS }, {"ddns2_pass", "", NULL, EVM_RESTART_DDNS }, - #if defined(APP_ALIDDNS) +#if defined(APP_ALIDDNS) {"aliddns_enable", "", NULL, EVM_RESTART_ALIDDNS }, {"aliddns_interval", "", NULL, EVM_RESTART_ALIDDNS }, {"aliddns_ttl", "", NULL, EVM_RESTART_ALIDDNS }, @@ -769,7 +769,7 @@ {"aliddns_domain2", "", NULL, EVM_RESTART_ALIDDNS }, {"aliddns_domain6", "", NULL, EVM_RESTART_ALIDDNS }, {"scripts.ddns_script.sh", "File", NULL, EVM_RESTART_ALIDDNS}, - #endif +#endif {"ManualDHCPList", "Group", ARGV((char*)variables_LANHostConfig_ManualDHCPList, "8", "55", "dhcp_staticnum_x"), EVM_RESTART_DHCPD}, {"VPNSACLList", "Group", ARGV((char*)variables_LANHostConfig_VPNSACLList, "8", "107", "vpns_num_x"), EVM_RESTART_VPNSVR}, {0,0,0,0} @@ -864,6 +864,7 @@ {"wl_VgaClamp", "", NULL, EVM_RESTART_WIFI5}, #endif #if defined (USE_WID_5G) && (USE_WID_5G==7615 || USE_WID_5G==7915) + {"wl_band_steering", "", NULL, EVM_RESTART_WIFI5}, {"wl_mumimo", "", NULL, EVM_RESTART_WIFI5}, #endif {"wl_country_code", "", NULL, EVM_RESTART_WIFI5}, @@ -1166,50 +1167,63 @@ #if defined(APP_SMARTDNS) struct variable variables_SmartdnsConf[] = { - {"sdns_enable", "", NULL, EVM_RESTART_SMARTDNS}, - {"snds_name", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_enable", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_name", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_port", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_tcp_server", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_ipv6_server", "", NULL, EVM_RESTART_SMARTDNS}, - {"snds_ip_change", "", NULL, EVM_RESTART_SMARTDNS}, - {"snds_ip_change_time", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_ipv6", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_www", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_exp", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_exp_ttl", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_exp_ttl_max", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_redirect", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_cache", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_cache_persist", "", NULL, EVM_RESTART_SMARTDNS}, - {"snds_redirect", "", NULL, EVM_RESTART_SMARTDNS}, - {"snds_cache", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_ttl", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_ttl_min", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_ttl_max", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_coredump", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdnss_staticnum_x", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_tcp_idle_time", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_rr_ttl", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_rr_ttl_min", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_rr_ttl_max", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_rr_ttl_reply_max", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_max_reply_ip_num", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_speed", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_speed_mode", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_address", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_ns", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_as", "", NULL, EVM_RESTART_SMARTDNS}, {"sdns_ipset", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdns_ns", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_ipset_timeout", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_ip_change", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_ip_change_time", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_force_aaaa_soa", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_force_qtype_soa", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_prefetch_domain", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_exp", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_exp_ttl", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_exp_ttl_max", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_exp_prefetch_time", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_dualstack_ip_allow_force_AAAA", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdnse_enable", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_port", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_tcp", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdnse_speed", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_name", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdnse_speed", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdnse_ipset", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_address", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_ns", "", NULL, EVM_RESTART_SMARTDNS}, - {"sdnse_ipset", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_as", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdnse_ipv6_server", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_ipc", "", NULL, EVM_RESTART_SMARTDNS}, {"sdnse_cache", "", NULL, EVM_RESTART_SMARTDNS}, - {"ss_white", "", NULL, EVM_RESTART_SMARTDNS}, - {"ss_black", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_adblock", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_adblock_url","",NULL, FALSE}, + {"sdns_white", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_black", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_coredump", "", NULL, EVM_RESTART_SMARTDNS}, + {"sdns_staticnum_x", "", NULL, EVM_RESTART_SMARTDNS}, {"scripts.smartdns_address.conf", "File", NULL, EVM_RESTART_SMARTDNS}, {"scripts.smartdns_blacklist-ip.conf", "File", NULL, EVM_RESTART_SMARTDNS}, {"scripts.smartdns_whitelist-ip.conf", "File", NULL, EVM_RESTART_SMARTDNS}, {"scripts.smartdns_custom.conf", "File", NULL, EVM_RESTART_SMARTDNS}, - {"SdnsList", "Group", ARGV((char*)variables_SmartdnsConf_SdnsList, "8", "55", "sdnss_staticnum_x"), EVM_RESTART_SMARTDNS}, - }; + {"SdnsList", "Group", ARGV((char*)variables_SmartdnsConf_SdnsList, "8", "55", "sdns_staticnum_x"), EVM_RESTART_SMARTDNS}, + }; #endif struct variable variables_WLANConfig11b[] = { {"rt_ssid", "", NULL, EVM_RESTART_WIFI2}, @@ -1267,6 +1281,7 @@ #endif #if defined (USE_WID_2G) && (USE_WID_2G==7615 || USE_WID_2G==7915) {"rt_turbo_qam", "", NULL, EVM_RESTART_WIFI2}, + {"rt_airtimefairness", "", NULL, EVM_RESTART_WIFI2}, #endif {"rt_country_code", "", NULL, EVM_RESTART_WIFI2}, {"rt_stream_tx", "", NULL, EVM_RESTART_WIFI2}, @@ -1299,6 +1314,7 @@ {"rt_guest_mcs_mode", "", NULL, EVM_RESTART_WIFI2}, {"rt_KickStaRssiLow", "", NULL, EVM_RESTART_WIFI2}, {"rt_AssocReqRssiThres", "", NULL, EVM_RESTART_WIFI2}, + {"rt_band_steering", "", NULL, EVM_RESTART_WIFI2}, {"scripts.ap_script.sh", "File", NULL, EVM_RESTART_WIFI2}, {"rt_RBRList", "Group", ARGV((char*)variables_WLANConfig11b_rt_RBRList, "16", "32", "rt_wdsnum_x"), EVM_RESTART_WIFI2}, {0,0,0,0} diff --git a/trunk/user/httpd/web_ex.c b/trunk/user/httpd/web_ex.c index 11e99b3649..d8d756b5c6 100644 --- a/trunk/user/httpd/web_ex.c +++ b/trunk/user/httpd/web_ex.c @@ -2692,15 +2692,22 @@ ej_firmware_caps_hook(int eid, webs_t wp, int argc, char **argv) int has_switch_type = 10; // RT3052/RT3352/RT5350 Embedded ESW #endif #endif +#if defined (BOARD_GPIO_BTN_ROUTER) || defined (BOARD_GPIO_BTN_AP) + int has_btn_mode = 1; +#else int has_btn_mode = 0; +#endif #if defined (USE_WID_5G) && (USE_WID_5G==7610 || USE_WID_5G==7612 || USE_WID_5G==7615 || USE_WID_5G==7915) int has_5g_vht = 1; + int has_5g_band_steering = 1; #else int has_5g_vht = 0; + int has_5g_band_steering = 0; #endif -#if defined (USE_WID_5G) && (USE_WID_5G==7615 || USE_WID_5G==7915) +#if defined (USE_WID_5G) && (USE_WID_5G==7612 || USE_WID_5G==7615 || USE_WID_5G==7915) int has_5g_mumimo = 1; int has_5g_txbf = 1; +// int has_5g_band_steering = 1; #if defined (BOARD_MT7615_DBDC) || defined (BOARD_MT7915_DBDC) int has_5g_160mhz = 0; #else @@ -2709,12 +2716,17 @@ ej_firmware_caps_hook(int eid, webs_t wp, int argc, char **argv) #else int has_5g_mumimo = 0; int has_5g_txbf = 0; +// int has_5g_band_steering = 0; int has_5g_160mhz = 0; #endif #if defined (USE_WID_2G) && (USE_WID_2G==7615 || USE_WID_2G==7915) + int has_2g_band_steering = 1; int has_2g_turbo_qam = 1; + int has_2g_airtimefairness = 1; #else + int has_2g_band_steering = 0; int has_2g_turbo_qam = 0; + int has_2g_airtimefairness = 0; #endif #if defined (USE_WID_2G) int wid_2g = USE_WID_2G; @@ -2846,8 +2858,11 @@ ej_firmware_caps_hook(int eid, webs_t wp, int argc, char **argv) "function support_5g_stream_rx() { return %d;}\n" "function support_2g_stream_tx() { return %d;}\n" "function support_2g_stream_rx() { return %d;}\n" + "function support_2g_band_steering() { return %d;}\n" "function support_2g_turbo_qam() { return %d;}\n" + "function support_2g_airtimefairness() { return %d;}\n" "function support_5g_txbf() { return %d;}\n" + "function support_5g_band_steering() { return %d;}\n" "function support_5g_mumimo() { return %d;}\n" "function support_sfe() { return %d;}\n" "function support_lan_ap_isolate() { return %d;}\n" @@ -2883,8 +2898,11 @@ ej_firmware_caps_hook(int eid, webs_t wp, int argc, char **argv) BOARD_NUM_ANT_5G_RX, BOARD_NUM_ANT_2G_TX, BOARD_NUM_ANT_2G_RX, + has_2g_band_steering, has_2g_turbo_qam, + has_2g_airtimefairness, has_5g_txbf, + has_5g_band_steering, has_5g_mumimo, has_sfe, has_lan_ap_isolate, diff --git a/trunk/user/iperf3/Makefile b/trunk/user/iperf3/Makefile index 6b734737e2..be3d72740e 100644 --- a/trunk/user/iperf3/Makefile +++ b/trunk/user/iperf3/Makefile @@ -1,14 +1,44 @@ SRC_NAME = iperf-3.16 - +SRC_URL = https://downloads.es.net/pub/iperf/$(SRC_NAME).tar.gz THISDIR = $(shell pwd) -all: +all: download_test extract_test config_test + $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) + +download_test: + ( if [ ! -f $(SRC_NAME).tar.gz ]; then \ + wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \ + fi ) + +extract_test: + ( if [ ! -d $(SRC_NAME) ]; then \ + tar -xf $(SRC_NAME).tar.gz; \ + fi ) config_test: + ( if [ -f ./config_done ]; then \ + echo "the same configuration"; \ + else \ + make configure && touch config_done; \ + fi ) configure: - + ( cd $(SRC_NAME) ; \ + ./configure \ + --prefix=/usr \ + --disable-profiling \ + --without-openssl \ + --disable-shared \ + --enable-static \ + --host=$(HOST_TARGET) \ + --build=$(HOST_BUILD) ; \ + ) + clean: - + if [ -f $(SRC_NAME)/Makefile ] ; then \ + $(MAKE) -C $(SRC_NAME) distclean ; \ + fi ; \ + rm -f config_done + romfs: - $(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME) /usr/bin/iperf3 \ No newline at end of file + $(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/src/iperf3 /usr/bin/iperf3 \ No newline at end of file diff --git a/trunk/user/iperf3/Makefile-3.15 b/trunk/user/iperf3/Makefile-3.15 deleted file mode 100644 index 4acd8a746c..0000000000 --- a/trunk/user/iperf3/Makefile-3.15 +++ /dev/null @@ -1,44 +0,0 @@ -SRC_NAME = iperf-3.15 -SRC_URL = https://downloads.es.net/pub/iperf/$(SRC_NAME).tar.gz -THISDIR = $(shell pwd) - -all: download_test extract_test config_test - $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) - -download_test: - ( if [ ! -f $(SRC_NAME).tar.gz ]; then \ - wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \ - fi ) - -extract_test: - ( if [ ! -d $(SRC_NAME) ]; then \ - tar -xf $(SRC_NAME).tar.gz; \ - fi ) - -config_test: - ( if [ -f ./config_done ]; then \ - echo "the same configuration"; \ - else \ - make configure && touch config_done; \ - fi ) - -configure: - ( cd $(SRC_NAME) ; \ - ./configure \ - --prefix=/usr \ - --disable-profiling \ - --without-openssl \ - --disable-shared \ - --enable-static \ - --host=$(HOST_TARGET) \ - --build=$(HOST_BUILD) ; \ - ) - -clean: - if [ -f $(SRC_NAME)/Makefile ] ; then \ - $(MAKE) -C $(SRC_NAME) distclean ; \ - fi ; \ - rm -f config_done - -romfs: - $(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/src/iperf3 /usr/bin/iperf3 \ No newline at end of file diff --git a/trunk/user/iperf3/iperf-3.15.tar.gz b/trunk/user/iperf3/iperf-3.15.tar.gz deleted file mode 100644 index d5f3da76f3..0000000000 Binary files a/trunk/user/iperf3/iperf-3.15.tar.gz and /dev/null differ diff --git a/trunk/user/iperf3/iperf-3.16 b/trunk/user/iperf3/iperf-3.16 deleted file mode 100644 index 0ea1513c57..0000000000 Binary files a/trunk/user/iperf3/iperf-3.16 and /dev/null differ diff --git a/trunk/user/iperf3/iperf-3.16.tar.gz b/trunk/user/iperf3/iperf-3.16.tar.gz new file mode 100644 index 0000000000..1a6f72297a Binary files /dev/null and b/trunk/user/iperf3/iperf-3.16.tar.gz differ diff --git a/trunk/user/rc/firewall_ex.c b/trunk/user/rc/firewall_ex.c index bb341f991e..942b5092f0 100644 --- a/trunk/user/rc/firewall_ex.c +++ b/trunk/user/rc/firewall_ex.c @@ -678,20 +678,19 @@ include_masquerade(FILE *fp, char *wan_if, char *wan_ip, char *lan_net, int is_f char *dtype = "POSTROUTING"; if (is_fullcone) { - fprintf(fp, "-A POSTROUTING -o %s -s %s -j FULLCONENAT\n", wan_if, lan_net); - fprintf(fp, "-A PREROUTING -i %s -j FULLCONENAT\n", wan_if); - } else { - if (wan_ip) - fprintf(fp, "-A %s -o %s -s %s -j SNAT --to-source %s\n", dtype, wan_if, lan_net, wan_ip); - else - fprintf(fp, "-A %s -o %s -s %s -j MASQUERADE\n", dtype, wan_if, lan_net); - } + fprintf(fp, "-A %s -o %s -s %s -j MASQUERADE --mode fullcone\n", dtype, wan_if, lan_net); + } else { + if (wan_ip) + fprintf(fp, "-A %s -o %s -s %s -j SNAT --to-source %s\n", dtype, wan_if, lan_net, wan_ip); + else + fprintf(fp, "-A %s -o %s -s %s -j MASQUERADE\n", dtype, wan_if, lan_net); + } } static int is_need_tcp_mss_wan(int unit, int wan_proto, char *man_if) { - if (get_usb_modem_wan(unit) ) { + /*if (get_usb_modem_wan(unit) ) { int modem_mtu = nvram_safe_get_int("modem_mtu", 1500, 1000, 1500); if (modem_mtu != 1500) return 1; @@ -703,9 +702,9 @@ is_need_tcp_mss_wan(int unit, int wan_proto, char *man_if) if (get_interface_mtu(man_if) != 1500) return 1; - } + }*/ - return 0; + return 1; } static char * @@ -1714,6 +1713,26 @@ ip6t_mangle_rules(char *man_if) doSystem("ip6tables-restore %s", ipt_file); } +static void +ip6t_nat_rules(char *man_if) +{ + FILE *fp; + const char *ipt_file = "/tmp/ip6t_nat.rules"; + + if (!(fp=fopen(ipt_file, "w"))) + return; + + fprintf(fp, "*%s\n", "nat"); + fprintf(fp, ":%s %s [0:0]\n", "PREROUTING", "ACCEPT"); + fprintf(fp, ":%s %s [0:0]\n", "INPUT", "ACCEPT"); + fprintf(fp, ":%s %s [0:0]\n", "OUTPUT", "ACCEPT"); + fprintf(fp, ":%s %s [0:0]\n", "POSTROUTING", "ACCEPT"); + fprintf(fp, "-A POSTROUTING -s fc00:101:101::1/64 -j FULLCONENAT\n"); + fprintf(fp, "COMMIT\n\n"); + fclose(fp); + doSystem("ip6tables-restore %s", ipt_file); +} + #endif static int diff --git a/trunk/user/rc/net.c b/trunk/user/rc/net.c index bfb2d1855c..a2b7d54602 100644 --- a/trunk/user/rc/net.c +++ b/trunk/user/rc/net.c @@ -705,6 +705,7 @@ reload_nat_modules(void) #if defined (USE_HW_NAT) int hwnat_allow = is_hwnat_allow(); int hwnat_loaded = is_hwnat_loaded(); + int ipv6_nat = nvram_get_int("ip6_lan_auto"); #endif if (!get_ap_mode()) @@ -799,6 +800,10 @@ reload_nat_modules(void) #if defined (USE_HW_NAT) if (hwnat_allow && !hwnat_loaded) hwnat_load(hwnat_allow); + if (ipv6_nat==1) + {doSystem("echo 7 1 > /sys/kernel/debug/hnat/hnat_setting");} + else + {doSystem("echo 7 0 > /sys/kernel/debug/hnat/hnat_setting");} hwnat_configure(hwnat_allow); #endif diff --git a/trunk/user/rc/net6.c b/trunk/user/rc/net6.c index 9f408129f8..6cdbba9b59 100644 --- a/trunk/user/rc/net6.c +++ b/trunk/user/rc/net6.c @@ -175,6 +175,7 @@ void full_restart_ipv6(int ipv6_type_old) full_restart_wan(); if (!is_dns_dhcpd_run()) start_dns_dhcpd(0); + reload_nat_modules(); } #if defined (APP_NFSD) run_nfsd(); diff --git a/trunk/user/rc/ralink.c b/trunk/user/rc/ralink.c index e9e91664db..5c8bb6decc 100644 --- a/trunk/user/rc/ralink.c +++ b/trunk/user/rc/ralink.c @@ -162,7 +162,7 @@ static const struct cc_t { inline int get_wired_mac_is_single(void) { -#if defined (BOARD_N14U) || defined (BOARD_N11P) || defined (BOARD_MZ_R13) || defined (BOARD_MZ_R13P) || defined (BOARD_CR660x) || defined (BOARD_Q20) || defined (BOARD_RM2100) +#if defined (BOARD_N14U) || defined (BOARD_N11P) || defined (BOARD_MZ_R13) || defined (BOARD_MZ_R13P) || defined (BOARD_CR660x) || defined (BOARD_Q20) || defined (BOARD_RM2100) || defined (BOARD_RE_CP_02) return 1; #else return 0; @@ -178,7 +178,7 @@ get_wired_mac_e2p_offset(int is_wan) return 0xe000; #elif defined (BOARD_RM2100) || defined (BOARD_NEWIFI) return 0xe006; -#elif defined (BOARD_CR660x) || defined (BOARD_Q20) +#elif defined (BOARD_CR660x) || defined (BOARD_Q20) || defined (BOARD_RE_CP_02) return 0x3FFFA; #else return (is_wan) ? OFFSET_MAC_GMAC2 : OFFSET_MAC_GMAC0; @@ -705,7 +705,7 @@ gen_ralink_config(int is_soc_ap, int is_aband, int disable_autoscan) fprintf(fp, "BandDisabled=%d\n", 0); fprintf(fp, "DfsDedicatedZeroWait=%d\n", 0); fprintf(fp, "DfsZeroWaitDefault=%d\n", 0); -// fprintf(fp, "KernelRps=%d\n", 0); + fprintf(fp, "KernelRps=%d\n", 0); fprintf(fp, "RRMEnable=%d\n", 0); fprintf(fp, "MboSupport=%d\n", 0); @@ -1297,6 +1297,8 @@ gen_ralink_config(int is_soc_ap, int is_aband, int disable_autoscan) i_val = nvram_wlan_get_int(is_aband, "HT_AMSDU"); fprintf(fp, "HT_AMSDU=%d;%d\n", i_val, i_val); + //MFPC + fprintf(fp, "PMFMFPC=1;1\n"); //HT_BAWinSize i_val = nvram_wlan_get_int(is_aband, "HT_BAWinSize"); if (i_val < 1 || i_val > 256) i_val = 256; diff --git a/trunk/user/shared/defaults.c b/trunk/user/shared/defaults.c index 9afe926d3a..4ddd8a7ad0 100644 --- a/trunk/user/shared/defaults.c +++ b/trunk/user/shared/defaults.c @@ -442,7 +442,7 @@ struct nvram_pair router_defaults[] = { { "ip6_dns3", "" }, { "ip6_lan_auto", "0" }, - { "ip6_lan_addr", "" }, + { "ip6_lan_addr", "fc00:101:101::1" }, { "ip6_lan_size", "64" }, { "ip6_lan_radv", "1" }, { "ip6_lan_dhcp", "1" }, @@ -720,39 +720,60 @@ struct nvram_pair router_defaults[] = { { "frps_enable", "0" }, #endif -#if defined(APP_SMARTDNS) - /*SmartDns*/ +#if defined(APP_SMARTDNS) + /*SmartDNS*/ { "sdns_enable", "0" }, - { "snds_name", "smartdns" }, + { "sdns_name", "smartdns" }, { "sdns_port", "6053" }, - { "sdns_tcp_server", "0" }, - { "sdns_ipv6_server", "0" }, - { "snds_ip_change", "0" }, - { "snds_ip_change_time", "30" }, - { "sdns_ipv6", "0" }, - { "sdns_www", "0" }, - { "sdns_www", "0" }, - { "sdns_exp", "0" }, - { "snds_redirect", "0" }, - { "snds_cache", "0" }, - { "sdns_ttl", "300" }, - { "sdns_ttl_min", "60" }, - { "sdns_ttl_max", "86400" }, - { "sdns_coredump", "0" }, - { "sdnss_staticnum_x", "0" }, + { "sdns_tcp_server", "1" }, + { "sdns_ipv6_server", "1" }, + { "sdns_redirect", "1" }, + { "sdns_cache", "5120" }, + { "sdns_cache_persist", "1" }, + { "sdns_tcp_idle_time","120"}, + { "sdns_rr_ttl", "300" }, + { "sdns_rr_ttl_min", "600" }, + { "sdns_rr_ttl_max", "3600" }, + { "sdns_rr_ttl_reply_max", "60" }, + { "sdns_max_reply_ip_num", "3" }, + + { "sdns_speed", "0" }, + { "sdns_speed_mode", "ping,tcp:80,tcp:443" }, + { "sdns_address", "0" }, + { "sdns_ns", "0" }, + { "sdns_ipset", "0" }, + { "sdns_ipset_timeout", "1" }, + { "sdns_as", "0" }, + { "sdns_ip_change", "1" }, + { "sdns_ip_change_time", "15" }, + { "sdns_force_aaaa_soa", "0" }, + { "sdns_force_qtype_soa", "65" }, + { "sdns_prefetch_domain", "1" }, + { "sdns_exp", "1" }, + { "sdns_exp_ttl", "345600" }, + { "sdns_exp_ttl_max", "5" }, + { "sdns_exp_prefetch_time", "43200" }, + { "sdns_dualstack_ip_allow_force_AAAA", "1" }, + { "sdnse_enable", "0" }, { "sdnse_port", "7053" }, - { "sdnse_tcp", "0" }, - { "sdnse_speed", "0" }, - { "sdnse_name", "" }, - { "sdnse_address", "0" }, - { "sdnse_ns", "0" }, + { "sdnse_tcp", "1" }, + { "sdnse_name", "oversea" }, + { "sdnse_speed", "1" }, { "sdnse_ipset", "0" }, + { "sdnse_address", "1" }, + { "sdnse_ns", "1" }, { "sdnse_as", "0" }, - { "sdnse_ipc", "0" }, - { "sdnse_cache", "0" }, - { "ss_white", "0" }, - { "ss_black", "0" }, + { "sdnse_ipv6_server", "1" }, + { "sdnse_ipc", "1" }, + { "sdnse_cache", "1" }, + + { "sdns_adblock", "0" }, + { "sdns_adblock_url", "https://anti-ad.net/anti-ad-for-smartdns.conf" }, + { "sdns_white", "0" }, + { "sdns_black", "0" }, + { "sdns_coredump", "0" }, + { "sdns_staticnum_x", "0" }, #endif #if defined(APP_WYY) @@ -824,51 +845,6 @@ struct nvram_pair router_defaults[] = { { "sqm_script", "simple" }, #endif -#if defined(APP_SMARTDNS) - /*SmartDns*/ - { "sdns_enable", "0" }, - { "snds_name", "smartdns" }, - { "sdns_port", "6053" }, - { "sdns_tcp_server", "0" }, - { "sdns_ipv6_server", "0" }, - { "snds_ip_change", "0" }, - { "snds_ip_change_time", "30" }, - { "sdns_ipv6", "1" }, - { "sdns_www", "1" }, - { "sdns_exp", "1" }, - { "sdns_exp_ttl", "0" }, - { "sdns_exp_ttl_max", "10" }, - { "sdns_cache_persist", "1" }, - { "snds_redirect", "1" }, - { "snds_cache", "10240" }, - { "sdns_ttl", "21600" }, - { "sdns_ttl_min", "1800" }, - { "sdns_ttl_max", "86400" }, - { "sdns_coredump", "0" }, - { "sdnss_staticnum_x", "0" }, - { "sdns_speed", "0" }, - { "sdns_address", "0" }, - { "sdns_as", "0" }, - { "sdns_ipset", "0" }, - { "sdns_ns", "0" }, - { "sdnse_enable", "0" }, - { "sdnse_port", "7053" }, - { "sdnse_tcp", "0" }, - { "sdnse_speed", "0" }, - { "sdnse_name", "" }, - { "sdnse_address", "0" }, - { "sdnse_ns", "0" }, - { "sdnse_ipset", "0" }, - { "sdnse_as", "0" }, - { "sdnse_ipc", "0" }, - { "sdnse_cache", "0" }, - { "ss_white", "0" }, - { "ss_black", "0" }, - { "sdns_change", "2" }, - { "sdns_change1", "2" }, - { "sdns_change2", "2" }, -#endif - /* DHCP server parameters */ { "dhcp_start", DEF_LAN_DHCP_BEG }, /* First assignable DHCP address */ { "dhcp_end", DEF_LAN_DHCP_END }, /* Last assignable DHCP address */ diff --git a/trunk/user/smartdns/Makefile b/trunk/user/smartdns/Makefile index 24ed0435a1..64ce28074d 100644 --- a/trunk/user/smartdns/Makefile +++ b/trunk/user/smartdns/Makefile @@ -1,5 +1,5 @@ -SRC_NAME = smartdns-43 -SRC_URL=https://github.com/pymumu/smartdns/archive/refs/tags/Release43.tar.gz +SRC_NAME = smartdns-Release45 +SRC_URL=https://github.com/pymumu/smartdns/archive/refs/tags/Release45.tar.gz THISDIR = $(shell pwd) @@ -36,4 +36,4 @@ romfs: $(ROMFSINST) /etc_ro/smartdns_address.conf $(ROMFSINST) /etc_ro/smartdns_blacklist-ip.conf $(ROMFSINST) /etc_ro/smartdns_custom.conf - $(ROMFSINST) /etc_ro/smartdns_whitelist-ip.conf \ No newline at end of file + $(ROMFSINST) /etc_ro/smartdns_whitelist-ip.conf diff --git a/trunk/user/smartdns/smartdns-Release43.tar.gz b/trunk/user/smartdns/smartdns-Release43.tar.gz deleted file mode 100644 index 36967bb44b..0000000000 Binary files a/trunk/user/smartdns/smartdns-Release43.tar.gz and /dev/null differ diff --git a/trunk/user/smartdns/smartdns-Release45.tar.gz b/trunk/user/smartdns/smartdns-Release45.tar.gz new file mode 100644 index 0000000000..53038d3e4c Binary files /dev/null and b/trunk/user/smartdns/smartdns-Release45.tar.gz differ diff --git a/trunk/user/smartdns/smartdns.sh b/trunk/user/smartdns/smartdns.sh index f3dad36833..9a25d78a7c 100755 --- a/trunk/user/smartdns/smartdns.sh +++ b/trunk/user/smartdns/smartdns.sh @@ -1,5 +1,8 @@ #!/bin/sh - +# Copyright (C) 2018 Nick Peng (pymumu@gmail.com) +# Copyright (C) 2019 chongshengB (bkye@vip.qq.com) +# Copyright (C) 2022 TurBoTse (860018505@qq.com) +# action="$1" storage_Path="/etc/storage" smartdns_Bin="/usr/bin/smartdns" @@ -14,63 +17,74 @@ dnsmasq_Conf="$storage_Path/dnsmasq/dnsmasq.conf" chn_Route="$storage_Path/chinadns/chnroute.txt" sdns_enable=$(nvram get sdns_enable) -snds_name=$(nvram get snds_name) +sdns_name=$(nvram get sdns_name) sdns_port=$(nvram get sdns_port) sdns_tcp_server=$(nvram get sdns_tcp_server) sdns_ipv6_server=$(nvram get sdns_ipv6_server) -snds_ip_change=$(nvram get snds_ip_change) -sdns_ipv6=$(nvram get sdns_ipv6) -sdns_www=$(nvram get sdns_www) -sdns_exp=$(nvram get sdns_exp) -snds_redirect=$(nvram get snds_redirect) +sdns_redirect=$(nvram get sdns_redirect) +sdns_cache=$(nvram get sdns_cache) sdns_cache_persist=$(nvram get sdns_cache_persist) -snds_cache=$(nvram get snds_cache) -sdns_ttl=$(nvram get sdns_ttl) -sdns_ttl_min=$(nvram get sdns_ttl_min) -sdns_ttl_max=$(nvram get sdns_ttl_max) +sdns_tcp_idle_time=$(nvram get sdns_tcp_idle_time) +sdns_rr_ttl=$(nvram get sdns_rr_ttl) +sdns_rr_ttl_min=$(nvram get sdns_rr_ttl_min) +sdns_rr_ttl_max=$(nvram get sdns_rr_ttl_max) +sdns_rr_ttl_reply_max=$(nvram get sdns_rr_ttl_reply_max) +sdns_max_reply_ip_num=$(nvram get sdns_max_reply_ip_num) +sdns_speed=$(nvram get sdns_speed) +sdns_speed_mode=$(nvram get sdns_speed_mode) +sdns_address=$(nvram get sdns_address) +sdns_ipset=$(nvram get sdns_ipset) +sdns_ipset_timeout=$(nvram get sdns_ipset_timeout) +sdns_as=$(nvram get sdns_as) +sdns_ip_change=$(nvram get sdns_ip_change) +sdns_ip_change_time=$(nvram get sdns_ip_change_time) +sdns_dualstack_ip_allow_force_AAAA=$(nvram get sdns_dualstack_ip_allow_force_AAAA) +sdns_force_aaaa_soa=$(nvram get sdns_force_aaaa_soa) +sdns_force_qtype_soa=$(nvram get sdns_force_qtype_soa) +sdns_prefetch_domain=$(nvram get sdns_prefetch_domain) +sdns_exp=$(nvram get sdns_exp) +sdns_exp_ttl=$(nvram get sdns_exp_ttl) +sdns_exp_ttl_max=$(nvram get sdns_exp_ttl_max) +sdns_exp_prefetch_time=$(nvram get sdns_exp_prefetch_time) sdnse_enable=$(nvram get sdnse_enable) sdnse_port=$(nvram get sdnse_port) sdnse_tcp=$(nvram get sdnse_tcp) sdnse_speed=$(nvram get sdnse_speed) -sdns_speed=$(nvram get sdns_speed) sdnse_name=$(nvram get sdnse_name) sdnse_address=$(nvram get sdnse_address) -sdns_address=$(nvram get sdns_address) sdnse_ns=$(nvram get sdnse_ns) sdns_ns=$(nvram get sdns_ns) sdnse_ipset=$(nvram get sdnse_ipset) -sdns_ipset=$(nvram get sdns_ipset) sdnse_as=$(nvram get sdnse_as) -sdns_as=$(nvram get sdns_as) +sdnse_ipv6_server=$(nvram get sdnse_ipv6_server) sdnse_ipc=$(nvram get sdnse_ipc) sdnse_cache=$(nvram get sdnse_cache) -ss_white=$(nvram get ss_white) -ss_black=$(nvram get ss_black) +sdns_adblock=$(nvram get sdns_adblock) +sdns_white=$(nvram get sdns_white) +sdns_black=$(nvram get sdns_black) sdns_coredump=$(nvram get sdns_coredump) -adbyby_process=$(pidof adbyby | awk '{ print $1 }') -smartdns_process=$(pidof smartdns | awk '{ print $1 }') IPS4="$(ifconfig br0 | grep "inet addr" | grep -v ":127" | grep "Bcast" | awk '{print $2}' | awk -F : '{print $2}')" IPS6="$(ifconfig br0 | grep "inet6 addr" | grep -v "fe80::" | grep -v "::1" | grep "Global" | awk '{print $3}')" dnsmasq_md5=$(md5sum "$dnsmasq_Conf" | awk '{ print $1 }') - # 函数 Read_ini () { # 【读取上次成功启动时的端口等】 if [ -s "$smartdns_Ini" ] ; then hosts_type=$(sed -n '1p' $smartdns_Ini) - snds_redirected=$(sed -n '2p' $smartdns_Ini) + sdns_redirected=$(sed -n '2p' $smartdns_Ini) sdns_ported=$(sed -n '3p' $smartdns_Ini) + sdnse_ported=$(sed -n '4p' $smartdns_Ini) else hosts_type=0 - snds_redirected=0 + sdns_redirected=0 sdns_ported="$sdns_port" + sdnse_ported="$sdnse_port" fi } - Check_md5 () { # 【检测某些文件是否变动】 echo "smartdns:" "Enter Check_md5" @@ -93,22 +107,20 @@ Check_md5 () { echo "smartdns:" "Leave Check_md5" } - Check_ss(){ if [ -s /etc_ro/ss_ip.sh ] ; then if [ $(nvram get ss_enable) = 1 ] && [ $(nvram get ss_run_mode) = "router" ] && [ $(nvram get pdnsd_enable) = 0 ] ; then - logger -t "SmartDNS" "系统检测到SS模式为绕过大陆模式,并且启用了pdnsd,请先调整SS解析使用SmartDNS+手动配置模式!程序将退出。" + logger -t "SmartDNS" "系统检测到 SS 模式为绕过大陆模式,并且启用了 pdnsd 请先调整 SS 解析使用 SmartDNS +手动配置模式!程序将退出..." nvram set sdns_enable=0 exit 0 fi fi } - Get_sdns_conf () { - # 【】 + # 【基本设置】 :>"$smartdns_tmp_Conf" - echo "server-name $snds_name" >> "$smartdns_tmp_Conf" + echo "server-name $sdns_name" >> "$smartdns_tmp_Conf" ARGS_1="" if [ "$sdns_address" = "1" ] ; then ARGS_1="$ARGS_1 -no-rule-addr" @@ -137,37 +149,62 @@ Get_sdns_conf () { echo "bind-tcp" ":$sdns_port $ARGS_1" >> "$smartdns_tmp_Conf" fi fi - # 读取 第二服务器 配置 + # 【读取配置】 Get_sdnse_conf - echo "cache-size $snds_cache" >> "$smartdns_tmp_Conf" - echo "rr-ttl $sdns_ttl" >> "$smartdns_tmp_Conf" - echo "rr-ttl-min $sdns_ttl_min" >> "$smartdns_tmp_Conf" - echo "rr-ttl-max $sdns_ttl_max" >> "$smartdns_tmp_Conf" - echo "tcp-idle-time 120" >> "$smartdns_tmp_Conf" - if [ "$snds_ip_change" -eq 1 ] ;then + echo "cache-size $sdns_cache" >> "$smartdns_tmp_Conf" + echo "rr-ttl $sdns_rr_ttl" >> "$smartdns_tmp_Conf" + echo "rr-ttl-min $sdns_rr_ttl_min" >> "$smartdns_tmp_Conf" + echo "rr-ttl-max $sdns_rr_ttl_max" >> "$smartdns_tmp_Conf" + echo "tcp-idle-time $sdns_tcp_idle_time" >> "$smartdns_tmp_Conf" + echo "rr-ttl-reply-max $sdns_rr_ttl_reply_max" >> "$smartdns_tmp_Conf" + echo "max-reply-ip-num $sdns_max_reply_ip_num" >> "$smartdns_tmp_Conf" + echo "serve-expired-ttl $sdns_exp_ttl" >> "$smartdns_tmp_Conf" + echo "serve-expired-reply-ttl $sdns_exp_ttl_max" >> "$smartdns_tmp_Conf" + echo "serve-expired-prefetch-time $sdns_exp_prefetch_time" >> "$smartdns_tmp_Conf" + echo "force-qtype-SOA $sdns_force_qtype_soa" >> "$smartdns_tmp_Conf" + echo "speed-check-mode $sdns_speed_mode" >> "$smartdns_tmp_Conf" + if [ "$sdns_ip_change" -eq 1 ] ;then echo "dualstack-ip-selection yes" >> "$smartdns_tmp_Conf" - echo "dualstack-ip-selection-threshold $(nvram get snds_ip_change_time)" >> "$smartdns_tmp_Conf" - elif [ "$sdns_ipv6" -eq 1 ] ;then + echo "dualstack-ip-selection-threshold $(nvram get sdns_ip_change_time)" >> "$smartdns_tmp_Conf" + elif [ "$sdns_force_aaaa_soa" -eq 1 ] ;then echo "force-AAAA-SOA yes" >> "$smartdns_tmp_Conf" fi - if [ "$sdns_cache_persist" -eq 1 ] && [ "$snds_cache" -gt 0 ] ;then + if [ "$sdns_dualstack_ip_allow_force_AAAA" -eq 1 ] && [ " $sdns_cache" -gt 0 ] ;then + echo "dualstack-ip-allow-force-AAAA yes" >> "$smartdns_tmp_Conf" + else + echo "dualstack-ip-allow-force-AAAA no" >> "$smartdns_tmp_Conf" + fi + if [ "$sdns_cache_persist" -eq 1 ] && [ "$sdns_cache" -gt 0 ] ;then echo "cache-persist yes" >> "$smartdns_tmp_Conf" - echo "cache-file /etc/storage/smartdns.cache" >> "$smartdns_tmp_Conf" + echo "cache-file /tmp/smartdns.cache" >> "$smartdns_tmp_Conf" else echo "cache-persist no" >> "$smartdns_tmp_Conf" fi - if [ "$sdns_www" -eq 1 ] && [ " $snds_cache" -gt 0 ] ;then + if [ "$sdns_prefetch_domain" -eq 1 ] && [ " $sdns_cache" -gt 0 ] ;then echo "prefetch-domain yes" >> "$smartdns_tmp_Conf" else echo "prefetch-domain no" >> "$smartdns_tmp_Conf" fi - if [ "$sdns_exp" -eq 1 ] && [ "$snds_cache" -gt 0 ] ;then + if [ "$sdns_ipset_timeout" -eq 1 ] && [ " $sdns_cache" -gt 0 ] ;then + echo "ipset-timeout yes" >> "$smartdns_tmp_Conf" + else + echo "ipset-timeout no" >> "$smartdns_tmp_Conf" + fi + if [ "$sdns_force_aaaa_soa" -eq 1 ] && [ " $sdns_cache" -gt 0 ] ;then + echo "force-AAAA-SOA yes" >> "$smartdns_tmp_Conf" + else + echo "force-AAAA-SOA no" >> "$smartdns_tmp_Conf" + fi + if [ "$sdns_exp" -eq 1 ] && [ "$sdns_cache" -gt 0 ] ;then echo "serve-expired yes" >> "$smartdns_tmp_Conf" else echo "serve-expired no" >> "$smartdns_tmp_Conf" fi - echo "log-level warn" >> "$smartdns_tmp_Conf" - listnum=$(nvram get sdnss_staticnum_x) + if [ "$sdns_adblock" -eq 1 ] && [ "$sdns_cache" -gt 0 ] ;then + echo "conf-file /tmp/anti-ad-for-smartdns.conf" >> "$smartdns_tmp_Conf" + fi + echo "log-level error" >> "$smartdns_tmp_Conf" + listnum=$(nvram get sdns_staticnum_x) for i in $(seq 1 "$listnum") do j=$(expr "$i" - 1) @@ -184,7 +221,7 @@ Get_sdns_conf () { ipc="" named="" non="" - sipset="" + ipset="" if [ "$sdnss_ipc" = "whitelist" ] ; then ipc="-whitelist-ip" elif [ "$sdnss_ipc" = "blacklist" ] ; then @@ -232,13 +269,13 @@ Get_sdns_conf () { fi fi done - if [ "$ss_white" = "1" ] && [ -f "$chn_Route" ] ; then + if [ "$sdns_white" = "1" ] && [ -f "$chn_Route" ] ; then :>/tmp/whitelist.conf logger -t "SmartDNS" "开始处理白名单IP" awk '{printf("whitelist-ip %s\n", $1, $1 )}' "$chn_Route" >> /tmp/whitelist.conf echo "conf-file /tmp/whitelist.conf" >> "$smartdns_tmp_Conf" fi - if [ "$ss_black" = "1" ] && [ -f "$chn_Route" ] ; then + if [ "$sdns_black" = "1" ] && [ -f "$chn_Route" ] ; then :>/tmp/blacklist.conf logger -t "SmartDNS" "开始处理黑名单IP" awk '{printf("blacklist-ip %s\n", $1, $1 )}' "$chn_Route" >> /tmp/blacklist.conf @@ -246,9 +283,8 @@ Get_sdns_conf () { fi } - Get_sdnse_conf () { - # 【】 + # 【读取第二服务器设置】 if [ "$sdnse_enable" -eq 1 ] ; then ARGS_2="" ADDR="" @@ -276,10 +312,10 @@ Get_sdnse_conf () { if [ "$sdnse_cache" = "1" ] ; then ARGS_2="$ARGS_2-no-cache" fi - if [ "$sdns_ipv6_server" = "1" ] ; then - ADDR="[::]" - else + if [ "$sdnse_ipv6_server" = "1" ] ; then ADDR="" + else + ADDR="[::]" fi echo "bind" "$ADDR:$sdnse_port $ARGS_2" >> "$smartdns_tmp_Conf" if [ "$sdnse_tcp" = "1" ] ; then @@ -288,7 +324,6 @@ Get_sdnse_conf () { fi } - Check_ip_addr () { echo "$1"|grep "^[0-9]\{1,3\}\.\([0-9]\{1,3\}\.\)\{2\}[0-9]\{1,3\}$" >/dev/null # IP地址必须为全数字 @@ -309,25 +344,44 @@ Check_ip_addr () { return 0 } +Start_AD () { +# 【下载广告过滤文件】 + curl -s -o /tmp/sdnsadnew.conf --connect-timeout 10 --retry 3 $(nvram get sdns_adblock_url) + if [ ! -f "/tmp/sdnsadnew.conf" ]; then + logger -t "SmartDNS" "广告过滤功能未开启或者过滤地址失效,网络异常等 !!!" + else + logger -t "SmartDNS" "去广告文件下载成功广告过滤功能已启用..." + if [ -f "/tmp/sdnsadnew.conf" ]; then + check = `grep -wq "address=" /tmp/sdnsadnew.conf` + if [ ! -n "$check" ] ; then + cp /tmp/sdnsadnew.conf /tmp/anti-ad-for-smartdns.conf + else + cat /tmp/sdnsadnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/anti-ad-for-smartdns.conf + fi + fi + fi + rm -f /tmp/sdnsadnew.conf +} Change_adbyby () { # 【】 + adbyby_process=$(pidof adbyby | awk '{ print $1 }') if [ "$adbyby_process"x != x ] && [ $(nvram get adbyby_enable) = 1 ] ; then case $sdns_enable in 0) - if [ $(nvram get adbyby_add) = 1 ] && [ "$hosts_type" != "Dnsmasq" ]; then + if [ $(nvram get adbyby_add) = 1 ] && [ "$hosts_type" != "dnsmasq" ]; then nvram set adbyby_add=0 /usr/bin/adbyby.sh switch - logger -t "SmartDNS" "DNS 去广告规则: SmartDNS ⇒ Dnsmasq" - hosts_type="Dnsmasq" + logger -t "SmartDNS" "DNS 去广告规则: SmartDNS ⇒ DNSmasq" + hosts_type="dnsmasq" fi ;; 1) if [ "$hosts_type" != "SmartDNS" ] && [ "$action" = "start" ] ; then - if [ "$sdns_port" = "53" ] || [ $(nvram get adbyby_add) = 1 ] || [ "$snds_redirect" = "2" ] ; then + if [ "$sdns_port" = "53" ] || [ $(nvram get adbyby_add) = 1 ] || [ "$sdns_redirect" = "2" ] ; then nvram set adbyby_add=1 /usr/bin/adbyby.sh switch - logger -t "SmartDNS" "DNS 去广告规则: Dnsmasq ⇒ SmartDNS" + logger -t "SmartDNS" "DNS 去广告规则: DNSmasq ⇒ SmartDNS" hosts_type="SmartDNS" fi fi @@ -336,68 +390,71 @@ Change_adbyby () { fi } - Change_dnsmasq () { - # 删除 dnsmasq 配置文件中的相关项,避免重复 + # 删除 DNSmasq 配置文件中的相关项,避免重复 case $action in stop) sed -i '/no-resolv/d' "$dnsmasq_Conf" - sed -i '/server=127.0.0.1#'"$sdns_portd"'/d' "$dnsmasq_Conf" + sed -i '/server=127.0.0.1#'"$sdns_ported"'/d' "$dnsmasq_Conf" sed -i '/port=0/d' "$dnsmasq_Conf" if [ "$sdns_enable" = 0 ] ; then - [ "$sdns_ported" = "53" ] && logger -t "SmartDNS" "已启用 dnsmasq 域名解析(DNS)功能" - [ "$snds_redirected" = "1" ] && logger -t "SmartDNS" "删除 dnsmasq 上游服务器:127.0.0.1:$sdns_ported" + [ "$sdns_ported" = "53" ] && logger -t "SmartDNS" "已启用 DNSmasq 域名解析(DNS)功能" + [ "$sdns_redirected" = "1" ] && logger -t "SmartDNS" "删除 DNSmasq 上游服务器:127.0.0.1:$sdns_ported" fi ;; start) # 启动 SmartDNS 时 if [ "$sdns_port" = "53" ] ; then echo "port=0" >> "$dnsmasq_Conf" - logger -t "SmartDNS" "已关闭 dnsmasq 域名解析(DNS)功能" - if [ "$snds_redirect" = "1" ] ; then - nvram set snds_redirect=0 - snds_redirect=0 + logger -t "SmartDNS" "已关闭 DNSmasq 域名解析(DNS)功能" + if [ "$sdns_redirect" = "1" ] ; then + nvram set sdns_redirect=0 + sdns_redirect=0 logger -t "SmartDNS" "因此,自动修改 重定向为:无" fi fi - if [ "$snds_redirect" = "1" ] ; then + if [ "$sdns_redirect" = "1" ] ; then echo "no-resolv" >> "$dnsmasq_Conf" echo "server=127.0.0.1#$sdns_port" >> "$dnsmasq_Conf" - logger -t "SmartDNS" "作为 dnsmasq 上游服务器:127.0.0.1:$sdns_port" + logger -t "SmartDNS" "作为 DNSmasq 上游服务器:127.0.0.1:$sdns_port" + if [ "$sdnse_enable" = 1 ] ; then + logger -t "SmartDNS" "作为 DNSmasq 上游服务器:127.0.0.1:$sdnse_port" + fi fi ;; esac } - - Change_iptable () { - # 【】 + # 【端口转发】 local statu=0 case $action in stop) - if [ "$snds_redirected" = 2 ] ; then + if [ "$sdns_redirected" = 2 ] ; then iptables -t nat -D PREROUTING -p tcp -d "$IPS4" --dport 53 -j REDIRECT --to-ports "$sdns_ported" >/dev/null 2>&1 iptables -t nat -D PREROUTING -p udp -d "$IPS4" --dport 53 -j REDIRECT --to-ports "$sdns_ported" >/dev/null 2>&1 ip6tables -t nat -D PREROUTING -p tcp -d "$IPS6" --dport 53 -j REDIRECT --to-ports "$sdns_ported" >/dev/null 2>&1 ip6tables -t nat -D PREROUTING -p udp -d "$IPS6" --dport 53 -j REDIRECT --to-ports "$sdns_ported" >/dev/null 2>&1 [ "$sdns_enable" = 0 ] && logger -t "SmartDNS" "恢复重定向 $IPS4:$sdns_ported 至 xxx.xxx.xxx:53" fi - if [ "$snds_redirected" = 1 ] ; then + if [ "$sdns_redirected" = 1 ] ; then iptables -t nat -D PREROUTING -p udp -d "$IPS4" --dport 53 -j REDIRECT --to-ports 53 >/dev/null 2>&1 fi ;; start) - if [ "$snds_redirected" != 2 ] && [ "$snds_redirect" = 2 ] ; then + if [ "$sdns_redirected" != 2 ] && [ "$sdns_redirect" = 2 ] ; then statu=1 logger -t "SmartDNS" "重定向 xxx.xxx.xxx:53 至 $IPS4:$sdns_port" + if [ "$sdnse_enable" = 1 ] ; then + logger -t "SmartDNS" "重定向 xxx.xxx.xxx:53 至 $IPS4:$sdnse_port" + fi fi ;; reset) - if [ "$snds_redirect" = 2 ] ; then + if [ "$sdns_redirect" = 2 ] ; then statu=1 fi - if [ "$snds_redirect" = 1 ] ; then + if [ "$sdns_redirect" = 1 ] ; then iptables -t nat -A PREROUTING -p udp -d "$IPS4" --dport 53 -j REDIRECT --to-ports 53 >/dev/null 2>&1 fi ;; @@ -420,11 +477,17 @@ Start_smartdns () { Change_dnsmasq Change_adbyby echo "$hosts_type" >> "$smartdns_Ini" - [ "$snds_redirect" = 0 ] && logger -t "SmartDNS" "SmartDNS 使用 $sdns_port 端口" + if [ "$sdns_redirect" = 0 ] ; then + logger -t "SmartDNS" "SmartDNS 使用 $sdns_port 端口" + if [ "$sdnse_enable" = 1 ] ; then + logger -t "SmartDNS" "SmartDNS 使用 $sdnse_port 端口" + fi + fi Change_iptable - snds_redirected="$snds_redirect" - echo "$snds_redirected" >> "$smartdns_Ini" + sdns_redirected="$sdns_redirect" + echo "$sdns_redirected" >> "$smartdns_Ini" echo "$sdns_port" >> "$smartdns_Ini" + echo "$sdnse_port" >> "$smartdns_Ini" #存疑 rm -f /tmp/sdnsipset.conf args="" @@ -443,9 +506,11 @@ Start_smartdns () { if [ "$sdns_coredump" = "1" ] ; then args="$args -S" fi - # 通过检测配置文件是否变化,确定是否重启 dnsmasq 进程 + # 通过检测配置文件是否变化,确定是否重启 DNSmasq 进程 if [ "$dnsmasq_md5" != $(md5sum "$dnsmasq_Conf" | awk '{ print $1 }') ] ; then - /sbin/restart_dhcpd >/dev/null 2>&1 + logger -t "SmartDNS" "正在重启 DNSmasq 进程..." + /sbin/restart_dhcpd >/dev/null 2>&1 + logger -t "SmartDNS" "DNSmasq 进程已重启..." fi # 启动 smartdns 进程 "$smartdns_Bin" -f -c "$smartdns_Conf" "$args" &>/dev/null & @@ -453,9 +518,9 @@ Start_smartdns () { smartdns_process=$(pidof smartdns | awk '{ print $1 }') if [ "$smartdns_process"x = x ] ; then if [ "$hosts_type" = "SmartDNS" ] ; then - logger -t "SmartDNS" "启动失败..." - logger -t "SmartDNS" "删除"$smartdns_Conf"中conf-file附加去广告设置,再次启动......" - logger -t "SmartDNS" "若启动成功,则请检查相关去广告规则格式是否符合SmartDNS要求" + logger -t "SmartDNS" "启动失败..." + logger -t "SmartDNS" "删除"$smartdns_Conf"中conf-file附加去广告设置,再次启动..." + logger -t "SmartDNS" "若启动成功,则请检查相关去广告规则格式是否符合SmartDNS要求..." sed -i '/conf-file /d' "$smartdns_Conf" "$smartdns_Bin" -f -c "$smartdns_Conf" "$args" &>/dev/null & fi @@ -463,75 +528,87 @@ Start_smartdns () { sleep 1 smartdns_process=$(pidof smartdns | awk '{ print $1 }') if [ "$smartdns_process"x = x ] ; then - logger -t "SmartDNS" "启动失败..." - logger -t "SmartDNS" "停用SmartDNS!请检查其端口配置及自定义设置!" - logger -t "SmartDNS" "恢复Dnsmasq提供dns解析" + logger -t "SmartDNS" "启动失败..." + logger -t "SmartDNS" "停用 SmartDNS!请检查其端口配置及自定义设置 !!!" + logger -t "SmartDNS" "恢复 DNSmasq 提供 DNS 解析..." nvram set sdns_enable=0 sdns_enable=0 action="stop" Stop_smartdns if [ "$dnsmasq_md5" != $(md5sum "$dnsmasq_Conf" | awk '{ print $1 }') ] ; then - /sbin/restart_dhcpd >/dev/null 2>&1 + logger -t "SmartDNS" "正在重启 DNSmasq 进程..." + /sbin/restart_dhcpd >/dev/null 2>&1 + logger -t "SmartDNS" "DNSmasq 进程已重启..." fi exit else - logger -t "SmartDNS" "smartdns 进程已启动" + logger -t "SmartDNS" "进程已启动..." fi } - Stop_smartdns () { # 【】 killall -9 smartdns >/dev/null 2>&1 - logger -t "SmartDNS" "结束smartdns进程 ..." + logger -t "SmartDNS" "结束 SmartDNS 进程..." Change_adbyby Change_dnsmasq Change_iptable if [ "$dnsmasq_md5" != $(md5sum "$dnsmasq_Conf" | awk '{ print $1 }') ] && [ "$sdns_enable" = 0 ] ; then - /sbin/restart_dhcpd >/dev/null 2>&1 + logger -t "SmartDNS" "正在重启 DNSmasq 进程..." + /sbin/restart_dhcpd >/dev/null 2>&1 + logger -t "SmartDNS" "DNSmasq 进程已重启..." fi smartdns_process=$(pidof smartdns | awk '{ print $1 }') if [ "$smartdns_process"x = x ] && [ "$sdns_enable" = 0 ] ; then rm -f "$smartdns_Ini" - logger -t "SmartDNS" "已停用" + logger -t "SmartDNS" "服务器已停用..." fi } - Main () { # 【调用各子函数】 case $action in start) if [ ! -s "$smartdns_Ini" ] ; then - logger -t "SmartDNS" "启动..." + logger -t "SmartDNS" "正在启动..." fi Check_ss + if [ $(nvram get sdns_adblock) = "1" ]; then + Start_AD + fi Start_smartdns - logger -t "SmartDNS" "已成功启动" + logger -t "SmartDNS" "服务器已启动..." + sleep 2 + echo 3 > /proc/sys/vm/drop_caches ;; stop) + smartdns_process=$(pidof smartdns | awk '{ print $1 }') if [ "$smartdns_process"x != x ] ; then case $sdns_enable in 0) - logger -t "SmartDNS" "停用 ..." + logger -t "SmartDNS" "停用服务器 ..." ;; 1) - logger -t "SmartDNS" "重启 ..." + logger -t "SmartDNS" "重启服务器..." ;; esac fi Stop_smartdns + sleep 2 + echo 3 > /proc/sys/vm/drop_caches ;; restart) if [ $(nvram get adbyby_enable) = 1 ] ; then [ $(nvram get adbyby_add) = 1 ] && hosts_type="SmartDNS" - [ $(nvram get adbyby_add) = 0 ] && hosts_type="Dnsmasq" + [ $(nvram get adbyby_add) = 0 ] && hosts_type="DNSmasq" else hosts_type="0" fi Check_ss Start_smartdns - logger -t "SmartDNS" "已完成重启" + logger -t "SmartDNS" "服务器已重启完成.." + sleep 2 + echo 3 > /proc/sys/vm/drop_caches ;; reset) [ "$sdns_enable" = "1" ] && Change_iptable @@ -540,7 +617,7 @@ Main () { echo "check" ;; esac - } +} Read_ini -Main +Main \ No newline at end of file diff --git a/trunk/user/smartdns/smartdns_custom.conf b/trunk/user/smartdns/smartdns_custom.conf index 63348c90ee..e92698d030 100644 --- a/trunk/user/smartdns/smartdns_custom.conf +++ b/trunk/user/smartdns/smartdns_custom.conf @@ -1,61 +1,351 @@ -### 2021-12-7 -### 可为UDP上游添加-check-edns参数 - -# 【基础 DNS】 -# server-tcp 114.114.114.114:53 -group Ali_DNS -group Tencent_DNS -group 360_DNS -exclude-default-group -# server-tcp 1.2.4.8:53 -group Ali_DNS -group Tencent_DNS -group 360_DNS -exclude-default-group -# server-tcp 202.141.162.123:5353 -group Ali_DNS -group Tencent_DNS -group 360_DNS -# server-tcp 101.6.6.6:5353 -group Ali_DNS -group Tencent_DNS -group 360_DNS - -# ①【Ali_DNS】 -# domain-rules /dns.alidns.com/ -c tcp:443 -n Ali_DNS -# domain-rules /public.alidns.com/ -c tcp:853 -n Ali_DNS -# server-https https://223.5.5.5:443/dns-query -blacklist-ip -spki-pin ZwR21gnCMTzsM6VWtnb/azufgYegWWuhE9reP5tamWU= -host-name dns.alidns.com -group Safe -server-tls 223.5.5.5:853 -blacklist-ip -spki-pin ZwR21gnCMTzsM6VWtnb/azufgYegWWuhE9reP5tamWU= -host-name public1.alidns.com -group Safe -group Over -# server-tcp 223.5.5.0:53 -group Ali_DNS -exclude-default-group - -# ② 【Tencent_DNS】 -# domain-rules /doh.pub/ -c tcp:443 -n Tencent_DNS -# domain-rules /dot.pub/ -c tcp:853 -n Tencent_DNS -# server-https https://162.14.21.178:443/dns-query -blacklist-ip -spki-pin Q1JRqG379NbZYD6KcA+jl8co9wuQNhg/YmN4dLImQpM= -host-name doh.pub -group Safe -server-tls 162.14.21.56:853 -blacklist-ip -spki-pin Q1JRqG379NbZYD6KcA+jl8co9wuQNhg/YmN4dLImQpM= -host-name dot.pub -group Safe -group Over -# server-tcp 119.29.29.29:53 -group Tencent_DNS -exclude-default-group - -# ③【360_DNS】 -# domain-rules /doh.360.cn/ -c tcp:443 -n 360_DNS -# domain-rules /dot.360.cn/ -c tcp:853 -n 360_DNS -# server-https https://218.30.118.6:443/dns-query -blacklist-ip -spki-pin /GZlA5nnRbCZE7Rr/U829+XnthuLLsQLA3HlcjSUQI8= -host-name doh.360.cn -group Safe -server-tls 101.199.113.208:853 -blacklist-ip -spki-pin qIPESDCD2+FOmw/HK5ymULrOIu9SI/tajG/B9/7M3X0= -host-name dot.360.cn -group Safe -group Over -# server-tls 180.163.249.75:853 -blacklist-ip -spki-pin qIPESDCD2+FOmw/HK5ymULrOIu9SI/tajG/B9/7M3X0= -host-name dot.360.cn -group Safe -# server-tcp 101.226.4.6:53 -group 360_DNS -exclude-default-group -# server-tcp 218.30.118.6:53 -group 360_DNS -exclude-default-group - -# ④【台湾 DNS】为了解析github而加入 -server 101.101.101.101:53 -group Over -exclude-default-group -server 168.95.1.1:53 -group Over -exclude-default-group - -### 域名分流 -domain-rules /github.com/ -c none -n Over -domain-rules /githubapp.com/ -c none -n Over -domain-rules /github.io/ -c none -n Over -domain-rules /githubusercontent.com/ -c none -n Over -domain-rules /githubassets.com/ -c none -n Over -domain-rules /github-cloud.s3.amazonaws.com/ -c none -n Over +# dns server name, default is host name +# server-name, +# example: +# server-name smartdns +# + +# dns server run user +# user [username] +# example: run as nobody +# user nobody +# + +# Include another configuration options +# conf-file [file] +# conf-file blacklist-ip.conf + +# dns server bind ip and port, default dns server port is 53, support binding multi ip and port +# bind udp server +# bind [IP]:[port] [-group [group]] [-no-rule-addr] [-no-rule-nameserver] [-no-rule-ipset] [-no-speed-check] [-no-cache] [-no-rule-soa] [-no-dualstack-selection] +# bind tcp server +# bind-tcp [IP]:[port] [-group [group]] [-no-rule-addr] [-no-rule-nameserver] [-no-rule-ipset] [-no-speed-check] [-no-cache] [-no-rule-soa] [-no-dualstack-selection] +# option: +# -group: set domain request to use the appropriate server group. +# -no-rule-addr: skip address rule. +# -no-rule-nameserver: skip nameserver rule. +# -no-rule-ipset: skip ipset rule. +# -no-speed-check: do not check speed. +# -no-cache: skip cache. +# -no-rule-soa: Skip address SOA(#) rules. +# -no-dualstack-selection: Disable dualstack ip selection. +# -force-aaaa-soa: force AAAA query return SOA. +# example: +# IPV4: +# bind :53 +# bind :6053 -group office -no-speed-check +# IPV6: +# bind [::]:53 +# bind-tcp [::]:53 + +# tcp connection idle timeout +# tcp-idle-time [second] + +# dns cache size +# cache-size [number] +# 0: for no cache + +# enable persist cache when restart +# cache-persist yes + +# cache persist file +# cache-file /tmp/smartdns.cache + +# prefetch domain +# prefetch-domain [yes|no] +# prefetch-domain yes + +# cache serve expired +# serve-expired [yes|no] +# serve-expired yes + +# cache serve expired TTL +# serve-expired-ttl [num] +# serve-expired-ttl 0 + +# reply TTL value to use when replying with expired data +# serve-expired-reply-ttl [num] +# serve-expired-reply-ttl 30 + +# List of hosts that supply bogus NX domain results +# bogus-nxdomain [ip/subnet] + +# List of IPs that will be filtered when nameserver is configured -blacklist-ip parameter +# blacklist-ip [ip/subnet] + +# List of IPs that will be accepted when nameserver is configured -whitelist-ip parameter +# whitelist-ip [ip/subnet] + +# List of IPs that will be ignored +# ignore-ip [ip/subnet] + +# speed check mode +# speed-check-mode [ping|tcp:port|none|,] +# example: +# speed-check-mode ping,tcp:80,tcp:443 +# speed-check-mode tcp:443,ping +# speed-check-mode none + +# force AAAA query return SOA +# force-AAAA-SOA [yes|no] + +# force specific qtype return soa +# force-qtype-SOA [qtypeid |...] +# force-qtype-SOA 65 28 + +# Enable IPV4, IPV6 dual stack IP optimization selection strategy +# dualstack-ip-selection-threshold [num] (0~1000) +# dualstack-ip-allow-force-AAAA [yes|no] +# dualstack-ip-selection [yes|no] +# dualstack-ip-selection yes + +# edns client subnet +# edns-client-subnet [ip/subnet] +# edns-client-subnet 192.168.1.1/24 +# edns-client-subnet 8::8/56 + +# ttl for all resource record +# rr-ttl: ttl for all record +# rr-ttl-min: minimum ttl for resource record +# rr-ttl-max: maximum ttl for resource record +# rr-ttl-reply-max: maximum reply ttl for resource record +# example: +# rr-ttl 300 +# rr-ttl-min 60 +# rr-ttl-max 86400 +# rr-ttl-reply-max 60 + +# Maximum number of IPs returned to the client|8|number of IPs, 1~16 +# example: +# max-reply-ip-num 1 + +# response mode +# Experimental feature +# response-mode [first-ping|fastest-ip|fastest-response] + +# set log level +# log-level: [level], level=fatal, error, warn, notice, info, debug +# log-file: file path of log file. +# log-size: size of each log file, support k,m,g +# log-num: number of logs +# log-level info +# log-file /var/log/smartdns/smartdns.log +# log-size 128k +# log-num 2 + +# dns audit +# audit-enable [yes|no]: enable or disable audit. +# audit-enable yes +# audit-SOA [yes|no]: enable or disable log soa result. +# audit-size size of each audit file, support k,m,g +# audit-file /var/log/smartdns-audit.log +# audit-size 128k +# audit-num 2 + +# Support reading dnsmasq dhcp file to resolve local hostname +# dnsmasq-lease-file /var/lib/misc/dnsmasq.leases + +# certificate file +# ca-file [file] +# ca-file /etc/ssl/certs/ca-certificates.crt + +# certificate path +# ca-path [path] +# ca-path /etc/ss/certs + +# remote udp dns server list +# server [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-check-edns] [-group [group] ...] [-exclude-default-group] +# default port is 53 +# -blacklist-ip: filter result with blacklist ip +# -whitelist-ip: filter result whth whitelist ip, result in whitelist-ip will be accepted. +# -check-edns: result must exist edns RR, or discard result. +# -group [group]: set server to group, use with nameserver /domain/group. +# -exclude-default-group: exclude this server from default group. +# server 8.8.8.8 -blacklist-ip -check-edns -group g1 -group g2 + +# remote tcp dns server list +# server-tcp [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-group [group] ...] [-exclude-default-group] +# default port is 53 +# server-tcp 8.8.8.8 + +# remote tls dns server list +# server-tls [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group] +# -spki-pin: TLS spki pin to verify. +# -tls-host-verify: cert hostname to verify. +# -host-name: TLS sni hostname. +# -no-check-certificate: no check certificate. +# Get SPKI with this command: +# echo | openssl s_client -connect '[ip]:853' | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 +# default port is 853 +# server-tls 8.8.8.8 +# server-tls 1.0.0.1 + +# remote https dns server list +# server-https https://[host]:[port]/path [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group] +# -spki-pin: TLS spki pin to verify. +# -tls-host-verify: cert hostname to verify. +# -host-name: TLS sni hostname. +# -http-host: http host. +# -no-check-certificate: no check certificate. +# default port is 443 +# server-https https://cloudflare-dns.com/dns-query + +# specific nameserver to domain +# nameserver /domain/[group|-] +# nameserver /www.example.com/office, Set the domain name to use the appropriate server group. +# nameserver /www.example.com/-, ignore this domain + +# specific address to domain +# address /domain/[ip|-|-4|-6|#|#4|#6] +# address /www.example.com/1.2.3.4, return ip 1.2.3.4 to client +# address /www.example.com/-, ignore address, query from upstream, suffix 4, for ipv4, 6 for ipv6, none for all +# address /www.example.com/#, return SOA to client, suffix 4, for ipv4, 6 for ipv6, none for all + +# enable ipset timeout by ttl feature +# ipset-timeout [yes] + +# specific ipset to domain +# ipset /domain/[ipset|-] +# ipset /www.example.com/block, set ipset with ipset name of block +# ipset /www.example.com/-, ignore this domain + +# set domain rules +# domain-rules /domain/ [-speed-check-mode [...]] +# rules: +# [-c] -speed-check-mode [mode]: speed check mode +# speed-check-mode [ping|tcp:port|none|,] +# [-a] -address [address|-]: same as address option +# [-n] -nameserver [group|-]: same as nameserver option +# [-p] -ipset [ipset|-]: same as ipset option +# [-d] -dualstack-ip-selection [yes|no]: same as dualstack-ip-selection option + +# collection of domains +# the domain-set can be used with /domain/ for address, nameserver, ipset, etc. +# domain-set -name [set-name] -type list -file [/path/to/file] +# [-n] -name [set name]: domain set name +# [-t] -type [list]: domain set type, list only now +# [-f] -file [path/to/set]: file path of domain set +# +# example: +# domain-set -name domain-list -type list -file /etc/smartdns/domain-list.conf +# address /domain-set:domain-list/1.2.3.4 +# nameserver /domain-set:domain-list/server-group +# ipset /domain-set:domain-list/ipset +# domain-rules /domain-set:domain-list/ -speed-check-mode ping + +#################################################### +### +### DNS地址 https://dns.iui.im/ +### +### Copyright (C) 2022 TurBoTse <860018505@qq.com> +### 2022-10-9 +#################################################### + +### 114 DNS +server 114.114.114.114 -check-edns +#server 114.114.115.115 -check-edns + +### Ali DNS +#server 223.5.5.5 -check-edns +#server 223.6.6.6 -check-edns +#server-https https://223.5.5.5/dns-query +#server-https https://223.6.6.6/dns-query +server-https https://dns.alidns.com/dns-query +server-https https://2400:3200:baba::1/dns-query + +### Baidu DNS +server 180.76.76.76 -check-edns + +### DNSPod DNS+ 腾讯DNS +#server 119.28.28.28 -check-edns +#server 119.29.29.29 -check-edns +#server 182.254.116.116 -check-edns +#server 182.254.118.118 -check-edns +server-https https://doh.pub/dns-query + +### CNNIC SDNS +server 1.2.4.8 -check-edns +#server 210.2.4.8 -check-edns + +### 360DNS +server-https https://doh.360.cn/dns-query + +### CFIEC DNS +server-https https://dns.ipv6dns.com/dns-query + +### 清华大学 TUNA +server 101.6.6.6 -check-edns + +### 香港宽频DNS +#server 203.80.96.9 -group oversea -exclude-default-group +server 203.80.96.10 + +### 和记环球电讯DNS +server 202.181.240.44 +#server 210.0.255.251 -group oversea -exclude-default-group + +### 台湾中华电信 +#server 168.95.1.1 -group oversea -exclude-default-group +server 168.95.192.1 -group oversea -exclude-default-group + +### 台湾Quad 101 +#server 101.101.101.101 -group oversea -exclude-default-group +server-https https://dns.twnic.tw/dns-query -group oversea -exclude-default-group + +### 国外DNS +### GoogleDNS +#server 8.8.4.4 +server 8.8.8.8 +#server-https https://8.8.4.4/dns-query -group oversea -exclude-default-group +#server-https https://8.8.8.8/dns-query -group oversea -exclude-default-group +server-https https://dns.google/dns-query -group oversea -exclude-default-group +server-https https://[2001:4860:4860::64]/dns-query -group oversea -exclude-default-group + +### OpenDNS +server 208.67.222.222 +#server 208.67.220.220 +server-https https://doh.opendns.com/dns-query -group oversea -exclude-default-group + +### Cloudflare DNS +#server 1.0.0.1 +server 1.1.1.1 +#server-https https://1.0.0.1/dns-query -group oversea -exclude-default-group +#server-https https://1.1.1.1/dns-query -group oversea -exclude-default-group +server-https https://cloudflare-dns.com/dns-query -group oversea -exclude-default-group +server-https https://[2606:4700:4700::1111]/dns-query -group oversea -exclude-default-group + +#Freenom DNS +server 80.80.80.80 + +### 设置域名分流规则 +domain-rules /github.io/ -c none -n oversea +domain-rules /github.com/ -c none -n oversea +domain-rules /githubapp.com/ -c none -n oversea +domain-rules /githubassets.com/ -c none -n oversea +domain-rules /codeload.github.com/ -c none -n oversea +domain-rules /githubusercontent.com/ -c none -n oversea +domain-rules /github-cloud.s3.amazonaws.com/ -c none -n oversea ### 忽略上游返回结果中的ip bogus-nxdomain 127.0.0.1/16 bogus-nxdomain 0.0.0.0/16 -### 测速模式默认为ping,对于不响应ping的可以设置tcp:80以及tcp:443 -### 测速方式最多设置2种,多的则为无效,前者不响应则使用后面的。 -speed-check-mode tcp:443,ping +### 读取dnsmasq dhcp文件解析本地主机名功能 +dnsmasq-lease-file /tmp/dnsmasq.leases + +### 证书 +ca-file /etc/ssl/certs/ca-certificates.crt +ca-path /etc/ssl/certs ### 设置日志级别 fatal,error,warn,notice,info,debug -log-level notice -log-size 1024K -log-num 1 +log-level error +log-file /tmp/smartdns/smartdns.log +log-size 128K +log-num 2 + # 貌似开启跳过测速后audit功能会失效 #audit-enable yes #audit-SOA yes -#audit-size 1024K -#audit-num 1 +#audit-file /tmp/smartdns/smartdns-audit.log +#audit-size 128K +#audit-num 2 + diff --git a/trunk/user/socat/Makefile b/trunk/user/socat/Makefile index 8f92319b40..f03d473002 100644 --- a/trunk/user/socat/Makefile +++ b/trunk/user/socat/Makefile @@ -1,5 +1,5 @@ -SRC_NAME = socat-1.7.4.4 -SRC_URL = http://www.dest-unreach.org/socat/download/socat-1.7.4.4.tar.bz2 +SRC_NAME = socat-1.8.0.0 +SRC_URL = http://www.dest-unreach.org/socat/download/$(SRC_NAME).tar.bz2 THISDIR = $(shell pwd) all: download_test extract_test config_test @@ -7,7 +7,7 @@ all: download_test extract_test config_test download_test: ( if [ ! -f $(SRC_NAME).tar.bz2 ]; then \ - wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \ + wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.bz2 $(SRC_URL); \ fi ) extract_test: @@ -39,4 +39,4 @@ clean: rm -f config_done romfs: - $(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/socat /usr/bin/socat + $(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/socat /usr/bin/socat \ No newline at end of file diff --git a/trunk/user/www/dict/CN.dict b/trunk/user/www/dict/CN.dict index 56aab2bcb2..0f3fc32e6c 100644 --- a/trunk/user/www/dict/CN.dict +++ b/trunk/user/www/dict/CN.dict @@ -60,7 +60,7 @@ IP6_DNS_desc=DNSv6 外网设置 IP6_DNS_Auto=自动获取 IPV6 DNS: IP6_DNS_Addr=DNSv6 服务器 IP6_LAN_desc=IPv6 内网设置 -IP6_LAN_Auto=通过 DHCP 获取内网 IPv6 地址: +IP6_LAN_Auto=禁用IPV6 NAT: IP6_LAN_Addr=IPv6 内网地址: IP6_LAN_Pref=IPv6 内网前缀长度: IP6_LAN_RAdv=启用 LAN 路由器广播: @@ -1902,4 +1902,53 @@ GfwList=GfwList Login=登录 BTN_FREEMEMORY=清理内存 - +SmartDNS +SmartDNS_1=常规设置 +SmartDNS_2=高级设置 +SmartDNS_3=第二服务器 +SmartDNS_4=上游服务器 +SmartDNS_5=其他设置 +SmartDNS_6=SmartDNS是一个本地高性能DNS服务器,支持避免域名污染,支持返回最快IP,支持广告过滤。 +SmartDNS_7=运行状态 +SmartDNS_8=总开关 +SmartDNS1=服务器名称 +SmartDNS2=服务器端口 +SmartDNS3=TCP服务器 +SmartDNS3_1=支持TCP的53端口重定向到SmartDNS +SmartDNS4=IPV6服务器 +SmartDNS4_1=支持IPV6的UDP/TCP的53端口重定向到SmartDNS +SmartDNS5=重定向 +SmartDNS6=域名结果缓存个数 +SmartDNS7=是否持久化缓存 +SmartDNS8=TCP 链接空闲超时时间 +SmartDNS9=域名 TTL 结果 +SmartDNS10=域名 TTL 最小值 +SmartDNS11=域名 TTL 最大值 +SmartDNS12=返回给客户端的 TTL 最大值 +SmartDNS13=返回给客户的最大 IP 数量 +SmartDNS14=跳过测速 +SmartDNS15=跳过ipset规则 +SmartDNS16=跳过address规则 +SmartDNS17=跳过nameserver规则 +SmartDNS18=跳过address SOA(#)规则 +SmartDNS19=ipset超时 +SmartDNS20=测速模式 +SmartDNS21=双栈IP优选 +SmartDNS22=双栈IP优选阈值 +SmartDNS23=双栈主动优选IPV6 +SmartDNS24=停用IPV6地址解析 +SmartDNS24_1=强制 AAAA 地址返回 SOA +SmartDNS25=Force qtype SOA +SmartDNS25_1=强制指定 qtype 返回 SOA +SmartDNS26=域名预加载 +SmartDNS27=过期缓存服务 +SmartDNS27_1=开启此功能后,如果有请求时尝试回应 TTL 为 0 的过期记录,并发查询记录,以避免查询等待 +SmartDNS28=过期缓存服务最长超时时间 +SmartDNS28_1=秒,0 表示停用超时,大于 0 表示指定的超时的秒数 +SmartDNS29=回应的过期缓存 TTL +SmartDNS30=双栈优选预取周期 +SmartDNS31=启用 +SmartDNS32=跳过双栈优选 +SmartDNS33=跳过Cache +Disable_IPv6DNS_records=禁止解析IPv6 DNS记录 +Disable_parsing_of_IPv6_DNS_records=过滤掉 IPv6(AAAA) ,只返回 IPv4 DNS 域名记录。 \ No newline at end of file diff --git a/trunk/user/www/n56u_ribbon_fixed/Advanced_smartdns.asp b/trunk/user/www/n56u_ribbon_fixed/Advanced_smartdns.asp index 4a7b7bdf07..fc0447d422 100644 --- a/trunk/user/www/n56u_ribbon_fixed/Advanced_smartdns.asp +++ b/trunk/user/www/n56u_ribbon_fixed/Advanced_smartdns.asp @@ -28,10 +28,13 @@ $j(document).ready(function(){ init_itoggle('sdns_enable'); init_itoggle('sdns_tcp_server'); init_itoggle('sdns_ipv6_server'); - init_itoggle('snds_ip_change'); + init_itoggle('sdnse_ipv6_server'); + init_itoggle('sdns_ip_change'); + init_itoggle('sdns_dualstack_ip_allow_force_AAAA'); init_itoggle('sdns_cache_persist'); - init_itoggle('sdns_www'); - init_itoggle('sdns_ipv6'); + init_itoggle('sdns_prefetch_domain'); + init_itoggle('sdns_force_aaaa_soa'); + init_itoggle('sdns_force_qtype_soa'); init_itoggle('sdns_exp'); init_itoggle('sdnse_enable'); init_itoggle('sdnse_address'); @@ -41,15 +44,19 @@ $j(document).ready(function(){ init_itoggle('sdns_as'); init_itoggle('sdnse_speed'); init_itoggle('sdns_speed'); + init_itoggle('sdns_speed_mode'); init_itoggle('sdnse_ns'); init_itoggle('sdns_ns'); init_itoggle('sdnse_ipc'); init_itoggle('sdnse_ipset'); init_itoggle('sdns_ipset'); + init_itoggle('sdns_ipset_timeout'); init_itoggle('sdnse_cache'); init_itoggle('sdns_coredump'); - init_itoggle('ss_black'); - init_itoggle('ss_white'); + init_itoggle('sdns_black'); + init_itoggle('sdns_white'); + init_itoggle('sdns_adblock'); + init_itoggle('sdns_adblock_url'); init_itoggle('sdnss_enable_x_0'); $j("#tab_sm_cfg, #tab_sm_exp, #tab_sm_sec, #tab_sm_dns, #tab_sm_cou").click(function(){ var newHash = $j(this).attr('href').toLowerCase(); @@ -274,33 +281,34 @@ function showMRULESList(){
<#running_status#> | +
---|
<#SmartDNS_7#> | ||
---|---|---|
<#menu5_21_1#> | +||
<#SmartDNS_8#> |
@@ -314,265 +322,288 @@ function showMRULESList(){
|
|
服务器名称 | +||
<#SmartDNS1#> | - " /> + " /> | |
本地端口 | +||
<#SmartDNS2#> | "> | |
TCP服务器 | +||
<#SmartDNS3#> |
<% nvram_match_x("", "sdns_tcp_server", "0", "value=0"); %>>
-
><#checkbox_Yes#>
><#checkbox_No#>
|
|
IPV6服务器 | +||
<#SmartDNS4#> |
<% nvram_match_x("", "sdns_ipv6_server", "0", "value=0"); %>>
-
><#checkbox_Yes#>
><#checkbox_No#>
|
|
双栈IP优选 | -
-
-
-
- <% nvram_match_x("", "snds_ip_change", "0", "value=0"); %>>
-
-
- ><#checkbox_Yes#>
- ><#checkbox_No#>
-
- |
- |
双栈IP优选阈值 | -- "> 毫秒(0-100) - | -|
禁用IPV6解析 | -
-
-
-
- <% nvram_match_x("", "sdns_ipv6", "0", "value=0"); %>>
-
-
- ><#checkbox_Yes#>
- ><#checkbox_No#>
-
- |
- 重定向 | +
<#SmartDNS5#> | - | |
域名查询结果缓存个数 | +||
<#SmartDNS6#> |
- ">
- 0为禁用缓存功能
+ ">
|
缓存持久化服务功能 | +
<#SmartDNS7#> |
<% nvram_match_x("", "sdns_cache_persist", "0", "value=0"); %>>
- cache-file /etc/storage/smartdns.cache
+ cache-file /tmp/smartdns.cache
><#checkbox_Yes#>
><#checkbox_No#>
|
|
缓存可用时间 | +||
<#SmartDNS8#> |
- ">
- 单位:秒,需大于0的数字
+ ">
|
|
缓存更新阈值 | +||
<#SmartDNS9#> |
- ">
- 单位:秒,需大于0的数字
+ ">
|
|
缓存时间上限 | +||
<#SmartDNS10#> |
- ">
- 单位:秒,需大于0的数字
+ ">
|
|
- 域名预先获取功能 | -+ | |
<#SmartDNS11#> | ++ "> + | +|
<#SmartDNS12#> | ++ "> + | +|
<#SmartDNS13#> | ++ "> + | +
<#SmartDNS14#> | +
-
- <% nvram_match_x("", "sdns_www", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_speed", "0", "value=0"); %>>
+
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
---|---|
过期缓存服务功能 | +|
<#SmartDNS15#> |
-
- <% nvram_match_x("", "sdns_exp", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_ipset", "0", "value=0"); %>>
+
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
过期缓存回应阈值 | +|
<#SmartDNS16#> |
- ">
- 失效不足此时长的过期缓存可用。0为不限时
+
+
+
+ <% nvram_match_x("", "sdns_address", "0", "value=0"); %>>
+
+
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
+
|
-
回应的过期缓存可用时间 | +|
<#SmartDNS17#> |
- ">
- 过期缓存更新前的临时可用时间。0为不限时
+
+
+
+ <% nvram_match_x("", "sdns_ns", "0", "value=0"); %>>
+
+
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
+
|
加载ChnrouteIP为白名单 | +|
<#SmartDNS18#> |
-
- <% nvram_match_x("", "ss_white", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_as", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
- 此项可配合科学上网来实现大陆IP才走国内DNS
- 需在上游服务器国内组中开启白名单过滤[-whitelist-ip]
|
加载ChnrouteIP为黑名单 | +|
<#SmartDNS19#> |
-
- <% nvram_match_x("", "ss_black", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_ipset_timeout", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
- 此项可配合科学上网来实现大陆IP禁止走国外DNS
- 需在上游服务器国外组中开启黑名单过滤[-blacklist-ip]
|
跳过测速 | +|
---|---|
<#SmartDNS20#> | +
+ ">
+ 例如: none 为禁止 ping,tcp:80,tcp:443
+ |
+
<#SmartDNS21#> |
-
- <% nvram_match_x("", "sdns_speed", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_ip_change", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
跳过address规则 | +|
<#SmartDNS2#> | ++ "> 毫秒(0-100) + | +
<#SmartDNS23#> |
-
- <% nvram_match_x("", "sdns_address", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_dualstack_ip_allow_force_AAAA", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
跳过nameserver规则 | +|
<#SmartDNS24#> |
-
- <% nvram_match_x("", "sdns_ns", "0", "value=0"); %>>
-
+
+ <% nvram_match_x("", "sdns_force_aaaa_soa", "0", "value=0"); %>>
+ <#SmartDNS24_1#>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
跳过ipset规则 | +|
<#SmartDNS25#> |
+ ">
+ <#SmartDNS25_1#>
+ |
+
<#SmartDNS26#> | +
-
- <% nvram_match_x("", "sdns_ipset", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdns_prefetch_domain", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
跳过address SOA(#)规则 | +|
<#SmartDNS27#> |
- <#SmartDNS27_1#>
- <% nvram_match_x("", "sdns_as", "0", "value=0"); %>>
-
+
+ <% nvram_match_x("", "sdns_exp", "0", "value=0"); %>>
+
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
<#SmartDNS28#> | +
+ ">
+ <#SmartDNS28_1#>
+ |
+
<#SmartDNS29#> | +
+ ">
+ <#SmartDNS28_1#>
+ |
+
<#SmartDNS30#> | +
+ ">
+ <#SmartDNS28_1#>
+ |
+
启用 | +|
---|---|
<#SmartDNS31#> |
@@ -585,13 +616,18 @@ function showMRULESList(){
|
本地端口 | +|
<#SmartDNS1#> | +
+ ">
+ 例如: oversea, office, home
+ |
+
<#SmartDNS2#> | "> - |
TCP服务器 | +|
<#SmartDNS3#> |
@@ -604,8 +640,7 @@ function showMRULESList(){
|
跳过测速 | +|
<#SmartDNS14#> |
@@ -618,13 +653,20 @@ function showMRULESList(){
|
服务器组 | +|
<#SmartDNS15#> |
- ">
- 使用指定服务器组查询,比如office, home
+
+
+
+ <% nvram_match_x("", "sdnse_ipset", "0", "value=0"); %>>
+
+
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
+
|
跳过address规则 | +|
<#SmartDNS16#> |
@@ -637,7 +679,7 @@ function showMRULESList(){
|
跳过nameserver规则 | +|
<#SmartDNS17#> |
@@ -650,33 +692,33 @@ function showMRULESList(){
|
跳过ipset规则 | +|
<#SmartDNS18#> |
-
- <% nvram_match_x("", "sdnse_ipset", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdnse_as", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
跳过address SOA(#)规则 | +|
<#SmartDNS24#> |
-
- <% nvram_match_x("", "sdnse_as", "0", "value=0"); %>>
+
+ <% nvram_match_x("", "sdnse_ipv6_server", "0", "value=0"); %>>
- ><#checkbox_Yes#>
- ><#checkbox_No#>
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
|
跳过双栈优选 | +|
<#SmartDNS32#> |
@@ -689,7 +731,7 @@ function showMRULESList(){
|
跳过cache | +|
<#SmartDNS33#> |
@@ -702,15 +744,13 @@ function showMRULESList(){
|
启用: | -+ |
---|---|
启用: | +
<% nvram_match_x("", "sdnss_enable_x_0", "0", "value=0"); %>>
@@ -721,100 +761,79 @@ function showMRULESList(){
><#checkbox_No#>
|
-
上游名称: | -+ |
上游名称: | +" onKeyPress="return is_string(this,event);"/> | -
上游地址: | -+ |
上游地址: | +" onKeyPress="return is_string(this,event);"/> | -
上游服务器端口: | -+ |
上游端口: | +- |
上游类型 | -
- |
上游类型: | +
+ |
-
IP过滤 | -
- |
IP过滤: | +
+ |
-
指定服务器组可用于单独解析gfwlist,如果不需要配合SS解析gfwlist,可以不填 | |
服务器组(留空为不指定): | -+ |
指定服务器组可用于单独解析gfwlist,如果不需要配合SS解析gfwlist,可以不填 | |
服务器组(留空为不指定): | +
" />
+ 例如: oversea, office, home
|
-
加入ipset(解析gfwlist要用): | -- " />注意IP直接填,如果是域名:例如https://ndns.233py.com/dns-query 只填写ndns.233py.com就可以了. + |
加入ipset(解析gfwlist要用): | +
+ " />
+ 注意IP直接填,如果是域名
+ 例如:https://dns.google/dns-query
|
-
将服务器从默认组中排除 | -
- |
将服务器从默认分组中排除: | +
+ |
-
- 启用 - | -- 名称 - | -- 地址 - | -- 端口 - | -- 协议 - | -- 过滤 - | -
- |
+ 启用 | +名称 | +地址 | +端口 | +协议 | +过滤 | +|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -852,13 +871,62 @@ function showMRULESList(){ | |||||||||||||
自定义设置:
-
+
|
|||||||||||||
生成coredump - | +|||||||||||||
广告过滤 | +
+
+
+
+ <% nvram_match_x("", "sdns_adblock", "0", "value=0"); %>>
+
+
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
+
+ |
+ ||||||||||||
过滤文件地址: | ++ " /> + | +||||||||||||
加载ChnrouteIP为白名单 | +
+
+
+
+ <% nvram_match_x("", "sdns_white", "0", "value=0"); %>>
+
+
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
+
+ 此项可配合科学上网来实现大陆IP才走国内DNS
+ 需在上游服务器国内组中开启白名单过滤[-whitelist-ip]
+ |
+ ||||||||||||
加载ChnrouteIP为黑名单 | +
+
+
+
+ <% nvram_match_x("", "sdns_black", "0", "value=0"); %>>
+
+
+ ><#checkbox_Yes#>
+ ><#checkbox_No#>
+
+ 此项可配合科学上网来实现大陆IP禁止走国外DNS
+ 需在上游服务器国外组中开启黑名单过滤[-blacklist-ip]
+ |
+ ||||||||||||
生成coredump |
@@ -870,11 +938,10 @@ function showMRULESList(){
><#checkbox_No#>
|
-
|