kiddin9 4 år sedan
förälder
incheckning
2f07ed7b03

+ 5 - 7
devices/common/diy.sh

@@ -1,8 +1,8 @@
 #!/bin/bash
 #!/bin/bash
 #=================================================
 #=================================================
 echo "src-git custom https://github.com/kiddin9/openwrt-packages.git" >>feeds.conf.default
 echo "src-git custom https://github.com/kiddin9/openwrt-packages.git" >>feeds.conf.default
+sed -i '/	refresh_config();/d' scripts/feeds
 ./scripts/feeds update -a
 ./scripts/feeds update -a
-cd feeds/custom && git pull; cd -
 ./scripts/feeds install -a -p custom
 ./scripts/feeds install -a -p custom
 ./scripts/feeds install -a
 ./scripts/feeds install -a
 sed -i 's/Os/O2/g' include/target.mk
 sed -i 's/Os/O2/g' include/target.mk
@@ -13,7 +13,6 @@ svn co https://github.com/immortalwrt/immortalwrt/branches/master/target/linux/g
 rm -rf target/linux/generic/hack-5.4/220-gc_sections.patch
 rm -rf target/linux/generic/hack-5.4/220-gc_sections.patch
 #svn co https://github.com/immortalwrt/immortalwrt/branches/master/target/linux/generic/hack-5.10 target/linux/generic/hack-5.10
 #svn co https://github.com/immortalwrt/immortalwrt/branches/master/target/linux/generic/hack-5.10 target/linux/generic/hack-5.10
 svn export --force https://github.com/immortalwrt/immortalwrt/branches/openwrt-21.02/package/network/services/ppp package/network/services/ppp
 svn export --force https://github.com/immortalwrt/immortalwrt/branches/openwrt-21.02/package/network/services/ppp package/network/services/ppp
-svn export --force https://github.com/openwrt/openwrt/trunk/package/libs/libnfnetlink package/libs/libnfnetlink
 svn export --force https://github.com/immortalwrt/immortalwrt/branches/master/package/network/services/dnsmasq package/network/services/dnsmasq
 svn export --force https://github.com/immortalwrt/immortalwrt/branches/master/package/network/services/dnsmasq package/network/services/dnsmasq
 sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' package/Makefile
 sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' package/Makefile
 sed -i '$a /etc/sysupgrade.conf' package/base-files/files/lib/upgrade/keep.d/base-files-essential
 sed -i '$a /etc/sysupgrade.conf' package/base-files/files/lib/upgrade/keep.d/base-files-essential
@@ -28,15 +27,14 @@ sed -i 's/max_requests 3/max_requests 20/g' package/network/services/uhttpd/file
 #rm -rf ./feeds/packages/lang/{golang,node}
 #rm -rf ./feeds/packages/lang/{golang,node}
 #svn export https://github.com/immortalwrt/packages/trunk/lang/golang feeds/packages/lang/golang
 #svn export https://github.com/immortalwrt/packages/trunk/lang/golang feeds/packages/lang/golang
 #svn export https://github.com/immortalwrt/packages/trunk/lang/node feeds/packages/lang/node
 #svn export https://github.com/immortalwrt/packages/trunk/lang/node feeds/packages/lang/node
+rm -f package/network/config/firewall/patches/fullconenat.patch
 wget -P package/network/config/firewall/patches/ https://github.com/coolsnowwolf/lede/raw/master/package/network/config/firewall/patches/fullconenat.patch
 wget -P package/network/config/firewall/patches/ https://github.com/coolsnowwolf/lede/raw/master/package/network/config/firewall/patches/fullconenat.patch
