mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
Merge branch 'master' into zh_CN
This commit is contained in:
commit
01fe82a2d9
@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=UnblockNeteaseMusic
|
||||
PKG_VERSION:=0.25.3
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/nondanee/UnblockNeteaseMusic.git
|
||||
PKG_SOURCE_VERSION:=610ff1716aa3698cd2e9391ff808a35a05719586
|
||||
PKG_SOURCE_VERSION:=1193e29a2c8f72c738d2988d5cf5afbb2fee7463
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION).tar.gz
|
||||
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=UnblockNeteaseMusicGo
|
||||
PKG_VERSION:=0.2.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/cnsilvan/UnblockNeteaseMusic.git
|
||||
@ -43,7 +43,7 @@ define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
|
||||
patch -p1 -d $(BUILD_DIR)/$(PKG_NAME) <./patches/01-fix-endpoint.patch
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@ -59,7 +59,6 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/UnblockNeteaseMusic $(1)/usr/bin/UnblockNeteaseMusic
|
||||
$(INSTALL_DIR) $(1)/usr/share/UnblockNeteaseMusicGo
|
||||
$(CP) ./files/* $(1)/usr/share/UnblockNeteaseMusicGo/
|
||||
|
||||
endef
|
||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/processor/processor.go b/processor/processor.go
|
||||
index a35f8df..a7e3015 100644
|
||||
--- a/processor/processor.go
|
||||
+++ b/processor/processor.go
|
||||
@@ -393,7 +393,7 @@
|
||||
//data["url"] = uri.Scheme + "://" + uri.Host + uri.EscapedPath()
|
||||
//data["url"] = uri.String()
|
||||
if *config.EndPoint {
|
||||
- data["url"] = "http://music.163.com/unblockmusic/" + uri.String()
|
||||
+ data["url"] = "https://music.163.com/unblockmusic/" + uri.String()
|
||||
} else {
|
||||
data["url"] = uri.String()
|
||||
}
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=default-settings
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=59
|
||||
PKG_RELEASE:=60
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
|
@ -44,7 +44,7 @@ sed -i '/option disabled/d' /etc/config/wireless
|
||||
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh
|
||||
|
||||
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
|
||||
echo "DISTRIB_REVISION='R20.5.20'" >> /etc/openwrt_release
|
||||
echo "DISTRIB_REVISION='R20.6.18'" >> /etc/openwrt_release
|
||||
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
|
||||
echo "DISTRIB_DESCRIPTION='OpenWrt '" >> /etc/openwrt_release
|
||||
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ipt2socks
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.1.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/zfl9/ipt2socks.git
|
||||
PKG_SOURCE_VERSION:=cfbc2189356aba7fcafb0bc961a95419f313d8a7
|
||||
PKG_SOURCE_VERSION:=384dab4bae5ed9402e07ec1950e502c05812bc26
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
@ -1,49 +0,0 @@
|
||||
--- a/ipt2socks.c
|
||||
+++ b/ipt2socks.c
|
||||
@@ -28,6 +28,36 @@
|
||||
|
||||
#define IPT2SOCKS_VERSION "ipt2socks v1.1.2 <https://github.com/zfl9/ipt2socks>"
|
||||
|
||||
+#ifdef __MUSL__
|
||||
+#include <unistd.h>
|
||||
+#include <sys/syscall.h>
|
||||
+
|
||||
+ssize_t splice(int __fdin, __off64_t *__offin, int __fdout,
|
||||
+ __off64_t *__offout, size_t __len, unsigned int __flags) {
|
||||
+#ifdef __NR_splice
|
||||
+ return syscall(__NR_splice, __fdin, __offin, __fdout, __offout, __len, __flags);
|
||||
+#else
|
||||
+ (void)__fdin;
|
||||
+ (void)__offin;
|
||||
+ (void)__fdout;
|
||||
+ (void)__offout;
|
||||
+ (void)__len;
|
||||
+ (void)__flags;
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+#undef SPLICE_F_MOVE
|
||||
+#undef SPLICE_F_NONBLOCK
|
||||
+#undef SPLICE_F_MORE
|
||||
+
|
||||
+#define SPLICE_F_MOVE 1
|
||||
+#define SPLICE_F_NONBLOCK 2
|
||||
+#define SPLICE_F_MORE 4
|
||||
+
|
||||
+#endif /* __MUSL__ */
|
||||
+
|
||||
enum {
|
||||
OPT_ENABLE_TCP = 0x01 << 0, // enable tcp proxy
|
||||
OPT_ENABLE_UDP = 0x01 << 1, // enable udp proxy
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
CC = gcc
|
||||
-CFLAGS = -std=c99 -Wall -Wextra -O2 -pthread
|
||||
+CFLAGS = -std=c99 -Wall -Wextra -O2 -pthread -D __MUSL__
|
||||
LIBS = -lm
|
||||
SRCS = ipt2socks.c logutils.c lrucache.c netutils.c protocol.c
|
||||
OBJS = $(SRCS:.c=.o)
|
@ -105,6 +105,27 @@ e:depends("type","http")
|
||||
e = t:taboption("other",Value, "host_header_rewrite", translate("Host Header"), translate("The Host header will be rewritten to match the hostname portion of the forwarding address."))
|
||||
e.default = "dev.yourdomain.com"
|
||||
e:depends("enable_host_header_rewrite",1)
|
||||
e=t:taboption("other",Flag,"enable_https_plugin",translate("Use Plugin"))
|
||||
e.default="0"
|
||||
e:depends("type","https")
|
||||
e=t:taboption("other",ListValue,"https_plugin",translate("Choose Plugin"),translate("If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps."))
|
||||
e:value("https2http",translate("https2http"))
|
||||
e:depends("enable_https_plugin",1)
|
||||
e=t:taboption("other",Value,"plugin_local_addr",translate("Plugin_Local_Addr"))
|
||||
e.default="127.0.0.1:80"
|
||||
e:depends("https_plugin","https2http")
|
||||
e=t:taboption("other",Value,"plugin_crt_path",translate("plugin_crt_path"))
|
||||
e.default="./server.crt"
|
||||
e:depends("https_plugin","https2http")
|
||||
e=t:taboption("other",Value,"plugin_key_path",translate("plugin_key_path"))
|
||||
e.default="./server.key"
|
||||
e:depends("https_plugin","https2http")
|
||||
e=t:taboption("other",Value,"plugin_host_header_rewrite",translate("plugin_host_header_rewrite"))
|
||||
e.default="127.0.0.1"
|
||||
e:depends("https_plugin","https2http")
|
||||
e=t:taboption("other",Value,"plugin_header_X_From_Where",translate("plugin_header_X-From-Where"))
|
||||
e.default="frp"
|
||||
e:depends("https_plugin","https2http")
|
||||
e = t:taboption("base",ListValue, "proxy_protocol_version", translate("Proxy-Protocol Version"), translate("Proxy Protocol to send user's real IP to local services."))
|
||||
e.default = "disable"
|
||||
e:value("disable",translate("Disable"))
|
||||
|
@ -252,4 +252,19 @@ msgid "STCP Server Name is Service Remark Name of STCP Server"
|
||||
msgstr "STCP服务器别名"
|
||||
|
||||
msgid "<font color=\"red\">Please ensure the remark name is unique.</font>"
|
||||
msgstr "<font color=\"red\">确保备注名唯一</font>"
|
||||
msgstr "<font color=\"red\">确保备注名唯一</font>"
|
||||
|
||||
msgid "Plugin_Local_Addr"
|
||||
msgstr "插件本地地址(格式 IP:Port)"
|
||||
|
||||
msgid "plugin_crt_path"
|
||||
msgstr "插件证书路径"
|
||||
|
||||
msgid "plugin_key_path"
|
||||
msgstr "插件私钥路径"
|
||||
|
||||
msgid "plugin_host_header_rewrite"
|
||||
msgstr "插件 Host Header 重写"
|
||||
|
||||
msgid "plugin_header_X-From-Where"
|
||||
msgstr "插件X-From-Where请求头"
|
||||
|
@ -32,6 +32,7 @@ conf_proxy_add() {
|
||||
local enable type domain_type custom_domains remote_port local_ip local_port enable_http_auth enable_host_header_rewrite host_header_rewrite
|
||||
local subdomain proxy_protocol_version use_encryption use_compression http_user http_pwd remark locations
|
||||
local enable_plugin plugin plugin_http_user plugin_http_passwd plugin_unix_path stcp_role stcp_secretkey stcp_servername
|
||||
local enable_https_plugin https_plugin plugin_local_addr plugin_crt_path plugin_key_path plugin_host_header_rewrite plugin_header_X_From_Where
|
||||
|
||||
config_get_bool enable "$cfg" enable 1
|
||||
[ "$enable" -gt 0 ] || return 1
|
||||
@ -55,6 +56,12 @@ conf_proxy_add() {
|
||||
config_get stcp_secretkey "$cfg" stcp_secretkey
|
||||
config_get stcp_servername "$cfg" stcp_servername
|
||||
config_get proxy_protocol_version "$cfg" proxy_protocol_version
|
||||
config_get https_plugin "$cfg" https_plugin
|
||||
config_get plugin_local_addr "$cfg" plugin_local_addr
|
||||
config_get plugin_crt_path "$cfg" plugin_crt_path
|
||||
config_get plugin_key_path "$cfg" plugin_key_path
|
||||
config_get plugin_host_header_rewrite "$cfg" plugin_host_header_rewrite
|
||||
config_get plugin_header_X_From_Where "$cfg" plugin_header_X_From_Where
|
||||
|
||||
|
||||
[ -n "$remark" ] && [ -n "$type" ] || return 1
|
||||
@ -99,6 +106,15 @@ conf_proxy_add() {
|
||||
fi
|
||||
}
|
||||
|
||||
[ -n "$https_plugin" ] && echo "plugin=$https_plugin" >>$tmpconf
|
||||
[ -n "$plugin_local_addr" ] && echo "plugin_local_addr=$plugin_local_addr" >>$tmpconf
|
||||
[ -n "$plugin_crt_path" -a -n "$plugin_key_path" ] && {
|
||||
echo "plugin_crt_path=$plugin_crt_path" >>$tmpconf
|
||||
echo "plugin_key_path=$plugin_key_path" >>$tmpconf
|
||||
}
|
||||
[ -n "$plugin_host_header_rewrite" ] && echo "plugin_host_header_rewrite=$plugin_host_header_rewrite" >>$tmpconf
|
||||
[ -n "$plugin_header_X_From_Where" ] && echo "plugin_header_X_From_Where=$plugin_header_X_From_Where" >>$tmpconf
|
||||
|
||||
frp_write_bool use_encryption $cfg 1
|
||||
frp_write_bool use_compression $cfg 1
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI support for KodExplorer
|
||||
LUCI_DEPENDS:=+nginx +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip
|
||||
LUCI_DEPENDS:=+nginx +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=20200210
|
||||
PKG_VERSION:=13
|
||||
PKG_DATE:=20200612
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -8,15 +8,11 @@ function index()
|
||||
if not nixio.fs.access("/etc/config/kodexplorer") then return end
|
||||
|
||||
entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false
|
||||
entry({"admin", "nas", "kodexplorer"}, cbi("kodexplorer/settings"),
|
||||
_("KodExplorer"), 3).dependent = true
|
||||
entry({"admin", "nas", "kodexplorer"}, cbi("kodexplorer/settings"), _("KodExplorer"), 3).dependent = true
|
||||
|
||||
entry({"admin", "nas", "kodexplorer", "check"}, call("action_check")).leaf =
|
||||
true
|
||||
entry({"admin", "nas", "kodexplorer", "download"}, call("action_download")).leaf =
|
||||
true
|
||||
entry({"admin", "nas", "kodexplorer", "status"}, call("act_status")).leaf =
|
||||
true
|
||||
entry({"admin", "nas", "kodexplorer", "check"}, call("action_check")).leaf = true
|
||||
entry({"admin", "nas", "kodexplorer", "download"}, call("action_download")).leaf = true
|
||||
entry({"admin", "nas", "kodexplorer", "status"}, call("act_status")).leaf = true
|
||||
end
|
||||
|
||||
local function http_write_json(content)
|
||||
@ -26,12 +22,8 @@ end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.nginx_status = luci.sys.call(
|
||||
"ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") ==
|
||||
0
|
||||
e.php_status = luci.sys.call(
|
||||
"ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") ==
|
||||
0
|
||||
e.nginx_status = luci.sys.call("ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
e.php_status = luci.sys.call("ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
http_write_json(e)
|
||||
end
|
||||
|
||||
|
@ -7,26 +7,12 @@ local i18n = require "luci.i18n"
|
||||
module("luci.model.cbi.kodexplorer.api", package.seeall)
|
||||
|
||||
local appname = "kodexplorer"
|
||||
local api_url =
|
||||
"https://api.github.com/repos/kalcaddle/KodExplorer/releases/latest"
|
||||
local download_url = "https://github.com/kalcaddle/KodExplorer/archive/"
|
||||
local api_url = "https://api.kodcloud.com/?app/version"
|
||||
|
||||
local wget = "/usr/bin/wget"
|
||||
local wget_args = {
|
||||
"--no-check-certificate", "--quiet", "--timeout=10", "--tries=2"
|
||||
}
|
||||
local wget_args = { "--no-check-certificate", "--quiet", "--timeout=10", "--tries=2" }
|
||||
local command_timeout = 300
|
||||
|
||||
function uci_get_type(type, config, default)
|
||||
value = uci:get(appname, "@" .. type .. "[0]", config) or sys.exec(
|
||||
"echo -n `uci -q get " .. appname .. ".@" .. type .. "[0]." ..
|
||||
config .. "`")
|
||||
if (value == nil or value == "") and (default and default ~= "") then
|
||||
value = default
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
local function _unpack(t, i)
|
||||
i = i or 1
|
||||
if t[i] ~= nil then return t[i], _unpack(t, i + 1) end
|
||||
@ -77,6 +63,15 @@ local function exec(cmd, args, writer, timeout)
|
||||
end
|
||||
end
|
||||
|
||||
function get_project_directory()
|
||||
return uci:get(appname, "@global[0]", "project_directory") or "/tmp/kodcloud"
|
||||
end
|
||||
|
||||
function get_version()
|
||||
local version = get_project_directory() .. "/config/version.php"
|
||||
return sys.exec(string.format("echo -n $(cat %s 2>/dev/null | grep \"'KOD_VERSION'\" | cut -d \"'\" -f 4)", version))
|
||||
end
|
||||
|
||||
local function compare_versions(ver1, comp, ver2)
|
||||
local table = table
|
||||
|
||||
@ -108,42 +103,16 @@ local function get_api_json(url)
|
||||
-- function(chunk) output[#output + 1] = chunk end)
|
||||
-- local json_content = util.trim(table.concat(output))
|
||||
|
||||
local json_content = luci.sys.exec("wget-ssl -q --no-check-certificate -O- " .. url)
|
||||
local json_content = sys.exec(wget .. " --no-check-certificate --timeout=10 -t 1 -O- " .. url)
|
||||
|
||||
if json_content == "" then return {} end
|
||||
|
||||
return jsonc.parse(json_content) or {}
|
||||
end
|
||||
|
||||
function get_project_directory()
|
||||
return uci_get_type("global", "project_directory", "/tmp/kodexplorer")
|
||||
end
|
||||
|
||||
function to_check()
|
||||
local json = get_api_json(api_url)
|
||||
if json.tag_name == nil then
|
||||
return {
|
||||
code = 1,
|
||||
error = i18n.translate("Get remote version info failed.")
|
||||
}
|
||||
end
|
||||
local remote_version = json.tag_name
|
||||
local html_url = json.html_url
|
||||
download_url = download_url .. json.tag_name .. ".tar.gz"
|
||||
if not download_url then
|
||||
return {
|
||||
code = 1,
|
||||
version = remote_version,
|
||||
html_url = html_url,
|
||||
error = i18n.translate(
|
||||
"New version found, but failed to get new version download url.")
|
||||
}
|
||||
end
|
||||
return {
|
||||
code = 0,
|
||||
version = remote_version,
|
||||
url = {html = html_url, download = download_url}
|
||||
}
|
||||
return json
|
||||
end
|
||||
|
||||
function to_download(url)
|
||||
@ -151,13 +120,11 @@ function to_download(url)
|
||||
return {code = 1, error = i18n.translate("Download url is required.")}
|
||||
end
|
||||
|
||||
sys.call("/bin/rm -f /tmp/kodexplorer_download.*")
|
||||
sys.call("/bin/rm -f /tmp/kodcloud_download.*")
|
||||
|
||||
local tmp_file = util.trim(util.exec(
|
||||
"mktemp -u -t kodexplorer_download.XXXXXX"))
|
||||
local tmp_file = util.trim(util.exec("mktemp -u -t kodcloud_download.XXXXXX"))
|
||||
|
||||
local result = exec(wget, {"-O", tmp_file, url, _unpack(wget_args)}, nil,
|
||||
command_timeout) == 0
|
||||
local result = exec(wget, {"-O", tmp_file, url, _unpack(wget_args)}, nil, command_timeout) == 0
|
||||
|
||||
if not result then
|
||||
exec("/bin/rm", {"-f", tmp_file})
|
||||
@ -175,13 +142,11 @@ function to_extract(file)
|
||||
return {code = 1, error = i18n.translate("File path required.")}
|
||||
end
|
||||
|
||||
sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*")
|
||||
local tmp_dir = util.trim(util.exec(
|
||||
"mktemp -d -t kodexplorer_extract.XXXXXX"))
|
||||
sys.call("/bin/rm -rf /tmp/kodcloud_extract.*")
|
||||
local tmp_dir = util.trim(util.exec("mktemp -d -t kodcloud_extract.XXXXXX"))
|
||||
|
||||
local output = {}
|
||||
exec("/bin/tar", {"-C", tmp_dir, "-zxvf", file},
|
||||
function(chunk) output[#output + 1] = chunk end)
|
||||
exec("/usr/bin/unzip", {"-o", file, "-d", tmp_dir}, function(chunk) output[#output + 1] = chunk end)
|
||||
|
||||
local files = util.split(table.concat(output))
|
||||
|
||||
@ -192,14 +157,14 @@ end
|
||||
|
||||
function to_move(file)
|
||||
if not file or file == "" or not fs.access(file) then
|
||||
sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*")
|
||||
sys.call("/bin/rm -rf /tmp/kodcloud_extract.*")
|
||||
return {code = 1, error = i18n.translate("Client file is required.")}
|
||||
end
|
||||
|
||||
local client_file = get_project_directory()
|
||||
sys.call("mkdir -p " .. client_file)
|
||||
sys.call("cp -R " .. file .. "/KodExplorer*/* " .. client_file)
|
||||
sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*")
|
||||
sys.call("cp -R " .. file .. "/* " .. client_file)
|
||||
sys.call("/bin/rm -rf /tmp/kodcloud_extract.*")
|
||||
|
||||
return {code = 0}
|
||||
end
|
||||
|
@ -1,161 +1,163 @@
|
||||
<%
|
||||
local dsp = require "luci.dispatcher"
|
||||
-%>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var msgInfo;
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var msgInfo;
|
||||
var tokenStr = '<%=token%>';
|
||||
var clickToDownloadText = '<%:Click to update%>';
|
||||
var inProgressText = '<%:Updating...%>';
|
||||
var downloadInProgressNotice = '<%:Updating, are you sure to close?%>';
|
||||
var downloadSuccessText = '<%:Update successful%>';
|
||||
var unexpectedErrorText = '<%:Unexpected error%>';
|
||||
var downloadingText = '<%:Downloading...%>';
|
||||
var decompressioningText = '<%:Unpacking...%>';
|
||||
var movingText = '<%:Moving...%>';
|
||||
var latestVersionText = '<%:The latest version:%>';
|
||||
|
||||
var tokenStr = '<%=token%>';
|
||||
var clickToDownloadText = '<%:Click to update%>';
|
||||
var inProgressText = '<%:Updating...%>';
|
||||
var downloadInProgressNotice = '<%:Updating, are you sure to close?%>';
|
||||
var downloadSuccessText = '<%:Update successful%>';
|
||||
var unexpectedErrorText = '<%:Unexpected error%>';
|
||||
var downloadingText = '<%:Downloading...%>';
|
||||
var decompressioningText = '<%:Unpacking...%>';
|
||||
var movingText = '<%:Moving...%>';
|
||||
var latestVersionText = '<%:The latest version:%>';
|
||||
function addPageNotice() {
|
||||
window.onbeforeunload = function (e) {
|
||||
e.returnValue = downloadInProgressNotice;
|
||||
return downloadInProgressNotice;
|
||||
};
|
||||
}
|
||||
|
||||
function addPageNotice() {
|
||||
window.onbeforeunload = function(e) {
|
||||
e.returnValue = downloadInProgressNotice;
|
||||
return downloadInProgressNotice;
|
||||
};
|
||||
}
|
||||
function removePageNotice() {
|
||||
window.onbeforeunload = undefined;
|
||||
}
|
||||
|
||||
function removePageNotice() {
|
||||
window.onbeforeunload = undefined;
|
||||
}
|
||||
function onUpdateSuccess(btn) {
|
||||
alert(downloadSuccessText);
|
||||
|
||||
function onUpdateSuccess(btn) {
|
||||
alert(downloadSuccessText);
|
||||
if (btn) {
|
||||
btn.value = downloadSuccessText;
|
||||
btn.placeholder = downloadSuccessText;
|
||||
btn.disabled = true;
|
||||
}
|
||||
|
||||
if (btn) {
|
||||
btn.value = downloadSuccessText;
|
||||
btn.placeholder = downloadSuccessText;
|
||||
btn.disabled = true;
|
||||
}
|
||||
window.setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
window.setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
function onRequestError(btn, errorMessage) {
|
||||
btn.disabled = false;
|
||||
btn.value = btn.placeholder;
|
||||
|
||||
function onRequestError(btn, errorMessage) {
|
||||
btn.disabled = false;
|
||||
btn.value = btn.placeholder;
|
||||
if (errorMessage) {
|
||||
alert(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessage) {
|
||||
alert(errorMessage);
|
||||
}
|
||||
}
|
||||
function doAjaxGet(url, data, onResult) {
|
||||
new XHR().get(url, data, function (_, json) {
|
||||
var resultJson = json || {
|
||||
'code': 1,
|
||||
'error': unexpectedErrorText
|
||||
};
|
||||
|
||||
function doAjaxGet(url, data, onResult) {
|
||||
new XHR().get(url, data, function(_, json) {
|
||||
var resultJson = json || {
|
||||
'code': 1,
|
||||
'error': unexpectedErrorText
|
||||
};
|
||||
if (typeof onResult === 'function') {
|
||||
onResult(resultJson);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (typeof onResult === 'function') {
|
||||
onResult(resultJson);
|
||||
}
|
||||
})
|
||||
}
|
||||
function downloadClick(btn) {
|
||||
if (msgInfo === undefined) {
|
||||
checkUpdate(btn);
|
||||
} else {
|
||||
doDownload(btn);
|
||||
}
|
||||
}
|
||||
|
||||
function downloadClick(btn) {
|
||||
if (msgInfo === undefined) {
|
||||
checkUpdate(btn);
|
||||
} else {
|
||||
doDownload(btn);
|
||||
}
|
||||
}
|
||||
function checkUpdate(btn) {
|
||||
var text = btn.value;
|
||||
btn.disabled = true;
|
||||
btn.value = inProgressText;
|
||||
|
||||
function checkUpdate(btn) {
|
||||
btn.disabled = true;
|
||||
btn.value = inProgressText;
|
||||
addPageNotice();
|
||||
|
||||
addPageNotice();
|
||||
var ckeckDetailElm = document.getElementById(btn.id + '-detail');
|
||||
|
||||
var ckeckDetailElm = document.getElementById(btn.id + '-detail');
|
||||
doAjaxGet('<%=url([[admin]], [[nas]], [[kodexplorer]], [[check]])%>', {
|
||||
token: tokenStr
|
||||
}, function (json) {
|
||||
removePageNotice();
|
||||
if (json.code && json.data.server) {
|
||||
var server = json.data.server;
|
||||
eval('Info = json');
|
||||
btn.disabled = false;
|
||||
btn.value = clickToDownloadText;
|
||||
btn.placeholder = clickToDownloadText;
|
||||
if (ckeckDetailElm) {
|
||||
var urlNode = '';
|
||||
if (server.version) {
|
||||
urlNode = '<em style="color:red;">' + latestVersionText + server.version + '</em>';
|
||||
var html_url = 'https://kodcloud.com/download/';
|
||||
if (html_url) {
|
||||
urlNode = '<a href="' + html_url + '" target="_blank">' + urlNode + '</a>';
|
||||
}
|
||||
}
|
||||
ckeckDetailElm.innerHTML = urlNode;
|
||||
}
|
||||
msgInfo = server;
|
||||
} else {
|
||||
removePageNotice();
|
||||
btn.disabled = false;
|
||||
btn.value = text;
|
||||
alert(unexpectedErrorText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
doAjaxGet('<%=dsp.build_url("admin/nas/kodexplorer/check")%>/', {
|
||||
token: tokenStr
|
||||
}, function (json) {
|
||||
removePageNotice();
|
||||
if (json.code) {
|
||||
eval('Info = undefined');
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
eval('Info = json');
|
||||
btn.disabled = false;
|
||||
btn.value = clickToDownloadText;
|
||||
btn.placeholder = clickToDownloadText;
|
||||
}
|
||||
function doDownload(btn) {
|
||||
btn.disabled = true;
|
||||
btn.value = downloadingText;
|
||||
|
||||
if (ckeckDetailElm) {
|
||||
var urlNode = '';
|
||||
if (json.version) {
|
||||
urlNode = '<em style="color:red;">' + latestVersionText + json.version + '</em>';
|
||||
if (json.url && json.url.html) {
|
||||
urlNode = '<a href="' + json.url.html + '" target="_blank">' + urlNode + '</a>';
|
||||
}
|
||||
}
|
||||
ckeckDetailElm.innerHTML = urlNode;
|
||||
}
|
||||
msgInfo = json;
|
||||
});
|
||||
}
|
||||
addPageNotice();
|
||||
|
||||
function doDownload(btn) {
|
||||
btn.disabled = true;
|
||||
btn.value = downloadingText;
|
||||
var UpdateUrl = '<%=url([[admin]], [[nas]], [[kodexplorer]], [[download]])%>';
|
||||
// Download file
|
||||
doAjaxGet(UpdateUrl, {
|
||||
token: tokenStr,
|
||||
url: msgInfo ? msgInfo.link : ''
|
||||
}, function (json) {
|
||||
if (json.code) {
|
||||
removePageNotice();
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
btn.value = decompressioningText;
|
||||
|
||||
addPageNotice();
|
||||
// Extract file
|
||||
doAjaxGet(UpdateUrl, {
|
||||
token: tokenStr,
|
||||
task: 'extract',
|
||||
file: json.file
|
||||
}, function (json) {
|
||||
if (json.code) {
|
||||
removePageNotice();
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
btn.value = movingText;
|
||||
|
||||
var UpdateUrl = '<%=dsp.build_url("admin/nas/kodexplorer/download")%>';
|
||||
// Download file
|
||||
doAjaxGet(UpdateUrl, {
|
||||
token: tokenStr,
|
||||
url: msgInfo ? msgInfo.url.download : ''
|
||||
}, function (json) {
|
||||
if (json.code) {
|
||||
removePageNotice();
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
btn.value = decompressioningText;
|
||||
|
||||
// Extract file
|
||||
doAjaxGet(UpdateUrl, {
|
||||
token: tokenStr,
|
||||
task: 'extract',
|
||||
file: json.file
|
||||
}, function (json) {
|
||||
if (json.code) {
|
||||
removePageNotice();
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
btn.value = movingText;
|
||||
|
||||
// Move file to target dir
|
||||
doAjaxGet(UpdateUrl, {
|
||||
token: tokenStr,
|
||||
task: 'move',
|
||||
file: json.file
|
||||
}, function (json) {
|
||||
removePageNotice();
|
||||
if (json.code) {
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
onUpdateSuccess(btn);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//]]></script>
|
||||
// Move file to target dir
|
||||
doAjaxGet(UpdateUrl, {
|
||||
token: tokenStr,
|
||||
task: 'move',
|
||||
file: json.file
|
||||
}, function (json) {
|
||||
removePageNotice();
|
||||
if (json.code) {
|
||||
onRequestError(btn, json.error);
|
||||
} else {
|
||||
onUpdateSuccess(btn);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<%+cbi/valueheader%>
|
||||
<% if self:cfgvalue(section) ~= false then %>
|
||||
|
@ -22,10 +22,17 @@ local dsp = require "luci.dispatcher"
|
||||
XHR.poll(3,'<%=dsp.build_url("admin/nas/kodexplorer/status")%>', null,
|
||||
function(x, json) {
|
||||
if (x && x.status == 200) {
|
||||
if (nginx_status)
|
||||
nginx_status.innerHTML = json.nginx_status ? '<font color="green"><%:RUNNING%> ✓</font>' : '<font color="red"><%:NOT RUNNING%> X</font>';
|
||||
if (php_status)
|
||||
if (nginx_status) {
|
||||
nginx_status.innerHTML = json.nginx_status ? '<font color="green"><%:RUNNING%> ✓</font><input type="button" class="cbi-button cbi-input-apply" value="<%:Enter interface%>" onclick="openwebui()" />' : '<font color="red"><%:NOT RUNNING%> X</font>';
|
||||
}
|
||||
if (php_status) {
|
||||
php_status.innerHTML = json.php_status ? '<font color="green"><%:RUNNING%> ✓</font>' : '<font color="red"><%:NOT RUNNING%> X</font>';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
function openwebui(){
|
||||
var url = window.location.host+":<%=luci.sys.exec("uci -q get kodexplorer.@global[0].port"):gsub("^%s*(.-)%s*$", "%1")%>";
|
||||
window.open('http://'+url,'target','');
|
||||
}
|
||||
//]]></script>
|
@ -1,16 +1,16 @@
|
||||
<%
|
||||
local kodexplorer_path = luci.sys.exec("echo -n `uci get kodexplorer.@global[0].project_directory`")
|
||||
local kodexplorer_version = luci.sys.exec("[ -f '" .. kodexplorer_path .. "/ChangeLog.md' ] && echo -n `cat " .. kodexplorer_path .. "/ChangeLog.md | head -1 | awk '{print $2}'`")
|
||||
local api = require "luci.model.cbi.kodexplorer.api"
|
||||
local app_version = api.get_version()
|
||||
-%>
|
||||
|
||||
<% if kodexplorer_version ~= nil and kodexplorer_version~="" then %>
|
||||
<% if app_version and app_version ~= "" then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title">
|
||||
<%:Version%>
|
||||
</label>
|
||||
<div class="cbi-value-field">
|
||||
<div class="cbi-value-description">
|
||||
<span>【 <%=kodexplorer_version%> 】</span>
|
||||
<span>【 <%=app_version%> 】</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,5 +8,5 @@ uci -q batch <<-EOF >/dev/null
|
||||
EOF
|
||||
|
||||
/etc/init.d/php7-fpm disable && /etc/init.d/php7-fpm stop
|
||||
rm -f /tmp/luci-indexcache
|
||||
rm -rf /tmp/luci-*cache
|
||||
exit 0
|
||||
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-kodexplorer": {
|
||||
"description": "Grant UCI access for luci-app-kodexplorer",
|
||||
"read": {
|
||||
"uci": [ "kodexplorer" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "kodexplorer" ]
|
||||
}
|
||||
}
|
||||
}
|
@ -62,9 +62,7 @@ start_service() {
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service()
|
||||
{
|
||||
stop
|
||||
start
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "nps"
|
||||
}
|
||||
|
||||
|
18
package/lean/luci-app-ps3netsrv/Makefile
Normal file
18
package/lean/luci-app-ps3netsrv/Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Luci for PS3NETSRV
|
||||
LUCI_DEPENDS:=+ps3netsrv
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
@ -0,0 +1,21 @@
|
||||
module("luci.controller.ps3netsrv",package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/ps3netsrv")then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false
|
||||
|
||||
local page
|
||||
|
||||
entry({"admin", "nas","ps3netsrv"},cbi("ps3netsrv"),_("PS3 NET Server"),40).dependent=true
|
||||
entry({"admin", "nas","ps3netsrv","status"},call("act_status")).leaf=true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local e={}
|
||||
e.running=luci.sys.call("ps | grep ps3netsrv |grep -v grep >/dev/null") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
@ -0,0 +1,24 @@
|
||||
-- Copyright 2020 Lean <coolsnowwolf@gmail.com>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
m = Map("ps3netsrv", translate("PS3 NET Server"), translate("PS3NETSRV is ISO/PKG server for Sony PlayStation 3 webMAN-MOD plugin"))
|
||||
|
||||
m:section(SimpleSection).template = "ps3netsrv/ps3netsrv_status"
|
||||
|
||||
s = m:section(TypedSection, "ps3netsrv")
|
||||
s.addremove = false
|
||||
s.anonymous = true
|
||||
|
||||
enable=s:option(Flag, "enabled", translate("Enabled"))
|
||||
enable.default = "0"
|
||||
enable.rmempty = false
|
||||
|
||||
db_path=s:option(Value, "dir", translate("Dir Path"))
|
||||
db_path.default = "/root"
|
||||
db_path.rmempty = false
|
||||
|
||||
port=s:option(Value, "port", translate("Port"))
|
||||
port.rmempty = false
|
||||
port.datatype = "port"
|
||||
|
||||
return m
|
@ -0,0 +1,22 @@
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(3, '<%=url([[admin]], [[nas]], [[ps3netsrv]], [[status]])%>', null,
|
||||
function(x, data) {
|
||||
var tb = document.getElementById('ps3netsrv_status');
|
||||
if (data && tb) {
|
||||
if (data.running) {
|
||||
var links = '<em><b><font color=green>PS3NETSRV <%:RUNNING%></font></b></em>';
|
||||
tb.innerHTML = links;
|
||||
} else {
|
||||
tb.innerHTML = '<em><b><font color=red>PS3NETSRV <%:NOT RUNNING%></font></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]>
|
||||
</script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="ps3netsrv_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
26
package/lean/luci-app-ps3netsrv/po/zh-cn/ps3netsrv.po
Normal file
26
package/lean/luci-app-ps3netsrv/po/zh-cn/ps3netsrv.po
Normal file
@ -0,0 +1,26 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-06-23 20:16+0800\n"
|
||||
"PO-Revision-Date: 2015-06-23 20:17+0800\n"
|
||||
"Last-Translator: coolsnowwolf <coolsnowwolf@gmail.com>\n"
|
||||
"Language-Team: PandoraBox Team\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 1.8.1\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
msgid "PS3 NET Server"
|
||||
msgstr "PS3 NET 服务器"
|
||||
|
||||
msgid "PS3NETSRV is ISO/PKG server for Sony PlayStation 3 webMAN-MOD plugin"
|
||||
msgstr "PS3NETSRV 是一个 Sony PlayStation 3 自制系统 webMAN-MOD 插件的服务器端(用于加载蓝光/游戏ISO/PKG)"
|
||||
|
||||
msgid "Dir Path"
|
||||
msgstr "目录路径"
|
||||
|
||||
msgid "Port"
|
||||
msgstr "端口"
|
11
package/lean/luci-app-ps3netsrv/root/etc/uci-defaults/ps3netsrv
Executable file
11
package/lean/luci-app-ps3netsrv/root/etc/uci-defaults/ps3netsrv
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@ps3netsrv[-1]
|
||||
add ucitrack ps3netsrv
|
||||
set ucitrack.@ps3netsrv[-1].init=ps3netsrv
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-unblockmusic
|
||||
PKG_VERSION:=2.3.5
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=7
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_UnblockNeteaseMusic_Go \
|
||||
|
@ -47,20 +47,20 @@ cloudserver.rmempty = true
|
||||
cloudserver:depends("apptype", "cloud")
|
||||
|
||||
flac = s:option(Flag, "flac_enabled", translate("启用无损音质"))
|
||||
flac.default = 1
|
||||
flac.default = "1"
|
||||
flac.rmempty = false
|
||||
flac.description = translate("目前仅支持酷我、QQ、咪咕")
|
||||
flac:depends("apptype", "nodejs")
|
||||
|
||||
force = s:option(Flag, "force_enabled", translate("强制替换为高音质歌曲"))
|
||||
force.default = 1
|
||||
force.default = "1"
|
||||
force.rmempty = false
|
||||
force.description = translate("如果歌曲音质在 320Kbps 以内,则尝试强制替换为高音质版本")
|
||||
force:depends("apptype", "nodejs")
|
||||
|
||||
o = s:option(Flag, "autoupdate")
|
||||
o.title = translate("自动检查更新主程序")
|
||||
o.default = 0
|
||||
o.default = "1"
|
||||
o.rmempty = false
|
||||
o.description = translate("每天自动检测并更新到最新版本")
|
||||
o:depends("apptype", "nodejs")
|
||||
|
@ -176,14 +176,17 @@ start()
|
||||
fi
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
sed -i '/item.code != 200/ { s/item.code != 200 || item.freeTrialInfo/item.br < 320000/g; }' /usr/share/UnblockNeteaseMusic/src/hook.js
|
||||
else
|
||||
sed -i '/item.br < 320000/ { s/item.br < 320000/item.code != 200 || item.freeTrialInfo/g; }' /usr/share/UnblockNeteaseMusic/src/hook.js
|
||||
fi
|
||||
node /usr/share/UnblockNeteaseMusic/app.js -e http://music.163.com -p 5200 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
||||
node /usr/share/UnblockNeteaseMusic/app.js -p 5200 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
||||
node /usr/share/UnblockNeteaseMusic/app.js -e https://music.163.com -p 5203:5201 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
||||
add_cron
|
||||
echo "$(date -R) # UnblockNeteaseMusic Nodejs Version (http:5200, https:5201)" >>/tmp/unblockmusic.log
|
||||
elif [ "$APPTYPE" == "go" ]; then
|
||||
UnblockNeteaseMusic -p 5200 -sp 5201 -c /usr/share/UnblockNeteaseMusicGo/server.crt -k /usr/share/UnblockNeteaseMusicGo/server.key -m 0 -e >>/tmp/unblockmusic.log 2>&1 &
|
||||
UnblockNeteaseMusic -p 5200 -sp 5202 -m 0 -c /usr/share/UnblockNeteaseMusicGo/server.crt -k /usr/share/UnblockNeteaseMusicGo/server.key -m 0 >>/tmp/unblockmusic.log 2>&1 &
|
||||
echo "$(date -R) # UnblockNeteaseMusic Golang Version (http:5200, https:5201)" >>/tmp/unblockmusic.log
|
||||
UnblockNeteaseMusic -p 5203 -sp 5201 -m 0 -c /usr/share/UnblockNeteaseMusicGo/server.crt -k /usr/share/UnblockNeteaseMusicGo/server.key -m 0 -e >>/tmp/unblockmusic.log 2>&1 &
|
||||
else
|
||||
kill -9 $(busybox ps -w | grep 'sleep 60m' | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
/usr/bin/UnblockNeteaseMusicCloud >/dev/null 2>&1 &
|
||||
|
@ -49,7 +49,7 @@ function update_core(){
|
||||
exit 1
|
||||
else
|
||||
echo -e "${latest_ver}" > /usr/share/UnblockNeteaseMusic/local_ver
|
||||
cat /usr/share/UnblockNeteaseMusic/package-lock.json | grep version |awk -F ':' '{print $2}' | cut -c3-8 > /usr/share/UnblockNeteaseMusic/core_ver
|
||||
cat /usr/share/UnblockNeteaseMusic/package.json | grep version |awk -F ':' '{print $2}' | cut -c3-8 > /usr/share/UnblockNeteaseMusic/core_ver
|
||||
fi
|
||||
|
||||
echo -e "Succeeded in updating core." >/tmp/unblockmusic_update.log
|
||||
|
@ -10,7 +10,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rclone-ng
|
||||
PKG_VERSION:=0.2.4
|
||||
PKG_VERSION:=0.3.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
PKG_SOURCE:=RcloneNg-v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/ElonH/RcloneNg/releases/download/v$(PKG_VERSION)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_HASH:=3090a713253b17bfbb4d6a69b4b55b81d69e1768cf56d3abca8631e4a35f270b
|
||||
PKG_HASH:=441fdfa577bdda7f58f62f6e75174a4a48e44d7c1361f7123d9699d791c08b5a
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
|
@ -10,16 +10,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rclone
|
||||
PKG_VERSION:=1.51.0
|
||||
PKG_VERSION:=1.52.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/rclone/rclone.git
|
||||
PKG_SOURCE_DATE:=2020-02-01
|
||||
PKG_SOURCE_VERSION:=43daecd89b21292b112051340317927b42ccbdd3
|
||||
PKG_SOURCE_DATE:=2020-06-10
|
||||
PKG_SOURCE_VERSION:=31dc78905ea8dfb22c43724527b19e097e05c26a
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=aca159c81971a9490a6a6c323b67879dccba3860955b66787d91590f4ba8ba29
|
||||
PKG_MIRROR_HASH:=fa79f62babc2f42691c9ad83ef906e90061d4ca6adcc97150c2906605312db66
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>
|
||||
|
@ -1,44 +0,0 @@
|
||||
##
|
||||
# File: /patches/020-Notice-Access-Control-Allow-Origin-only-once.patch
|
||||
# Project: rclone
|
||||
# File Created: Sunday, 3rd May 2020 1:44:22 pm
|
||||
# Author: ElonH[EH](elonhhuang@gmail.com)
|
||||
# License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html)
|
||||
# Copyright (C) 2020 [ElonH]
|
||||
##
|
||||
diff --git a/fs/rc/rcserver/rcserver.go b/fs/rc/rcserver/rcserver.go
|
||||
index 4a2b5c71e..f00994e93 100644
|
||||
--- a/fs/rc/rcserver/rcserver.go
|
||||
+++ b/fs/rc/rcserver/rcserver.go
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
+ "sync"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rclone/rclone/cmd/serve/httplib"
|
||||
@@ -29,6 +30,8 @@ import (
|
||||
"github.com/skratchdot/open-golang/open"
|
||||
)
|
||||
|
||||
+var onlyOnce sync.Once
|
||||
+
|
||||
// Start the remote control server if configured
|
||||
//
|
||||
// If the server wasn't configured the *Server returned may be nil
|
||||
@@ -172,9 +175,11 @@ func (s *Server) handler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
allowOrigin := rcflags.Opt.AccessControlAllowOrigin
|
||||
if allowOrigin != "" {
|
||||
- if allowOrigin == "*" {
|
||||
- fs.Logf(nil, "Warning: Allow origin set to *. This can cause serious security problems.")
|
||||
- }
|
||||
+ onlyOnce.Do(func() {
|
||||
+ if allowOrigin == "*" {
|
||||
+ fs.Logf(nil, "Warning: Allow origin set to *. This can cause serious security problems.")
|
||||
+ }
|
||||
+ })
|
||||
w.Header().Add("Access-Control-Allow-Origin", allowOrigin)
|
||||
} else {
|
||||
w.Header().Add("Access-Control-Allow-Origin", s.URL())
|
@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trojan
|
||||
PKG_VERSION:=1.15.1
|
||||
PKG_VERSION:=1.16.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/trojan-gfw/trojan.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=0bad2988c60200c15786baf6b9ea42d66ba2109c
|
||||
PKG_SOURCE_VERSION:=8606b7110fe79f8ab02d60c897f87ffb0a9b23f0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
CMAKE_INSTALL:=1
|
||||
|
@ -9,13 +9,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray
|
||||
PKG_VERSION:=4.23.4
|
||||
PKG_VERSION:=4.24.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=726dd98d674bd73150158b1d4c8bc0d59dbb672ba10096ac61548d6278213c78
|
||||
PKG_HASH:=b58b4477020034b67a7649341fae65ea7bdc81851cad47ae7e4a591c0663e4c9
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
@ -19,21 +19,26 @@ ifeq ($(ARCH),i386)
|
||||
PKG_ARCH_VERYSYNC:=386
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
PKG_ARCH_VERYSYNC:=arm7
|
||||
endif
|
||||
ifeq ($(BOARD),bcm53xx)
|
||||
PKG_ARCH_VERYSYNC:=arm6
|
||||
endif
|
||||
ifeq ($(BOARD),kirkwood)
|
||||
PKG_ARCH_VERYSYNC:=arm
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
PKG_ARCH_VERYSYNC:=arm64
|
||||
endif
|
||||
ifeq ($(ARCH),powerpc64)
|
||||
PKG_ARCH_VERYSYNC:=ppc64
|
||||
endif
|
||||
|
||||
LATEST_VERSION:=$(shell curl http://www.verysync.com/shell/latest)
|
||||
|
||||
PKG_NAME:=verysync
|
||||
PKG_VERSION:=v1.3.1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
ifneq ($(LATEST_VERSION),)
|
||||
PKG_VERSION:=$(LATEST_VERSION)
|
||||
else
|
||||
PKG_VERSION:=v1.4.3
|
||||
endif
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://releases-cdn.verysync.com/releases/$(PKG_VERSION)/
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmasq
|
||||
PKG_VERSION:=2.80
|
||||
PKG_RELEASE:=12
|
||||
PKG_RELEASE:=13
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
|
||||
|
@ -1024,18 +1024,22 @@ dnsmasq_start()
|
||||
echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
|
||||
done
|
||||
}
|
||||
|
||||
threads=$(cat /proc/cpuinfo | grep 'processor' | wc -l)
|
||||
|
||||
for i in $(seq 1 $threads); do
|
||||
procd_open_instance $cfg$i
|
||||
procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}"."$i".pid
|
||||
procd_set_param file $CONFIGFILE
|
||||
[ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript"
|
||||
procd_set_param respawn
|
||||
|
||||
procd_open_instance $cfg
|
||||
procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid
|
||||
procd_set_param file $CONFIGFILE
|
||||
[ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript"
|
||||
procd_set_param respawn
|
||||
procd_add_jail dnsmasq ubus log
|
||||
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT
|
||||
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
|
||||
|
||||
procd_add_jail dnsmasq ubus log
|
||||
procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT
|
||||
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
|
||||
|
||||
procd_close_instance
|
||||
procd_close_instance
|
||||
done
|
||||
}
|
||||
|
||||
dnsmasq_stop()
|
||||
|
@ -233,8 +233,8 @@ proto_pppoe_setup() {
|
||||
|
||||
#By 蝈蝈:并发拨号同步的前期准备
|
||||
syncppp_option=""
|
||||
[ "$(uci get syncdial.config.enabled)" == "1" ] && {
|
||||
ppp_if_cnt=$(cat /etc/config/network | grep -E -c "proto\s+?'pppoe'")
|
||||
[ "$(uci get syncdial.config.enabled)" -eq "1" ] && {
|
||||
ppp_if_cnt=$(uci show network | grep -c "\.proto=\'pppoe\'$")
|
||||
syncppp_option="syncppp $ppp_if_cnt"
|
||||
shellsync $ppp_if_cnt 10
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=wireguard
|
||||
|
||||
PKG_VERSION:=1.0.20200520
|
||||
PKG_VERSION:=1.0.20200611
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
|
||||
PKG_HASH:=16e7ae4bef734b243428eea07f3b3c3d4721880c3ea8eb8f98628fd6ae5b77c3
|
||||
PKG_HASH:=9b0478c3b1f3a7b488916e632e2fcbb1383bb1a2ef294489858ce2ba1da3246d
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
@ -493,7 +493,7 @@ define Device/gl-ar300m
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
|
||||
BOARDNAME := GL-AR300M
|
||||
IMAGE_SIZE := 16000k
|
||||
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
|
||||
MTDPARTS := spi0.0:256k(u-boot),64k(u-boot-env),16000k(firmware),64k(art)ro
|
||||
endef
|
||||
TARGET_DEVICES += gl-ar300m
|
||||
|
||||
@ -539,7 +539,7 @@ define Device/gl-mifi
|
||||
BOARDNAME := GL-MIFI
|
||||
IMAGE_SIZE := 16000k
|
||||
CONSOLE := ttyATH0,115200
|
||||
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
|
||||
MTDPARTS := spi0.0:256k(u-boot),64k(u-boot-env)ro,16000k(firmware),64k(art)ro
|
||||
endef
|
||||
TARGET_DEVICES += gl-mifi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user