luci-app-unblockneteasemusic-mini: bump to 1.2-3
This commit is contained in:
parent
df808e51f9
commit
f40f5ca862
@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-unblockneteasemusic-mini
|
||||
PKG_VERSION:=1.2
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
LUCI_TITLE:=LuCI support for UnblockNeteaseMusic(-Go)
|
||||
LUCI_DEPENDS:=+busybox +dnsmasq-full +ipset +iptables +wget
|
||||
LUCI_DEPENDS:=+busybox +dnsmasq-full +ipset +iptables +wget-ssl
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_MAINTAINER:=[CTCGFW]Project-OpenWrt
|
||||
|
||||
@ -23,6 +23,6 @@ select_server.default = "tencent_shanghai_nodejs"
|
||||
select_server.rmempty = false
|
||||
|
||||
download_certificate=s:option(DummyValue,"opennewwindow",translate("<input type=\"button\" class=\"cbi-button cbi-button-apply\" value=\"下载CA根证书\" onclick=\"window.open('https://raw.githubusercontent.com/nondanee/UnblockNeteaseMusic/master/ca.crt')\" />"))
|
||||
download_certificate.description = translate("Linux/iOS/iPad/MacOSX设备在信任根证书后方可正常使用解锁功能。")
|
||||
download_certificate.description = translate("Linux/iOS/MacOSX设备在信任根证书后方可正常使用解锁功能。")
|
||||
|
||||
return mp
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = ifup ] || exit 0
|
||||
[ "$INTERFACE" = "wan" ] || exit 0
|
||||
|
||||
ipset -! -N "neteasemusic" hash:ip
|
||||
sleep 10
|
||||
wget-ssl -t 5 -T 10 "http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com" -O- |grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' |sort |uniq |awk '{print "ipset add neteasemusic "$1}' |sh
|
||||
@ -38,7 +38,7 @@ ipset=/clientlog3.music.163.com/neteasemusic
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
|
||||
if ! ipset list "neteasemusic" >/dev/null; then ipset create "neteasemusic" hash:ip; fi
|
||||
wget -O- "http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com" |grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' |sort |uniq |awk '{print "ipset add neteasemusic "$1}' |sh
|
||||
wget-ssl -t 5 -T 10 "http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com" |grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' |sort |uniq |awk '{print "ipset add neteasemusic "$1}' |sh
|
||||
iptables -t nat -N "unblock_netease_music"
|
||||
iptables -t nat -A "unblock_netease_music" -d 0.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A "unblock_netease_music" -d 10.0.0.0/8 -j RETURN
|
||||
@ -50,12 +50,16 @@ ipset=/clientlog3.music.163.com/neteasemusic
|
||||
iptables -t nat -A "unblock_netease_music" -d 240.0.0.0/4 -j RETURN
|
||||
iptables -t nat -A "unblock_netease_music" -p tcp --dport 80 -j DNAT --to ${unblock_server_ip}:${unblock_server_http_port}
|
||||
iptables -t nat -A "unblock_netease_music" -p tcp --dport 443 -j DNAT --to ${unblock_server_ip}:${unblock_server_https_port}
|
||||
iptables -t nat -I PREROUTING -p tcp -m set --match-set "neteasemusic" dst -j "unblock_netease_music"
|
||||
[ -z "$(iptables -t nat -L "ADBYBY" | grep "UnblockMusic" | sed 's/\/.*//')" ] && iptables -t nat -I "ADBYBY" -m set --match-set "neteasemusic" dst -j RETURN -m comment --comment "AD for UnblockMusic"
|
||||
[ -z "$(iptables -t nat -L "KOOLPROXY" | grep "UnblockMusic" | sed 's/\/.*//')" ] && iptables -t nat -I "KOOLPROXY" -m set --match-set "neteasemusic" dst -j RETURN -m comment --comment "KP for UnblockMusic"
|
||||
iptables -t nat -I "PREROUTING" -p tcp -m set --match-set "neteasemusic" dst -j "unblock_netease_music"
|
||||
|
||||
mkdir -p /var/etc
|
||||
echo -e "/etc/init.d/luci-app-unblockneteasemusic-mini restart" > "/var/etc/unblockneteasemusic-mini.include"
|
||||
elif [ "${set_type}" = "stop" ]; then
|
||||
iptables -t nat -D PREROUTING -p tcp -m set --match-set "neteasemusic" dst -j "unblock_netease_music"
|
||||
iptables -t nat -D "ADBYBY" -m set --match-set "neteasemusic" dst -j RETURN -m comment --comment "AD for UnblockMusic"
|
||||
iptables -t nat -D "KOOLPROXY" -m set --match-set "neteasemusic" dst -j RETURN -m comment --comment "KP for UnblockMusic"
|
||||
iptables -t nat -D "PREROUTING" -p tcp -m set --match-set "neteasemusic" dst -j "unblock_netease_music"
|
||||
iptables -t nat -F "unblock_netease_music"
|
||||
iptables -t nat -X "unblock_netease_music"
|
||||
ipset destroy "neteasemusic"
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sleep 10
|
||||
wget -O- "http://httpdns.n.netease.com/httpdns/v2/d?domain=music.163.com,interface.music.163.com,interface3.music.163.com,apm.music.163.com,apm3.music.163.com,clientlog.music.163.com,clientlog3.music.163.com" |grep -Eo '[0-9]+?\.[0-9]+?\.[0-9]+?\.[0-9]+?' |sort |uniq |awk '{print "ipset add neteasemusic "$1}' |sh
|
||||
Loading…
Reference in New Issue
Block a user