garypang13 5 vuotta sitten
vanhempi
sitoutus
0aaa870960

+ 2 - 1
devices/XY-C5/.config

@@ -22,7 +22,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -291,6 +291,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_autosamba=y
 CONFIG_PACKAGE_autosamba=y

+ 11 - 0
devices/common/default-settings

@@ -21,9 +21,18 @@ rm -rf /tmp/luci-*
 sed -i '/S99opkg/d' /etc/crontabs/root
 sed -i '/S99opkg/d' /etc/crontabs/root
 echo "0 0 */3 * * sh /etc/rc.d/S99opkg >/dev/null 2>&1" >> /etc/crontabs/root
 echo "0 0 */3 * * sh /etc/rc.d/S99opkg >/dev/null 2>&1" >> /etc/crontabs/root
 
 
+grep -q adblock /etc/crontabs/root ||
+	echo "00 00 * * * /etc/init.d/adblock reload" >> /etc/crontabs/root
+
 uci set system.@rngd[0].enabled="1"
 uci set system.@rngd[0].enabled="1"
 uci commit system
 uci commit system
 
 
+sed -i '/REDIRECT --to-ports 53/d' /etc/firewall.user
+echo "iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
+echo "iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
+echo "ip6tables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
+echo "ip6tables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
+
 if [ ! -f /etc/config/placeholder ]; then
 if [ ! -f /etc/config/placeholder ]; then
 
 
 	if [ $(uci get network.wan.ipv6) == 0 ]; then
 	if [ $(uci get network.wan.ipv6) == 0 ]; then
@@ -49,6 +58,8 @@ if [ ! -f /etc/config/placeholder ]; then
   uci set network.wan.proto=pppoe
   uci set network.wan.proto=pppoe
   uci commit network
   uci commit network
 
 
+  uci set shadowsocksr.@global[0].tunnel_forward='1.1.1.1:53'
+
   uci add_list shadowsocksr.@access_control[0].wan_fw_ips='1.1.1.1'
   uci add_list shadowsocksr.@access_control[0].wan_fw_ips='1.1.1.1'
   uci add_list shadowsocksr.@access_control[0].wan_fw_ips='1.0.0.1'
   uci add_list shadowsocksr.@access_control[0].wan_fw_ips='1.0.0.1'
   uci add_list shadowsocksr.@access_control[0].wan_fw_ips='8.8.8.8'
   uci add_list shadowsocksr.@access_control[0].wan_fw_ips='8.8.8.8'

+ 6 - 0
devices/common/diy/feeds/custom/default-settings/po/zh_Hans/other_zh.po

@@ -66,3 +66,9 @@ msgstr "数据包引导"
 
 
 msgid "Enable packet steering across all CPUs. May help or hinder network speed."
 msgid "Enable packet steering across all CPUs. May help or hinder network speed."
 msgstr "启用所有CPU的数据包控制。 可能有助于或阻碍网络速度。"
 msgstr "启用所有CPU的数据包控制。 可能有助于或阻碍网络速度。"
+
+msgid "Block Ads"
+msgstr "广告过滤"
+
+msgid "Block Ads with anti-AD"
+msgstr "启用anti-AD规则过滤广告"

BIN
devices/common/files/etc/adblock/adblock.sources.gz


+ 0 - 1
devices/common/files/etc/config/AdGuardHome

@@ -13,5 +13,4 @@ config AdGuardHome 'AdGuardHome'
 	option waitonboot '0'
 	option waitonboot '0'
 	option upprotect '$configpath $workdir/data/sessions.db $workdir/data/stats.db'
 	option upprotect '$configpath $workdir/data/sessions.db $workdir/data/stats.db'
 	option enabled '1'
 	option enabled '1'
-	option redirect 'dnsmasq-upstream'
 	option ucitracktest '1'
 	option ucitracktest '1'

+ 23 - 0
devices/common/files/etc/config/adblock

@@ -0,0 +1,23 @@
+
+config adblock 'global'
+	option adb_debug '0'
+	option adb_safesearch '0'
+	option adb_dnsfilereset '0'
+	option adb_mail '0'
+	option adb_backup '1'
+	option adb_maxqueue '4'
+	option adb_dns 'dnsmasq'
+	option adb_report '1'
+	option adb_enabled '1'
+	option adb_repiface 'br-lan'
+	option adb_forcedns '0'
+	option adb_dnsflush '1'
+	list adb_sources 'adaway'
+	list adb_sources 'adguard'
+	list adb_sources 'android_tracking'
+	list adb_sources 'anti_ad'
+	list adb_sources 'disconnect'
+	list adb_sources 'youtube'
+	list adb_sources 'yoyo'
+	option adb_fetchutil 'wget'
+

