mirror of
https://github.com/kenzok8/small-package
synced 2025-09-20 19:11:30 +08:00
update 04-21 22:15:25
This commit is contained in:
@ -16,21 +16,21 @@ local ssub, slen, schar, sbyte, sformat, sgsub = string.sub, string.len, string.
|
||||
local jsonParse, jsonStringify = luci.jsonc.parse, luci.jsonc.stringify
|
||||
local b64decode = nixio.bin.b64decode
|
||||
local cache = {}
|
||||
local nodeResult = setmetatable({}, {__index = cache}) -- update result
|
||||
local nodeResult = setmetatable({}, { __index = cache }) -- update result
|
||||
local name = 'bypass'
|
||||
local uciType = 'servers'
|
||||
local ucic = luci.model.uci.cursor()
|
||||
local proxy = ucic:get_first(name, 'server_subscribe', 'proxy', '0')
|
||||
local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
|
||||
local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
|
||||
local filter_mode=ucic:get_first(name,'server_subscribe','filter_mode','0')
|
||||
local filter_mode = ucic:get_first(name, 'server_subscribe', 'filter_mode', '0')
|
||||
local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
|
||||
local v2_ss = luci.sys.exec('type -t -p ss-redir sslocal') ~= "" and "ss" or "v2ray"
|
||||
local v2_tj = luci.sys.exec('type -t -p trojan-plus') ~= "" and "trojan" or "v2ray"
|
||||
local log=function(...)
|
||||
local file=io.open("/var/log/bypass.log","a")
|
||||
local log = function(...)
|
||||
local file = io.open("/var/log/bypass.log", "a")
|
||||
io.output(file)
|
||||
io.write(os.date("%Y-%m-%d %H:%M:%S ").."Subscribe : "..table.concat({...}," ").."\n")
|
||||
io.write(os.date("%Y-%m-%d %H:%M:%S ") .. "Subscribe : " .. table.concat({ ... }, " ") .. "\n")
|
||||
io.close(file)
|
||||
end
|
||||
local encrypt_methods_ss = {
|
||||
@ -39,8 +39,8 @@ local encrypt_methods_ss = {
|
||||
"aes-192-gcm",
|
||||
"aes-256-gcm",
|
||||
"chacha20-ietf-poly1305",
|
||||
"xchacha20-ietf-poly1305"
|
||||
--[[ stream
|
||||
"xchacha20-ietf-poly1305",
|
||||
--stream
|
||||
"table",
|
||||
"rc4",
|
||||
"rc4-md5",
|
||||
@ -56,7 +56,7 @@ local encrypt_methods_ss = {
|
||||
"camellia-256-cfb",
|
||||
"salsa20",
|
||||
"chacha20",
|
||||
"chacha20-ietf" ]]
|
||||
"chacha20-ietf"
|
||||
}
|
||||
-- 分割字符串
|
||||
local function split(full, sep)
|
||||
@ -77,6 +77,7 @@ local function split(full, sep)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
-- urlencode
|
||||
local function get_urlencode(c)
|
||||
return sformat("%%%02X", sbyte(c))
|
||||
@ -91,6 +92,7 @@ end
|
||||
local function get_urldecode(h)
|
||||
return schar(tonumber(h, 16))
|
||||
end
|
||||
|
||||
local function UrlDecode(szText)
|
||||
return szText:gsub("+", " "):gsub("%%(%x%x)", get_urldecode)
|
||||
end
|
||||
@ -102,12 +104,14 @@ local function trim(text)
|
||||
end
|
||||
return (sgsub(text, "^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
|
||||
-- md5
|
||||
local function md5(content)
|
||||
local stdout = luci.sys.exec('echo \"' .. urlEncode(content) .. '\" | md5sum | cut -d \" \" -f1')
|
||||
-- assert(nixio.errno() == 0)
|
||||
return trim(stdout)
|
||||
end
|
||||
|
||||
-- base64
|
||||
local function base64Decode(text)
|
||||
local raw = text
|
||||
@ -126,18 +130,20 @@ local function base64Decode(text)
|
||||
return raw
|
||||
end
|
||||
end
|
||||
|
||||
-- 检查数组(table)中是否存在某个字符值
|
||||
-- https://www.04007.cn/article/135.html
|
||||
local function checkTabValue(tab)
|
||||
local revtab = {}
|
||||
for k,v in pairs(tab) do
|
||||
for k, v in pairs(tab) do
|
||||
revtab[v] = true
|
||||
end
|
||||
return revtab
|
||||
end
|
||||
|
||||
-- 处理数据
|
||||
local function processData(szType, content)
|
||||
local result = {type = szType, local_port = 1234, kcp_param = '--nocomp'}
|
||||
local result = { type = szType, local_port = 1234, kcp_param = '--nocomp' }
|
||||
if szType == 'ssr' then
|
||||
local dat = split(content, "/%?")
|
||||
local hostInfo = split(dat[1], ':')
|
||||
@ -415,21 +421,22 @@ local function processData(szType, content)
|
||||
result.switch_enable = switch_enable
|
||||
return result
|
||||
end
|
||||
|
||||
-- curl
|
||||
local function curl(url)
|
||||
local stdout=luci.sys.exec('curl --retry 3 -m 10 -LfskA "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36" "'..url..'"')
|
||||
local stdout = luci.sys.exec('curl --retry 3 -m 10 -LfskA "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36" "' .. url .. '"')
|
||||
return trim(stdout)
|
||||
end
|
||||
|
||||
local function check_filer(result)
|
||||
local filter_word=split(filter_words,"/")
|
||||
for i,v in pairs(filter_word) do
|
||||
local filter_word = split(filter_words, "/")
|
||||
for i, v in pairs(filter_word) do
|
||||
if result.alias:find(v) then
|
||||
-- log('命中关键词:“'..v..'” pwd')
|
||||
return filter_mode=='0'
|
||||
return filter_mode == '0'
|
||||
end
|
||||
end
|
||||
return filter_mode=='1'
|
||||
return filter_mode == '1'
|
||||
end
|
||||
|
||||
local execute = function()
|
||||
@ -453,14 +460,14 @@ local execute = function()
|
||||
local nEnd = select(2, raw:find('ssd://'))
|
||||
nodes = base64Decode(raw:sub(nEnd + 1, #raw))
|
||||
nodes = jsonParse(nodes)
|
||||
local extra = {airport = nodes.airport, port = nodes.port, encryption = nodes.encryption, password = nodes.password}
|
||||
local extra = { airport = nodes.airport, port = nodes.port, encryption = nodes.encryption, password = nodes.password }
|
||||
local servers = {}
|
||||
-- SS里面包着 干脆直接这样
|
||||
for _, server in ipairs(nodes.servers) do
|
||||
tinsert(servers, setmetatable(server, {__index = extra}))
|
||||
tinsert(servers, setmetatable(server, { __index = extra }))
|
||||
end
|
||||
nodes = servers
|
||||
-- SS SIP008 直接使用 Json 格式
|
||||
-- SS SIP008 直接使用 Json 格式
|
||||
elseif jsonParse(raw) then
|
||||
nodes = jsonParse(raw)
|
||||
if nodes[1].server and nodes[1].method then
|
||||
@ -532,7 +539,7 @@ local execute = function()
|
||||
local dat = nodeResult[old.grouphashkey][old.hashkey]
|
||||
ucic:tset(name, old['.name'], dat)
|
||||
-- 标记一下
|
||||
setmetatable(nodeResult[old.grouphashkey][old.hashkey], {__index = {_ignore = true}})
|
||||
setmetatable(nodeResult[old.grouphashkey][old.hashkey], { __index = { _ignore = true } })
|
||||
end
|
||||
else
|
||||
if not old.alias then
|
||||
|
@ -42,7 +42,7 @@ o:value("off", translate("OFF"))
|
||||
o.default = auto
|
||||
|
||||
o = s:option(Value, "log_file", translate("Log file"))
|
||||
o.default = "/tmp/v2raya.log"
|
||||
o.default = "/var/log/v2raya/v2raya.log"
|
||||
|
||||
o = s:option(ListValue, "log_level", translate("Log Level"))
|
||||
o:value("trace",translate("Trace"))
|
||||
|
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argonne kenzo
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=1.7.2
|
||||
PKG_RELEASE:=20211009
|
||||
PKG_VERSION:=1.7.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
@ -24,4 +24,4 @@ rm -Rf /var/luci-indexcache
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
@ -2,7 +2,10 @@
|
||||
* Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argonne Template
|
||||
*
|
||||
* luci-theme-argonne
|
||||
* Copyright 2021 kenzo <kenzok78@gmail.com>
|
||||
* Copyright 2020 Jerryk <jerrykuku@gmail.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
@ -312,7 +315,7 @@ li {
|
||||
position: relative;
|
||||
}
|
||||
.login-page .login-container .login-form .form-login .input-group::before {
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@ -630,7 +633,7 @@ footer a {
|
||||
position: relative;
|
||||
}
|
||||
.main .main-left .nav li.slide .menu::before {
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@ -649,7 +652,7 @@ footer a {
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
top: 0.8rem;
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@ -1631,7 +1634,7 @@ body.lang_pl.node-main-login .cbi-value-title {
|
||||
.cbi-value-helpicon,
|
||||
.showSide,
|
||||
.main > .loading > span {
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal !important;
|
||||
font-weight: normal !important;
|
||||
font-variant: normal !important;
|
||||
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
* Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argonne Template
|
||||
*
|
||||
* luci-theme-argon
|
||||
* luci-theme-argonne
|
||||
* Copyright 2020 Jerryk <jerrykuku@gmail.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
* https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
@ -47,12 +47,12 @@
|
||||
/* ICON Font */
|
||||
|
||||
@font-face {
|
||||
font-family: 'argon';
|
||||
src: url('../fonts/argon.eot?u6kthm');
|
||||
src: url('../fonts/argon.eot?u6kthm#iefix') format('embedded-opentype'),
|
||||
url('../fonts/argon.ttf?u6kthm') format('truetype'),
|
||||
url('../fonts/argon.woff?u6kthm') format('woff'),
|
||||
url('../fonts/argon.svg?u6kthm#argon') format('svg');
|
||||
font-family: 'argonne';
|
||||
src: url('../fonts/argonne.eot?u6kthm');
|
||||
src: url('../fonts/argonne.eot?u6kthm#iefix') format('embedded-opentype'),
|
||||
url('../fonts/argonne.ttf?u6kthm') format('truetype'),
|
||||
url('../fonts/argonne.woff?u6kthm') format('woff'),
|
||||
url('../fonts/argonne.svg?u6kthm#argonne') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
@ -61,7 +61,7 @@
|
||||
[class^="icon-"],
|
||||
[class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
|
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="argon" horiz-adv-x="1024">
|
||||
<font id="argonne" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
Binary file not shown.
@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
* Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argonne Template
|
||||
*
|
||||
* luci-theme-argon
|
||||
* luci-theme-argonne
|
||||
* Copyright 2019 Jerrykuku <jerrykuku@qq.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
* https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
|
@ -1,12 +1,12 @@
|
||||
// compress: false
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
* Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argonne Template
|
||||
*
|
||||
* luci-theme-argon
|
||||
* luci-theme-argonne
|
||||
* Copyright 2020 Jerryk <jerrykuku@gmail.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
* https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
@ -20,7 +20,7 @@
|
||||
* https://github.com/LuttyYang/luci-theme-material/
|
||||
*
|
||||
* Agron Theme
|
||||
* https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
* https://demos.creative-tim.com/argonne-dashboard/index.html
|
||||
*
|
||||
* Login background
|
||||
* https://unsplash.com/
|
||||
@ -362,7 +362,7 @@ li {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@ -745,7 +745,7 @@ footer {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@ -765,7 +765,7 @@ footer {
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
top: 0.8rem;
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@ -1989,7 +1989,7 @@ body.lang_pl.node-main-login .cbi-value-title {
|
||||
.cbi-value-helpicon,
|
||||
.showSide,
|
||||
.main>.loading>span {
|
||||
font-family: 'argon' !important;
|
||||
font-family: 'argonne' !important;
|
||||
font-style: normal !important;
|
||||
font-weight: normal !important;
|
||||
font-variant: normal !important;
|
||||
|
@ -1,12 +1,12 @@
|
||||
// compress: true
|
||||
/**
|
||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
||||
* Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argonne Template
|
||||
*
|
||||
* luci-theme-argon
|
||||
* luci-theme-argonne
|
||||
* Copyright 2020 Jerryk <jerrykuku@gmail.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/jerrykuku/luci-theme-argon/issues
|
||||
* https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<%#
|
||||
argonnene is a clean HTML5 theme for LuCI. It is based on luci-theme-material and argonnene Template
|
||||
Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argonne Template
|
||||
|
||||
luci-theme-argonnene
|
||||
Copyright 2021 kenzo <kenzok78@gmail.com>
|
||||
luci-theme-argonne
|
||||
Copyright 2019 Jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
@ -16,7 +19,7 @@
|
||||
https://github.com/LuttyYang/luci-theme-material/
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argonnene-dashboard/index.html
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Login background
|
||||
https://unsplash.com/
|
||||
@ -40,7 +43,7 @@
|
||||
<div class="ftc">
|
||||
<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %>
|
||||
(<%= ver.luciversion %>)</a> /
|
||||
<a href="https://github.com/kenzok78/luci-theme-argonne">argonneTheme <%# vPKG_VERSION %></a> /
|
||||
<a href="https://github.com/kenzok78/luci-theme-argonne">ArgonneTheme <%# vPKG_VERSION %></a> /
|
||||
<%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
|
@ -1,11 +1,11 @@
|
||||
<%#
|
||||
Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and argonne Template
|
||||
Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argonne Template
|
||||
|
||||
luci-theme-argonne
|
||||
Copyright 2021 kenzo <kenzok78@gmail.com>
|
||||
Copyright 2020 Jerryk <jerrykuku@gmail.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argonne/issues
|
||||
https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
@ -16,7 +16,7 @@
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argonne-dashboard/index.html
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
@ -44,7 +44,7 @@
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
local currentNode = luci.dispatcher.context.path
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
@ -108,16 +108,22 @@
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local function render_submenu(prefix,parent, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="slide-menu">')
|
||||
|
||||
local active = (currentNode[2] == parent) and "active" or ""
|
||||
local display = (currentNode[2] == parent) and 'style="display: block;"' or ""
|
||||
|
||||
write('<ul class="slide-menu %s" %s>' %{
|
||||
active,
|
||||
display
|
||||
})
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
local subactive = (currentNode[3] == r) and 'class="active"' or ""
|
||||
write('<li %s><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
subactive,
|
||||
title,
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
title
|
||||
@ -132,20 +138,21 @@
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
local active = (currentNode[2] == r) and "active" or ""
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
|
||||
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
|
||||
write('<li class="slide"><a class="menu %s" data-title="%s" href="#">%s</a>' %{
|
||||
active,
|
||||
en_title,
|
||||
title
|
||||
})
|
||||
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
render_submenu(category .. "/" .. r,r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
@ -1,11 +1,11 @@
|
||||
<%#
|
||||
Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and argonne Template
|
||||
Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argonne Template
|
||||
|
||||
luci-theme-argonne
|
||||
Copyright 2021 kenzo <kenzok78@gmail.com>
|
||||
Copyright 2020 Jerryk <jerrykuku@gmail.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argonne/issues
|
||||
https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
|
@ -2,10 +2,10 @@
|
||||
Argonne is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argonne Template
|
||||
|
||||
luci-theme-argonne
|
||||
Copyright 2021 kenzo <kenzok78@gmail.com>
|
||||
Copyright 2021 Jerryk <jerrykuku@gmail.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/jerrykuku/luci-theme-argonne/issues
|
||||
https://github.com/kenzok78/luci-theme-argonne/issues
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
@ -16,19 +16,22 @@
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Agron Theme
|
||||
https://demos.creative-tim.com/argonne-dashboard/index.html
|
||||
https://demos.creative-tim.com/argon-dashboard/index.html
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%+header_login%>
|
||||
<%
|
||||
local util = require "luci.util"
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local util = require "luci.util"
|
||||
local fs = require "nixio.fs"
|
||||
local nutil = require "nixio.util"
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
local theme_dir = media .. "/background/"
|
||||
local sys = require "luci.sys"
|
||||
local json = require "luci.jsonc"
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
|
||||
-- Fetch Local Background Media
|
||||
|
||||
function glob(...)
|
||||
local iter, code, msg = fs.glob(...)
|
||||
if iter then
|
||||
@ -38,81 +41,71 @@
|
||||
end
|
||||
end
|
||||
|
||||
function getExtension(str)
|
||||
return str:match(".+%.(%w+)$")
|
||||
end
|
||||
|
||||
function fetchMedia(path)
|
||||
local bgArr = {}
|
||||
local numBg = 0
|
||||
function fetchMedia(path,themeDir)
|
||||
local backgroundTable = {}
|
||||
local backgroundCount = 0
|
||||
for i, f in ipairs(glob(path)) do
|
||||
attr = fs.stat(f)
|
||||
if attr then
|
||||
local ext = getExtension(fs.basename(f))
|
||||
local ext = fs.basename(f):match(".+%.(%w+)$")
|
||||
if ext == "jpg" or ext == "png" or ext == "gif" or ext == "mp4" then
|
||||
local bg = {}
|
||||
bg.type = ext
|
||||
bg.url = theme_dir .. fs.basename(f)
|
||||
table.insert(bgArr,bg)
|
||||
numBg = numBg + 1
|
||||
bg.url = themeDir .. fs.basename(f)
|
||||
table.insert(backgroundTable,bg)
|
||||
backgroundCount = backgroundCount + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return bgArr,numBg
|
||||
return backgroundTable,backgroundCount
|
||||
end
|
||||
|
||||
local bgcount = 0
|
||||
local currentBg = {}
|
||||
local bgs = {}
|
||||
local theme_dir = media .. "/background/"
|
||||
local bing_background = fs.access('/etc/config/argonne') and uci:get_first('argonne', 'global', 'bing_background') or "0"
|
||||
bgs,bgcount=fetchMedia("/www" .. theme_dir .. "*")
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local bingUrl = "http://www.bing.com/"
|
||||
local bingApiUrl = bingUrl .. "HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
local themeDir = media .. "/background/"
|
||||
local bgUrl = media .. "/img/bg1.jpg"
|
||||
local useBing = fs.access('/etc/config/argonne') and uci:get_first('argonne', 'global', 'bing_background') or "0"
|
||||
local backgroundTable, backgroundCount = fetchMedia("/www" .. themeDir .. "*",themeDir)
|
||||
local backgroundType = "Image"
|
||||
|
||||
function getBing()
|
||||
local bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %bingApiUrl)
|
||||
if (bing and bing ~= '') then
|
||||
bgUrl = bingUrl .. json.parse(bing).images[1].url
|
||||
end
|
||||
end
|
||||
|
||||
if ( useBing == "0" ) then
|
||||
if ( backgroundCount > 0 ) then
|
||||
local currentBg = backgroundTable[math.random(1,backgroundCount)]
|
||||
bgUrl = currentBg.url
|
||||
if (currentBg.type == "mp4" ) then
|
||||
backgroundType = "Video"
|
||||
end
|
||||
end
|
||||
else
|
||||
pcall(getBing)
|
||||
end
|
||||
%>
|
||||
<!-- Login Page Start -->
|
||||
<div class="login-page">
|
||||
|
||||
<%
|
||||
local bg_url = media .. "/img/bg1.jpg"
|
||||
if ( bing_background == "0" ) then
|
||||
if bgcount > 0 then
|
||||
currentBg = bgs[math.random(1,bgcount)]
|
||||
end
|
||||
if ( bgcount > 0 and currentBg.type == "mp4" ) then
|
||||
%>
|
||||
<div class="video">
|
||||
<% if ( backgroundType == "Video" ) then %>
|
||||
<!-- Video Player Start -->
|
||||
<div class="video ar-flex ar-justify-content-center ar-align-items-center">
|
||||
<video autoplay loop muted id="video">
|
||||
<source src="<%=currentBg.url%>" type="video/mp4">
|
||||
<source src="<%=bgUrl%>" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<div class="volume-control mute"></div>
|
||||
<script>
|
||||
$(".volume-control").click(function(){
|
||||
if($(this).hasClass("mute")){
|
||||
$(this).removeClass("mute")
|
||||
$("#video").prop('muted', false);
|
||||
}else{
|
||||
$(this).addClass("mute")
|
||||
$("#video").prop('muted', true);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<% elseif ( bgcount > 0 and currentBg["type"] ~= "mp4") then
|
||||
bg_url = currentBg.url
|
||||
end
|
||||
else
|
||||
local bing = "123"
|
||||
local sys = require "luci.sys"
|
||||
local json = require "luci.jsonc"
|
||||
local remote_bg_url="http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
--bing = sys.httpget(remote_bg_url)
|
||||
bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %remote_bg_url)
|
||||
if (bing and bing ~= '') then
|
||||
bg_url = "https://www.bing.com" .. json.parse(bing).images[1].url
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% if(currentBg["type"] ~= "mp4") then %>
|
||||
<div class="main-bg" id="main-bg" style="background-image:url(<%=bg_url%>)"></div>
|
||||
<!-- Video Player End -->
|
||||
<% else %>
|
||||
<!-- Image Background Start -->
|
||||
<div class="main-bg" id="main-bg" style="background-image:url(<%=bgUrl%>)"></div>
|
||||
<!-- Image Background End -->
|
||||
<% end %>
|
||||
<!-- Login Container Start -->
|
||||
<div class="login-container">
|
||||
<div class="login-form">
|
||||
<a class="brand" href="/"><img src="<%=media%>/img/argonne.svg" class="icon"><span
|
||||
|
@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rblibtorrent
|
||||
PKG_VERSION:=1.2.15
|
||||
PKG_RELEASE=2
|
||||
PKG_VERSION:=1.2.16
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=1b25eb5584db5f335167e6f8beda1ae280f28445
|
||||
PKG_SOURCE_VERSION:=239500acf2bc60dcb91330bf3c21b939d9f603af
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@ -25,7 +25,7 @@ define Package/rblibtorrent
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Rasterbar BitTorrent library
|
||||
URL:=https://www.libtorrent.org/
|
||||
DEPENDS:=+libgcc +libstdcpp +libopenssl +boost +boost-system +boost-chrono +boost-random
|
||||
DEPENDS:=+libgcc +libstdcpp +libopenssl +boost +boost-system +boost-chrono +boost-random +libatomic
|
||||
MAINTAINER:=Arvid Norberg <arvid@libtorrent.org>
|
||||
endef
|
||||
|
||||
|
Reference in New Issue
Block a user