Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
887ca471
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
887ca471
编写于
6月 16, 2020
作者:
C
coolsnowwolf
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/coolsnowwolf/lede
上级
95d52b60
70a9891f
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
234 addition
and
293 deletion
+234
-293
package/lean/luci-app-kodexplorer/Makefile
package/lean/luci-app-kodexplorer/Makefile
+3
-3
package/lean/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua
...an/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua
+7
-15
package/lean/luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua
...luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua
+22
-57
package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm
...luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm
+160
-158
package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm
...n/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm
+11
-4
package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm
.../luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm
+4
-4
package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer
...pp-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer
+1
-1
package/lean/luci-app-kodexplorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json
...lorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json
+11
-0
package/lean/rclone-ng/Makefile
package/lean/rclone-ng/Makefile
+2
-2
package/lean/rclone/Makefile
package/lean/rclone/Makefile
+4
-4
package/lean/rclone/patches/020-Notice-Access-Control-Allow-Origin-only-once.patch
...es/020-Notice-Access-Control-Allow-Origin-only-once.patch
+0
-44
package/lean/verysync/Makefile
package/lean/verysync/Makefile
+9
-1
未找到文件。
package/lean/luci-app-kodexplorer/Makefile
浏览文件 @
887ca471
...
...
@@ -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
:=
1
3
PKG_
DATE
:=
20200612
include
$(TOPDIR)/feeds/luci/luci.mk
...
...
package/lean/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua
浏览文件 @
887ca471
...
...
@@ -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"
,
"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"
},
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
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
...
...
package/lean/luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua
浏览文件 @
887ca471
...
...
@@ -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/kod
explorer
_download.*"
)
sys.call("/bin/rm -f /tmp/kod
cloud
_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/kod
explorer
_extract.*"
)
sys.call("/bin/rm -rf /tmp/kod
cloud
_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/kod
explorer
_extract.*"
)
sys.call("cp -R " .. file .. "/* " .. client_file)
sys.call("/bin/rm -rf /tmp/kod
cloud
_extract.*")
return {code = 0}
end
package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm
浏览文件 @
887ca471
<
%
local
dsp =
require
"
luci.dispatcher
"
-
%
>
<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:%>
'
;
function
addPageNotice
()
{
window
.
onbeforeunload
=
function
(
e
)
{
e
.
returnValue
=
downloadInProgressNotice
;
return
downloadInProgressNotice
;
};
}
function
removePageNotice
()
{
window
.
onbeforeunload
=
undefined
;
}
function
onUpdateSuccess
(
btn
)
{
alert
(
downloadSuccessText
);
if
(
btn
)
{
btn
.
value
=
downloadSuccessText
;
btn
.
placeholder
=
downloadSuccessText
;
btn
.
disabled
=
true
;
}
window
.
setTimeout
(
function
()
{
window
.
location
.
reload
();
},
1000
);
}
function
onRequestError
(
btn
,
errorMessage
)
{
btn
.
disabled
=
false
;
btn
.
value
=
btn
.
placeholder
;
if
(
errorMessage
)
{
alert
(
errorMessage
);
}
}
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
);
}
})
}
function
downloadClick
(
btn
)
{
if
(
msgInfo
===
undefined
)
{
checkUpdate
(
btn
);
}
else
{
doDownload
(
btn
);
}
}
function
checkUpdate
(
btn
)
{
btn
.
disabled
=
true
;
btn
.
value
=
inProgressText
;
addPageNotice
();
var
ckeckDetailElm
=
document
.
getElementById
(
btn
.
id
+
'
-detail
'
);
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
;
}
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
;
});
}
function
doDownload
(
btn
)
{
btn
.
disabled
=
true
;
btn
.
value
=
downloadingText
;
addPageNotice
();
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>
<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:%>
'
;
function
addPageNotice
()
{
window
.
onbeforeunload
=
function
(
e
)
{
e
.
returnValue
=
downloadInProgressNotice
;
return
downloadInProgressNotice
;
};
}
function
removePageNotice
()
{
window
.
onbeforeunload
=
undefined
;
}
function
onUpdateSuccess
(
btn
)
{
alert
(
downloadSuccessText
);
if
(
btn
)
{
btn
.
value
=
downloadSuccessText
;
btn
.
placeholder
=
downloadSuccessText
;
btn
.
disabled
=
true
;
}
window
.
setTimeout
(
function
()
{
window
.
location
.
reload
();
},
1000
);
}
function
onRequestError
(
btn
,
errorMessage
)
{
btn
.
disabled
=
false
;
btn
.
value
=
btn
.
placeholder
;
if
(
errorMessage
)
{
alert
(
errorMessage
);
}
}
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
);
}
})
}
function
downloadClick
(
btn
)
{
if
(
msgInfo
===
undefined
)
{
checkUpdate
(
btn
);
}
else
{
doDownload
(
btn
);
}
}
function
checkUpdate
(
btn
)
{
var
text
=
btn
.
value
;
btn
.
disabled
=
true
;
btn
.
value
=
inProgressText
;
addPageNotice
();
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
);
}
});
}
function
doDownload
(
btn
)
{
btn
.
disabled
=
true
;
btn
.
value
=
downloadingText
;
addPageNotice
();
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
;
// 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>
<
%+
cbi
/
valueheader
%
>
<
%
if
self:cfgvalue
(
section
)
~=
false
then
%
>
...
...
package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm
浏览文件 @
887ca471
...
...
@@ -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>
\ No newline at end of file
package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm
浏览文件 @
887ca471
<
%
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>
...
...
package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer
浏览文件 @
887ca471
...
...
@@ -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-index
cache
rm
-
rf
/tmp/luci-
*
cache
exit
0
package/lean/luci-app-kodexplorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json
0 → 100644
浏览文件 @
887ca471
{
"luci-app-kodexplorer"
:
{
"description"
:
"Grant UCI access for luci-app-kodexplorer"
,
"read"
:
{
"uci"
:
[
"kodexplorer"
]
},
"write"
:
{
"uci"
:
[
"kodexplorer"
]
}
}
}
package/lean/rclone-ng/Makefile
浏览文件 @
887ca471
...
...
@@ -10,7 +10,7 @@
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
rclone-ng
PKG_VERSION
:=
0.3.
0
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
:=
b6f7254fcb82d380ad621859a216fbf510059c95ad2df0e27bcf2872892f7c6f
PKG_HASH
:=
441fdfa577bdda7f58f62f6e75174a4a48e44d7c1361f7123d9699d791c08b5a
define
Package/$(PKG_NAME)
SECTION
:=
net
...
...
package/lean/rclone/Makefile
浏览文件 @
887ca471
...
...
@@ -10,16 +10,16 @@
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
rclone
PKG_VERSION
:=
1.5
1.0
PKG_VERSION
:=
1.5
2.1
PKG_RELEASE
:=
1
PKG_SOURCE_PROTO
:=
git
PKG_SOURCE_URL
:=
https://github.com/rclone/rclone.git
PKG_SOURCE_DATE
:=
2020-0
2-01
PKG_SOURCE_VERSION
:=
43daecd89b21292b112051340317927b42ccbdd3
PKG_SOURCE_DATE
:=
2020-0
6-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>
...
...
package/lean/rclone/patches/020-Notice-Access-Control-Allow-Origin-only-once.patch
已删除
100644 → 0
浏览文件 @
95d52b60
##
# 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())
package/lean/verysync/Makefile
浏览文件 @
887ca471
...
...
@@ -28,8 +28,16 @@ ifeq ($(ARCH),powerpc64)
PKG_ARCH_VERYSYNC
:=
ppc64
endif
LATEST_VERSION
:=
$(
shell
curl http://www.verysync.com/shell/latest
)
PKG_NAME
:=
verysync
PKG_VERSION
:=
v1.4.3
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录