+ 52 - 14
devices/common/files/etc/config/smartdns

@@ -1,36 +1,68 @@
 
 
 config smartdns
 config smartdns
-	option seconddns_port '7053'
 	option seconddns_tcp_server '1'
 	option seconddns_tcp_server '1'
-	option seconddns_no_speed_check '0'
 	option seconddns_no_rule_addr '0'
 	option seconddns_no_rule_addr '0'
 	option seconddns_no_rule_nameserver '0'
 	option seconddns_no_rule_nameserver '0'
 	option seconddns_no_rule_ipset '0'
 	option seconddns_no_rule_ipset '0'
-	option seconddns_no_rule_soa '0'
-	option seconddns_no_dualstack_selection '0'
 	option seconddns_no_cache '0'
 	option seconddns_no_cache '0'
 	option rr_ttl_max '86400'
 	option rr_ttl_max '86400'
-	option port '5335'
-	option force_aaaa_soa '0'
-	option serve_expired '1'
 	option tcp_server '1'
 	option tcp_server '1'
-	option prefetch_domain '1'
 	option coredump '1'
 	option coredump '1'
+	option cache_size '50480'
 	option server_name 'smartdns'
 	option server_name 'smartdns'
-	option cache_size '1024'
-	option rr_ttl_min '3600'
+	option seconddns_no_speed_check '1'
+	option ipv6_server '0'
+	option prefetch_domain '1'
 	option enabled '1'
 	option enabled '1'
-	option redirect 'none'
-	list old_redirect 'none'
+	option serve_expired '1'
+	option dualstack_ip_selection '0'
+	option redirect 'dnsmasq-upstream'
+	option rr_ttl_min '1800'
+	option anti_ad '0'
+	option seconddns_enabled '0'
+	option seconddns_port '5335'
+	option seconddns_server_group 'oversea'
+	option seconddns_no_rule_soa '1'
+	option seconddns_no_dualstack_selection '1'
+	option force_aaaa_soa '1'
+	option port '5555'
+	list old_redirect 'dnsmasq-upstream'
 	list old_port '5555'
 	list old_port '5555'
 	list old_enabled '1'
 	list old_enabled '1'
 
 
+config server
+	option name '腾讯'
+	option type 'https'
+	option ip 'https://doh.pub/dns-query'
+	option blacklist_ip '1'
+	option addition_arg ' -check-edns'
+	option enabled '1'
+
+config server
+	option name '阿里'
+	option type 'https'
+	option ip 'https://dns.alidns.com/dns-query'
+	option blacklist_ip '1'
+	option addition_arg ' -check-edns'
+	option enabled '1'
+
+config server
+	option name '114'
+	option type 'tcp'
+	option ip '114.114.114.114'
+	option blacklist_ip '1'
+	option addition_arg ' -check-edns'
+	option enabled '1'
+
 config server
 config server
 	option name 'Cloudflare'
 	option name 'Cloudflare'
 	option ip 'https://cloudflare-dns.com/dns-query'
 	option ip 'https://cloudflare-dns.com/dns-query'
 	option type 'https'
 	option type 'https'
 	option addition_arg ' -check-edns'
 	option addition_arg ' -check-edns'
 	option enabled '1'
 	option enabled '1'
+	option server_group 'oversea'
+	option blacklist_ip '0'
+	option no_check_certificate '0'
 
 
 config server
 config server
 	option name 'google'
 	option name 'google'
@@ -38,10 +70,16 @@ config server
 	option type 'https'
 	option type 'https'
 	option addition_arg ' -check-edns'
 	option addition_arg ' -check-edns'
 	option enabled '1'
 	option enabled '1'
+	option server_group 'oversea'
+	option blacklist_ip '0'
+	option no_check_certificate '0'
 
 
 config server
 config server
 	option name 'IBM'
 	option name 'IBM'
