Skip to content

Commit

Permalink
luci-app-unblockneteasemusic-mini: refresh servers (coolsnowwolf#3554)
Browse files Browse the repository at this point in the history
  • Loading branch information
1715173329 authored Mar 4, 2020
1 parent ab0afb7 commit 2c22779
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package/lean/luci-app-unblockneteasemusic-mini/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-unblockneteasemusic-mini
PKG_VERSION:=1.2
PKG_RELEASE:=6
PKG_RELEASE:=7
LUCI_TITLE:=LuCI support for UnblockNeteaseMusic(Mini)
LUCI_DEPENDS:=+dnsmasq-full +ipset +iptables +wget
LUCI_PKGARCH:=all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- https://github.com/project-openwrt

mp = Map("unblockneteasemusic-mini", translate("解除网易云音乐播放限制 (Mini)"))
mp.description = translate("原理:采用 [QQ/酷狗/酷我/咕咪] 等音源,替换网易云音乐 无版权/收费 歌曲链接<br/>由 [CTCGFW]Project-OpenWrt & hyird 提供服务器支持<br/>详细说明参见:https://github.com/project-openwrt/luci-app-unblockneteasemusic-mini")
mp.description = translate("原理:采用 [QQ/酷狗/酷我/咕咪] 等音源,替换网易云音乐 无版权/收费 歌曲链接<br/>由 [CTCGFW]Project-OpenWrt & hyird & Sunsky 提供服务器支持<br/>详细说明参见:https://github.com/project-openwrt/luci-app-unblockneteasemusic-mini")

mp:section(SimpleSection).template = "unblockneteasemusic-mini/unblockneteasemusic_mini_status"

Expand All @@ -15,12 +15,12 @@ enable.description = translate("启用本插件以解除网易云音乐播放限
enable.default = 0
enable.rmempty = false

select_server = s:option(ListValue, "select_server", translate("服务端类型"))
select_server:value("tencent_shanghai_golang", translate("腾讯云上海 Golang 版本(低音质"))
select_server:value("tencent_shanghai_nodejs", translate("腾讯云上海 Node.js 版本(高音质)"))
select_server:value("aliyun_beijing_nodejs", translate("阿里云北京 Node.js 版本(高音质)"))
select_server:value("mobile_henan_nodejs",translate("移动河南 Node.js 版本(无损音质)"))
select_server.description = translate("Node.js版使用QQ、酷我、咪咕音源,Golang版使用酷狗、酷我、咪咕音源")
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("mobile_henan_nodejs",translate("[CTCGFW] 移动河南(无损音质)"))
select_server.description = translate("请合理使用本插件与各个服务器,请勿滥用")
select_server.default = "tencent_shanghai_nodejs"
select_server.rmempty = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,24 @@ 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_addr="cdn-shanghai.service.project-openwrt.eu.org"
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_addr="hyird.xyz"
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"
elif [ "${select_server}" = "mobile_henan_nodejs" ]; then
unblock_server_addr="cdn-henan.service.project-openwrt.eu.org"
unblock_server_ip="$(ping "cdn-henan.service.project-openwrt.eu.org" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')"
[ -z "${unblock_server_ip}" ] && exit 1
unblock_server_http_port="33221"
unblock_server_https_port="33222"
elif [ "${select_server}" = "tencent_shanghai_golang" ]; then
unblock_server_addr="cdn-shanghai.service.project-openwrt.eu.org"
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="30002"
unblock_server_https_port="30003"
fi

set_ipset(){
Expand Down

0 comments on commit 2c22779

Please sign in to comment.