luci-app-unblockneteasemusic-go: sync with upstream source

This commit is contained in:
CN_SZTL 2020-08-22 19:53:05 +08:00
parent 47d347ea09
commit dbe082b6a9
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 16 additions and 6 deletions

View File

@ -5,7 +5,7 @@ LUCI_TITLE:=LuCI support for UnblockNeteaseMusic Go
LUCI_DEPENDS:=+bash +busybox +coreutils-nohup +curl +dnsmasq-full +openssl-util +ipset +UnblockNeteaseMusic-Go
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-unblockneteasemusic-go
PKG_VERSION:=1.6
PKG_VERSION:=1.8
PKG_RELEASE:=1
PKG_MAINTAINER:=https://github.com/cnsilvan/luci-app-unblockneteasemusic

View File

@ -1,7 +1,7 @@
local http = luci.http
mp = Map("unblockneteasemusic", translate("解除网易云音乐播放限制 (Golang)"))
mp.description = translate("原理:采用 [酷我/酷狗/咕咪] 音源(后续有空补充),替换网易云音乐 灰色 歌曲链接<br/>具体使用方法参见https://github.com/cnsilvan/luci-app-unblockneteasemusic<br/>首次使用会自动生成证书,可能较慢")
mp.description = translate("原理:采用 [酷我/酷狗/咕咪] 音源(后续有空补充),替换网易云音乐 灰色 歌曲链接<br/>具体使用方法参见https://github.com/cnsilvan/luci-app-unblockneteasemusic<br/>提示客户端网易云音乐能用就别升级app最新版本不一定能用")
mp:section(SimpleSection).template = "unblockneteasemusic/unblockneteasemusic_status"
s = mp:section(TypedSection, "unblockneteasemusic")
@ -48,16 +48,22 @@ hijack.description = translate("如果使用Hosts劫持请将HTTP/HTTPS端口
hijack.default = "dont_hijack"
hijack.rmempty = false
daemon_enable = s:option(Flag, "daemon_enable", translate("启用进程守护"))
daemon_enable.description = translate("开启后,附属程序会自动检测主程序运行状态,在主程序退出时自动重启")
daemon_enable.default = 0
daemon_enable.rmempty = false
endpoint_enable = s:option(Flag, "endpoint_enable", translate("启用地址转换"))
endpoint_enable.description = translate("开启后设备需要信任证书经测试ios设备需要开启其他设备无法使用时再开启尝试")
endpoint_enable.description = translate("开启后设备需要信任证书经测试ios设备需要开启android设备使用咪咕源下载时需要开启其他情况无法使用时再开启尝试")
endpoint_enable.default = 0
endpoint_enable.rmempty = false
force_best_quality = s:option(Flag, "force_best_quality", translate("强制音质优先"))
force_best_quality.description = translate("开启后,客户端选择音质将失效")
force_best_quality.default = 0
force_best_quality.rmempty = false
delete = s:option(Button,"_delete", translate("删除根证书"))
delete.description = translate("删除证书,以便下次启动时生成,可用于解决过期证书等问题")
delete.inputstyle = "reload"
@ -65,7 +71,7 @@ delete.write = function()
delete_()
end
download = s:option(Button,"_download", translate("下载根证书"))
download.description = translate("请在客户端信任该证书。该证书由你设备自动生成,安全可靠")
download.description = translate("请在客户端信任该证书。该证书由你设备自动生成,安全可靠<br/>IOS信任证书步骤1. 安装证书--设置-描述文件-安装 2. 通用-关于本机-证书信任设置-启动完全信任")
download.inputstyle = "reload"
download.write = function()
download_()

View File

@ -5,7 +5,7 @@ f = SimpleForm("logview")
t = f:field(TextValue, "conf")
t.rmempty = true
t.rows = 15
t.rows = 20
function t.cfgvalue()
return fs.readfile(conffile) or ""
end

View File

@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common
START=80
START=96
STOP=10
lan_addr="$(uci get network.lan.ipaddr)"
@ -12,6 +12,7 @@ music_source="$(uci get unblockneteasemusic.@unblockneteasemusic[0].music_source
music_customize_source="$(uci get unblockneteasemusic.@unblockneteasemusic[0].music_customize_source)"
hijack_ways="$(uci get unblockneteasemusic.@unblockneteasemusic[0].hijack_ways)"
endpoint="$(uci get unblockneteasemusic.@unblockneteasemusic[0].endpoint_enable)"
force_best_quality="$(uci get unblockneteasemusic.@unblockneteasemusic[0].force_best_quality)"
extFile="/usr/share/UnblockNeteaseMusic/extFile.txt"
serverCrt="/usr/share/UnblockNeteaseMusic/server.crt"
serverKey="/usr/share/UnblockNeteaseMusic/server.key"
@ -135,6 +136,9 @@ start() {
if [ "${endpoint}" = "1" ]; then
exArgs="-e"
fi
if [ "${force_best_quality}" = "1" ]; then
exArgs="${exArgs} -b"
fi
if [ "${music_source}" = "default" ]; then
nohup UnblockNeteaseMusic -p "${http_port}" -sp "${https_port}" -o kuwo -m 0 -c "${serverCrt}" -k "${serverKey}" ${exArgs} >>"${logFile}" 2>&1 &
else