-	option ip 'https://dns.quad9.net/dns-query'
 	option type 'https'
 	option type 'https'
 	option addition_arg ' -check-edns'
 	option addition_arg ' -check-edns'
-	option enabled '1'
+	option ip 'https://dns11.quad9.net/dns-query'
+	option blacklist_ip '0'
+	option no_check_certificate '0'
+	option server_group 'oversea'
+	option enabled '1'

+ 2 - 1
devices/hiwifi-hc5962/.config

@@ -22,7 +22,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -291,6 +291,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_autosamba=y
 CONFIG_PACKAGE_autosamba=y

+ 1 - 1
devices/k2p-32m-usb/.config

@@ -22,7 +22,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y

+ 3 - 0
devices/k2p-32m-usb/default-settings

@@ -6,6 +6,9 @@
 
 
 touch /etc/config/placeholder
 touch /etc/config/placeholder
 
 
+uci set adblock.global.adb_report='0'
+uci commit adblock
+
 sed -i '$a src/gz openwrt_custom https://op.supes.top/packages/mipsel' /etc/opkg/customfeeds.conf
 sed -i '$a src/gz openwrt_custom https://op.supes.top/packages/mipsel' /etc/opkg/customfeeds.conf
 
 
 uci set uhttpd.main.rfc1918_filter=0
 uci set uhttpd.main.rfc1918_filter=0

+ 2 - 1
devices/nanopi-r2s/.config

@@ -32,7 +32,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -302,6 +302,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_autosamba=y
 CONFIG_PACKAGE_autosamba=y

+ 2 - 1
devices/newifi-d2/.config

@@ -22,7 +22,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -290,6 +290,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_autosamba=y
 CONFIG_PACKAGE_autosamba=y

+ 2 - 1
devices/phicomm-N1/.config

@@ -24,7 +24,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -294,6 +294,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_autosamba=y
 CONFIG_PACKAGE_autosamba=y

+ 2 - 1
devices/phicomm-k2p/.config

@@ -16,7 +16,7 @@ CONFIG_IPV6=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -278,6 +278,7 @@ CONFIG_PACKAGE_curl=n
 CONFIG_PACKAGE_htop=n
 CONFIG_PACKAGE_htop=n
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=n
 CONFIG_PACKAGE_automount=n
 CONFIG_PACKAGE_autosamba=n
 CONFIG_PACKAGE_autosamba=n

+ 3 - 0
devices/phicomm-k2p/default-settings

@@ -5,6 +5,9 @@
 
 
 touch /etc/config/placeholder
 touch /etc/config/placeholder
 
 
+uci set adblock.global.adb_report='0'
+uci commit adblock
+
 sed -i '$a src/gz openwrt_custom https://op.supes.top/packages/mipsel' /etc/opkg/customfeeds.conf
 sed -i '$a src/gz openwrt_custom https://op.supes.top/packages/mipsel' /etc/opkg/customfeeds.conf
 
 
 uci set uhttpd.main.rfc1918_filter=0
 uci set uhttpd.main.rfc1918_filter=0

+ 2 - 1
devices/redmi-ac2100/.config

@@ -16,7 +16,7 @@ CONFIG_IPV6=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -281,6 +281,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=n
 CONFIG_PACKAGE_automount=n
 CONFIG_PACKAGE_autosamba=n
 CONFIG_PACKAGE_autosamba=n

+ 2 - 1
devices/x86_64/.config

@@ -36,7 +36,7 @@ CONFIG_PACKAGE_kmod-usb-printer=y
 # Applications
 # Applications
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-accesscontrol=n
 CONFIG_PACKAGE_luci-app-acme=n
 CONFIG_PACKAGE_luci-app-acme=n
-CONFIG_PACKAGE_luci-app-adblock=n
+CONFIG_PACKAGE_luci-app-adblock=y
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adbyby-plus=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-adguardhome=n
 CONFIG_PACKAGE_luci-app-advanced=y
 CONFIG_PACKAGE_luci-app-advanced=y
@@ -305,6 +305,7 @@ CONFIG_PACKAGE_curl=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_httping=y
 CONFIG_PACKAGE_tcping=n
 CONFIG_PACKAGE_tcping=n
+CONFIG_PACKAGE_tcpdump-mini=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_autocore=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_automount=y
 CONFIG_PACKAGE_autosamba=y
 CONFIG_PACKAGE_autosamba=y