mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	update 2022-09-10 20:17:14
This commit is contained in:
		| @ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk | ||||
|  | ||||
| PKG_NAME:=luci-app-dnsfilter | ||||
| PKG_VERSION:=1.0 | ||||
| PKG_RELEASE:=13 | ||||
| PKG_RELEASE:=14 | ||||
|  | ||||
| PKG_LICENSE:=GPLv2 | ||||
| PKG_MAINTAINER:=small_5 kiddin9 | ||||
|  | ||||
| @ -8,7 +8,7 @@ touch $LOCK | ||||
| B=/tmp/dnsfilter | ||||
| C=/tmp/adupdate.log | ||||
| D="date +'%Y-%m-%d %H:%M:%S'" | ||||
| E="curl -Lfso" | ||||
| E="curl -kLfso" | ||||
| G="Download Subscribe Rules" | ||||
|  | ||||
| if [ "$2" = 1 ];then | ||||
|  | ||||
| @ -30,7 +30,7 @@ down(){ | ||||
| 	mkdir -p $G $P | ||||
| 	for i in $U;do | ||||
| 		X=1 | ||||
| 		while ! curl --connect-timeout 5 -m 20 -Lfso $F $i;do | ||||
| 		while ! curl --connect-timeout 6 --retry 2 -m 60 -kLfso $F $i;do | ||||
| 			[ $X -ge 20 ] && echo "`eval $E` [Download $i Failed]" && continue 2 || let X++ | ||||
| 			sleep 2 | ||||
| 		done | ||||
|  | ||||
| @ -2,9 +2,22 @@ | ||||
| 	"luci-app-dnsfilter": { | ||||
| 		"description": "Grant UCI access for luci-app-dnsfilter", | ||||
| 		"read": { | ||||
| 			"file": { | ||||
| 				"/etc/init.d/dnsfilter": [ "exec" ], | ||||
| 				"/usr/share/dnsfilter/addown": [ "exec" ], | ||||
| 				"/usr/share/dnsfilter/dnsfilter": [ "exec" ], | ||||
| 				"/tmp/dnsfilter/rules.conf": [ "read" ] | ||||
|             }, | ||||
| 			"uci": [ "dnsfilter" ] | ||||
| 		}, | ||||
| 		"write": { | ||||
| 			"file": { | ||||
| 				"/etc/dnsfilter/black.list": [ "write" ], | ||||
| 				"/etc/dnsfilter/ip.list": [ "write" ], | ||||
| 				"/etc/dnsfilter/white.list": [ "write" ], | ||||
| 				"/etc/dnsfilter/rules/rules.conf": [ "write" ], | ||||
| 				"/etc/dnsfilter/url": [ "write" ] | ||||
| 			}, | ||||
| 			"uci": [ "dnsfilter" ] | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| @ -107,7 +107,7 @@ function import_ssr_url(btn, urlname, sid) { | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = url.hostname; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = url.port || "80"; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.hysteria_protocol')[0].value = params.get("protocol") || "udp"; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.auth_type')[0].value = params.get("auth") ? "1" : "0"; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.auth_type')[0].value = params.get("auth") ? "2" : "0"; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.auth_type')[0].dispatchEvent(event); | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.auth_payload')[0].value = params.get("auth") || ""; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.uplink_capacity')[0].value = params.get("upmbps") || ""; | ||||
| @ -115,7 +115,7 @@ function import_ssr_url(btn, urlname, sid) { | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.seed')[0].value = params.get("obfsParam") || ""; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = params.get("peer") || ""; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_tls_alpn')[0].value = params.get("alpn") || ""; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = (params.get("insecure") === "1"); | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = params.get("insecure") ? true : false; | ||||
| 			document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = url.hash ? decodeURIComponent(url.hash.slice(1)) : ""; | ||||
|  | ||||
| 			s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>"; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png) github-actions[bot]
					github-actions[bot]