luci-app-unblockneteasemusic-mini: bump to 1.2-9

This commit is contained in:
CN_SZTL 2020-10-01 22:08:55 +08:00
parent 93f90dcfcb
commit b06946e984
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 16 additions and 21 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-unblockneteasemusic-mini
PKG_VERSION:=1.2
PKG_RELEASE:=8
PKG_RELEASE:=9
LUCI_TITLE:=LuCI support for UnblockNeteaseMusic(-Go)
LUCI_DEPENDS:=+busybox +dnsmasq-full +ipset +iptables +wget
LUCI_PKGARCH:=all

View File

@ -17,8 +17,7 @@ enable.rmempty = false
select_server = s:option(ListValue, "select_server", translate("服务器位置"))
select_server:value("tencent_shanghai_nodejs", translate("[CTCGFW] 腾讯云上海(高音质)"))
select_server:value("aliyun_beijing_nodejs", translate("[hyird] 阿里云北京(高音质)"))
select_server:value("aliyun_beijing_nodejs_2", translate("[Sunsky] 阿里云北京(高音质)"))
select_server:value("ucloud_guangzhou_nodejs", translate("[CTCGFW] UCloud广州高音质"))
select_server.description = translate("请合理使用本插件与各个服务器,请勿滥用")
select_server.default = "tencent_shanghai_nodejs"
select_server.rmempty = false

View File

@ -5,25 +5,22 @@
START=92
STOP=10
enable="$(uci get unblockneteasemusic-mini.@unblockneteasemusic-mini[0].enable)"
select_server="$(uci get unblockneteasemusic-mini.@unblockneteasemusic-mini[0].select_server)"
if [ "${select_server}" = "tencent_shanghai_nodejs" ]; then
unblock_server_ip="$(ping "cdn-shanghai.service.project-openwrt.eu.org" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')"
[ -z "${unblock_server_ip}" ] && unblock_server_ip="122.51.88.18"
unblock_server_http_port="30000"
unblock_server_https_port="30001"
elif [ "${select_server}" = "ucloud_guangzhou_nodejs" ]; then
unblock_server_ip="$(ping "uc-gz.service.project-openwrt.eu.org" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')"
[ -z "${unblock_server_ip}" ] && unblock_server_ip="106.75.156.183"
unblock_server_http_port="30000"
unblock_server_https_port="30001"
fi
set_ipset(){
select_server="$(uci get unblockneteasemusic-mini.@unblockneteasemusic-mini[0].select_server)"
if [ "${select_server}" = "tencent_shanghai_nodejs" ]; then
unblock_server_ip="$(ping "cdn-shanghai.service.project-openwrt.eu.org" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')"
[ -z "${unblock_server_ip}" ] && unblock_server_ip="122.51.88.18"
unblock_server_http_port="30000"
unblock_server_https_port="30001"
elif [ "${select_server}" = "aliyun_beijing_nodejs" ]; then
unblock_server_ip="$(ping "hyird.xyz" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')"
[ -z "${unblock_server_ip}" ] && unblock_server_ip="182.92.84.98"
unblock_server_http_port="30000"
unblock_server_https_port="30001"
elif [ "${select_server}" = "aliyun_beijing_nodejs_2" ]; then
unblock_server_ip="39.96.56.58"
unblock_server_http_port="30000"
unblock_server_https_port="30001"
fi
if [ "${set_type}" = "start" ]; then
mkdir -p "/tmp/dnsmasq.d"
rm -f "/tmp/dnsmasq.d/dnsmasq-unblockneteasemusic-mini.conf"
@ -75,7 +72,6 @@ start()
{
stop
enable="$(uci get unblockneteasemusic-mini.@unblockneteasemusic-mini[0].enable)"
[ "${enable}" -ne "1" ] && exit 0
set_type="start"
set_ipset >/dev/null 2>&1