-sed -i 's/+python\( \|$\)/+python3/g' package/*/*/*/Makefile
-sed -i 's?../../lang?$(TOPDIR)/feeds/packages/lang?g' package/feeds/custom/*/Makefile
-sed -i 's/PKG_BUILD_DIR:=/PKG_BUILD_DIR?=/g' feeds/luci/luci.mk
+sed -i -e 's/+python\( \|$\)/+python3/g' -e 's?../../lang?$(TOPDIR)/feeds/packages/lang?g' package/feeds/custom/*/Makefile
 sed -i 's?admin/status/channel_analysis??' package/feeds/luci/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
 sed -i 's?admin/status/channel_analysis??' package/feeds/luci/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
 sed -i "s/askfirst/respawn/g" `find package target -name inittab`
 sed -i "s/askfirst/respawn/g" `find package target -name inittab`
 for ipk in $(find package/feeds/custom/* -maxdepth 0); do
 for ipk in $(find package/feeds/custom/* -maxdepth 0); do
-	if [[ ! -d "$ipk/patches" && ! "$(grep "codeload.github.com" $ipk/Makefile)" ]]; then
-		sed -i "s/PKG_SOURCE_VERSION:=[0-9a-z]\{15,\}/PKG_SOURCE_VERSION:=HEAD/g" `find $ipk/ -maxdepth 1 ! -path *tcping* -name "Makefile"`
+	if [[ ! -d "$ipk/patches" ]]; then
+		sed -i "s/PKG_SOURCE_VERSION:=[0-9a-z]\{7,\}/PKG_SOURCE_VERSION:=HEAD/g" `find $ipk/ -maxdepth 1 ! -path *tcping* -name "Makefile"`
 	fi	
 	fi	
 done
 done
 sed -i 's/$(VERSION) &&/$(VERSION) ;/g' include/download.mk
 sed -i 's/$(VERSION) &&/$(VERSION) ;/g' include/download.mk

+ 5 - 37
devices/common/files/etc/AdGuardHome.yaml

@@ -86,44 +86,12 @@ tls:
 filters:
 filters:
 - enabled: true
 - enabled: true
   url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
   url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
-  name: AdGuard Simplified Domain Names filter
-  id: 1
-- enabled: false
-  url: https://adaway.org/hosts.txt
-  name: AdAway
-  id: 2
-- enabled: false
-  url: https://hosts-file.net/ad_servers.txt
-  name: hpHosts - Ad and Tracking servers only
-  id: 3
-- enabled: false
-  url: https://www.malwaredomainlist.com/hostslist/hosts.txt
-  name: MalwareDomainList.com Hosts List
-  id: 4
-- enabled: false
-  url: https://raw.githubusercontent.com/vokins/yhosts/master/data/tvbox.txt
-  name: tvbox
-  id: 1575018007
-- enabled: false
-  url: https://hosts.nfz.moe/full/hosts
-  name: neoHosts full
-  id: 1575618240
-- enabled: false
-  url: https://hosts.nfz.moe/basic/hosts
-  name: neoHosts basic
-  id: 1575618241
-- enabled: false
-  url: http://sbc.io/hosts/hosts
-  name: StevenBlack host basic
-  id: 1575618242
-- enabled: false
-  url: http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts
-  name: StevenBlack host+fakenews + gambling + porn + social
-  id: 1575618243
+  name: AdGuard DNS filter
+  id: 1628750870
 - enabled: true
 - enabled: true
-  url: https://cdn.jsdelivr.net/gh/privacy-protection-tools/anti-AD/anti-ad-easylist.txt
-  name: anti-AD(Adblock+neohosts+yhosts+cjxlist+adhlist)
-  id: 1577113202
+  url: https://anti-ad.net/easylist.txt
+  name: 'CHN: anti-AD'
+  id: 1628750871
 whitelist_filters: []
 whitelist_filters: []
 user_rules:
 user_rules:
 - '@@||edge.activity.windows.com^'
 - '@@||edge.activity.windows.com^'

+ 3 - 3
devices/common/patches/opkginstall.patch

@@ -5,7 +5,7 @@
  			    inst  = packages.installed.pkgs[name];
  			    inst  = packages.installed.pkgs[name];
  
  
 -			if (!inst || !inst.installed)
 -			if (!inst || !inst.installed)
-+			if (!inst || !inst.installed || pkg.name.includes('luci-app-opkg') || (!pkg.name.includes('luci-app') && !pkg.name.includes('luci-theme') && !pkg.name.includes('default-settings')))
++			if (!inst || !inst.installed || pkg.name.includes('luci-app-opkg') || pkg.name.includes('base-files') || pkg.name.includes('busybox') || pkg.name.includes('dnsmasq-full') || pkg.name.includes('firewall') || pkg.name.includes('miniupnpd') || pkg.name.includes('luci-mod-network') || pkg.name.includes('luci-mod-status') || pkg.name.includes('luci-mod-system'))
  				continue;
  				continue;
  
  
  			if (!avail || compareVersion(avail.version, pkg.version) <= 0)
  			if (!avail || compareVersion(avail.version, pkg.version) <= 0)
@@ -21,7 +21,7 @@
  			}, _('Remove…'));
  			}, _('Remove…'));
  		}
  		}
  		else {
  		else {
-+			if (pkg.name.includes('kmod') || pkg.name.includes('luci-i18n'))
++			if (pkg.name.includes('luci-i18n'))
 +			   continue;
 +			   continue;
 +
 +
  			var inst = packages.installed.pkgs[name];
  			var inst = packages.installed.pkgs[name];
@@ -124,7 +124,7 @@
  
  
  			if flock -x 200; then
  			if flock -x 200; then
  				$opkg $action "$@" </dev/null >/tmp/opkg.out 2>/tmp/opkg.err
  				$opkg $action "$@" </dev/null >/tmp/opkg.out 2>/tmp/opkg.err
-+				if [[ $@ == luci-app-* ]]; then
++				if [[ $@ == luci-app-* && "$(opkg list-installed | grep luci-i18n-"$(echo $@ | cut -d - -f 3-4)"-zh-cn)"]]; then
 +					$opkg $action luci-i18n-"$(echo $@ | cut -d - -f 3-4)"-zh-cn </dev/null >>/tmp/opkg.out 2>/dev/null
 +					$opkg $action luci-i18n-"$(echo $@ | cut -d - -f 3-4)"-zh-cn </dev/null >>/tmp/opkg.out 2>/dev/null
 +				fi
 +				fi
 +				sed -i "/resolve_conffiles/d" /tmp/opkg.err || true
 +				sed -i "/resolve_conffiles/d" /tmp/opkg.err || true

+ 0 - 0
devices/nanopi-r4s/patches/lan_wan.txt → devices/nanopi-r4s/patches/lan_wan.patch