Skip to content

Commit

Permalink
update 05-06 23:44:05
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 6, 2022
1 parent 40e3346 commit cf2d19e
Show file tree
Hide file tree
Showing 29 changed files with 360 additions and 305 deletions.
2 changes: 1 addition & 1 deletion aliyundrive-fuse/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=aliyundrive-fuse
PKG_VERSION:=0.1.10
PKG_VERSION:=0.1.11
PKG_RELEASE:=$(AUTORELEASE)

PKG_LICENSE:=MIT
Expand Down
1 change: 1 addition & 0 deletions aliyundrive-fuse/files/aliyundrive-fuse.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ config default
option domain_id ''
option mount_point '/mnt/aliyundrive'
option read_buffer_size '10485760'
option allow_other '1'
5 changes: 5 additions & 0 deletions aliyundrive-fuse/files/aliyundrive-fuse.init
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ start_service() {
local domain_id=$(uci_get_by_type default domain_id)
local mount_point=$(uci_get_by_type default mount_point)
local read_buf_size=$(uci_get_by_type default read_buffer_size 10485760)
local allow_other=$(uci_get_by_type default allow_other 0)

local extra_options=""

if [[ ! -z "$domain_id" ]]; then
extra_options="$extra_options --domain-id $domain_id"
fi

if [ "$allow_other" = "1" ]; then
extra_options="$extra_options --allow-other"
fi

mkdir -p "$mount_point"
procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options -S $read_buf_size --workdir /var/run/$NAME $mount_point >>/var/log/$NAME.log 2>&1"
Expand Down
2 changes: 1 addition & 1 deletion luci-app-aliyundrive-fuse/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-aliyundrive-fuse
PKG_VERSION:=0.1.10
PKG_VERSION:=0.1.11
PKG_RELEASE:=1
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ read_buffer_size.datatype = "uinteger"
domain_id = e:option(Value, "domain_id", translate("Domain ID"))
domain_id.description = translate("Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>")

allow_other = e:option(Flag, "allow_other", translate("Allow Other users Access"))
allow_other.description = translate("Allow other users to access the drive, enable this if you share with samba")
allow_other.rmempty = false

debug = e:option(Flag, "debug", translate("Debug Mode"))
debug.rmempty = false

Expand Down
6 changes: 6 additions & 0 deletions luci-app-aliyundrive-fuse/po/zh-cn/aliyundrive-fuse.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ msgstr "阿里云相册与云盘服务 domainId"

msgid "Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>"
msgstr "填写此选项将使用<a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">阿里云相册与网盘服务</a>而不是<a href=\"https://www.aliyundrive.com\" target=\"_blank\">阿里云盘</a>"

msgid "Allow Other users Access"
msgstr "允许其他用户访问"

msgid "Allow other users to access the drive, enable this if you share with samba"
msgstr "允许其他用户访问此驱动,如果你想用Samba分享请开启此开关"
2 changes: 1 addition & 1 deletion luci-app-openclash/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.45.12
PKG_VERSION:=0.45.16
PKG_RELEASE:=beta
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>

Expand Down
114 changes: 66 additions & 48 deletions luci-app-openclash/luasrc/controller/openclash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function index()
entry({"admin", "services", "openclash", "lastversion"},call("action_lastversion"))
entry({"admin", "services", "openclash", "save_corever_branch"},call("action_save_corever_branch"))
entry({"admin", "services", "openclash", "update"},call("action_update"))
entry({"admin", "services", "openclash", "update_info"},call("action_update_info"))
entry({"admin", "services", "openclash", "update_ma"},call("action_update_ma"))
entry({"admin", "services", "openclash", "opupdate"},call("action_opupdate"))
entry({"admin", "services", "openclash", "coreupdate"},call("action_coreupdate"))
Expand Down Expand Up @@ -89,6 +90,10 @@ local fs = require "luci.openclash"
local json = require "luci.jsonc"
local uci = require("luci.model.uci").cursor()
local datatype = require "luci.cbi.datatypes"
local opkg
if pcall(require, "luci.model.ipkg") then
opkg = require "luci.model.ipkg"
end

local core_path_mode = uci:get("openclash", "config", "small_flash_memory")
if core_path_mode ~= "1" then
Expand Down Expand Up @@ -193,42 +198,45 @@ local function startlog()
line_trans = info
if string.len(info) > 0 then
if not string.find (info, "") and not string.find (info, "") then
line_trans = luci.i18n.translate(string.sub(info, 0, -1))
else
line_trans = trans_line(info)
line_trans = luci.i18n.translate(string.sub(info, 0, -1))
else
line_trans = trans_line(info)
end
end
end
end
return line_trans
end

local function coremodel()
local coremodel = luci.sys.exec("opkg status libc 2>/dev/null |grep 'Architecture' |awk -F ': ' '{print $2}' 2>/dev/null")
return coremodel
if opkg and opkg.info("libc") and opkg.info("libc")["libc"] then
return opkg.info("libc")["libc"]["Architecture"]
else
return luci.sys.exec("opkg status libc 2>/dev/null |grep 'Architecture' |awk -F ': ' '{print $2}' 2>/dev/null")
end
end

local function corecv()
if not nixio.fs.access(dev_core_path) then
return "0"
else
return luci.sys.exec(string.format("%s -v 2>/dev/null |awk -F ' ' '{print $2}'",dev_core_path))
end
if not nixio.fs.access(dev_core_path) then
return "0"
else
return luci.sys.exec(string.format("%s -v 2>/dev/null |awk -F ' ' '{print $2}'",dev_core_path))
end
end

local function coretuncv()
if not nixio.fs.access(tun_core_path) then
return "0"
else
return luci.sys.exec(string.format("%s -v 2>/dev/null |awk -F ' ' '{print $2}'",tun_core_path))
end
if not nixio.fs.access(tun_core_path) then
return "0"
else
return luci.sys.exec(string.format("%s -v 2>/dev/null |awk -F ' ' '{print $2}'",tun_core_path))
end
end

local function coremetacv()
if not nixio.fs.access(meta_core_path) then
return "0"
else
return luci.sys.exec(string.format("%s -v 2>/dev/null |awk -F ' ' '{print $3}'",meta_core_path))
end
if not nixio.fs.access(meta_core_path) then
return "0"
else
return luci.sys.exec(string.format("%s -v 2>/dev/null |awk -F ' ' '{print $3}'",meta_core_path))
end
end

local function corelv()
Expand All @@ -240,18 +248,22 @@ local function corelv()
end

local function opcv()
return luci.sys.exec("opkg status luci-app-openclash 2>/dev/null |grep 'Version' |awk -F 'Version: ' '{print \"v\"$2}'")
if opkg and opkg.info("luci-app-openclash") and opkg.info("luci-app-openclash")["luci-app-openclash"] then
return "v" .. opkg.info("luci-app-openclash")["luci-app-openclash"]["Version"]
else
return luci.sys.exec("opkg status luci-app-openclash 2>/dev/null |grep 'Version' |awk -F 'Version: ' '{print \"v\"$2}'")
end
end

local function oplv()
local new = luci.sys.call(string.format("sh /usr/share/openclash/openclash_version.sh"))
local oplv = luci.sys.exec("sed -n 1p /tmp/openclash_last_version 2>/dev/null")
return oplv .. "," .. new
local new = luci.sys.call(string.format("sh /usr/share/openclash/openclash_version.sh"))
local oplv = luci.sys.exec("sed -n 1p /tmp/openclash_last_version 2>/dev/null")
return oplv .. "," .. new
end

local function opup()
luci.sys.call("rm -rf /tmp/*_last_version 2>/dev/null && sh /usr/share/openclash/openclash_version.sh >/dev/null 2>&1")
return luci.sys.call("sh /usr/share/openclash/openclash_update.sh >/dev/null 2>&1 &")
luci.sys.call("rm -rf /tmp/*_last_version 2>/dev/null && sh /usr/share/openclash/openclash_version.sh >/dev/null 2>&1")
return luci.sys.call("sh /usr/share/openclash/openclash_update.sh >/dev/null 2>&1 &")
end

local function coreup()
Expand Down Expand Up @@ -282,18 +294,18 @@ local function save_corever_branch()
end

local function upchecktime()
local corecheck = os.date("%Y-%m-%d %H:%M:%S",fs.mtime("/tmp/clash_last_version"))
local opcheck
if not corecheck or corecheck == "" then
opcheck = os.date("%Y-%m-%d %H:%M:%S",fs.mtime("/tmp/openclash_last_version"))
if not opcheck or opcheck == "" then
return "1"
else
return opcheck
end
else
return corecheck
end
local corecheck = os.date("%Y-%m-%d %H:%M:%S",fs.mtime("/tmp/clash_last_version"))
local opcheck
if not corecheck or corecheck == "" then
opcheck = os.date("%Y-%m-%d %H:%M:%S",fs.mtime("/tmp/openclash_last_version"))
if not opcheck or opcheck == "" then
return "1"
else
return opcheck
end
else
return corecheck
end
end

local function historychecktime()
Expand All @@ -310,18 +322,18 @@ end

function download_rule()
local filename = luci.http.formvalue("filename")
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',filename))
return state
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',filename))
return state
end

function download_disney_domains()
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',"disney_domains"))
return state
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',"disney_domains"))
return state
end

function download_netflix_domains()
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',"netflix_domains"))
return state
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',"netflix_domains"))
return state
end

function action_flush_fakeip_cache()
Expand Down Expand Up @@ -936,19 +948,25 @@ end
function action_update()
luci.http.prepare_content("application/json")
luci.http.write_json({
coremodel = coremodel(),
corecv = corecv(),
coretuncv = coretuncv(),
coremetacv = coremetacv(),
coremodel = coremodel(),
opcv = opcv(),
corever = corever(),
release_branch = release_branch(),
upchecktime = upchecktime(),
corelv = corelv(),
oplv = oplv();
})
end

function action_update_info()
luci.http.prepare_content("application/json")
luci.http.write_json({
corever = corever(),
release_branch = release_branch();
})
end

function action_update_ma()
luci.http.prepare_content("application/json")
luci.http.write_json({
Expand Down
19 changes: 10 additions & 9 deletions luci-app-openclash/luasrc/view/openclash/status.htm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<%
local uci = require("luci.model.uci").cursor()
local RELEASE_BRANCH = uci:get("openclash", "config", "release_branch")
local random = tostring(os.time()):reverse():sub(1, 9)
%>
<fieldset class="cbi-section">
<table width="100%">
Expand All @@ -38,30 +39,30 @@
<%
if uci:get("openclash", "config", "enable_meta_core") ~= '1' then
%>
<img id="logo" src="https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/logo.png" loading="lazy" onerror="return imgerrorfuns(this,'/luci-static/resources/openclash/img/logo.png')" title="Hello, World!" alt="OpenClash" onclick="return homepage()" />
<img id="logo" src="https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/logo.png" loading="lazy" onerror="return imgerrorfuns(this,'/luci-static/resources/openclash/img/logo.png?<%=random%>')" title="Hello, World!" alt="OpenClash" onclick="return homepage()" />
<%
else
%>
<img id="logo" src="https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/meta.png" loading="lazy" onerror="return imgerrorfuns(this,'/luci-static/resources/openclash/img/meta.png')" title="Hello, World!" alt="OpenClash" onclick="return homepage()" />
<img id="logo" src="https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/meta.png" loading="lazy" onerror="return imgerrorfuns(this,'/luci-static/resources/openclash/img/meta.png?<%=random%>')" title="Hello, World!" alt="OpenClash" onclick="return homepage()" />
<%
end
%>
</p>
<p id="_clashversion" style="margin: 10px 0; text-align: center">
<img src="/luci-static/resources/openclash/img/version.svg" onerror="return imgerrorfuns(this,'https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/version.png')" alt="currentversion" height="21px" onclick="return go_update()">
<img src="/luci-static/resources/openclash/img/version.svg?<%=random%>" onerror="return imgerrorfuns(this,'https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/version.png')" alt="currentversion" height="21px" onclick="return go_update()">
</p>
</td></tr>
<tr><td colspan="4" width="100%">
<p style="margin: 10px 0; text-align: center">
<img id="gitbook" src="/luci-static/resources/openclash/img/Wiki.svg" loading="lazy" alt="GitBook" width="50px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Wiki--lightgrey?logo=GitBook&style=social')" onclick="return gitbookpage()" />
<img id="gitbook" src="/luci-static/resources/openclash/img/Wiki.svg?<%=random%>" loading="lazy" alt="GitBook" width="50px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Wiki--lightgrey?logo=GitBook&style=social')" onclick="return gitbookpage()" />
&nbsp;&nbsp;&nbsp;
<img id="wiki" src="/luci-static/resources/openclash/img/Tutorials.svg" loading="lazy" alt="Wiki" width="75px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Tutorials--lightgrey?logo=Wikipedia&style=social')" onclick="return wikipage()" />
<img id="wiki" src="/luci-static/resources/openclash/img/Tutorials.svg?<%=random%>" loading="lazy" alt="Wiki" width="75px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Tutorials--lightgrey?logo=Wikipedia&style=social')" onclick="return wikipage()" />
&nbsp;&nbsp;&nbsp;
<img id="star" src="/luci-static/resources/openclash/img/Star.svg" loading="lazy" alt="star" width="50px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Star--lightgrey?logo=github&style=social')" onclick="return homepage()" />
<img id="star" src="/luci-static/resources/openclash/img/Star.svg?<%=random%>g" loading="lazy" alt="star" width="50px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Star--lightgrey?logo=github&style=social')" onclick="return homepage()" />
&nbsp;&nbsp;&nbsp;
<img id="telegram" src="/luci-static/resources/openclash/img/Telegram.svg" loading="lazy" alt="Telegram" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Telegram--lightgrey?logo=Telegram&style=social')" onclick="return telegrampage()" />
<img id="telegram" src="/luci-static/resources/openclash/img/Telegram.svg?<%=random%>" loading="lazy" alt="Telegram" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Telegram--lightgrey?logo=Telegram&style=social')" onclick="return telegrampage()" />
&nbsp;&nbsp;&nbsp;
<img id="sponsor" src="/luci-static/resources/openclash/img/Sponsor.svg" loading="lazy" alt="Sponsor" width="73px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Sponsor--lightgrey?logo=ko-fi&style=social')" onclick="return sponsorpage()" />
<img id="sponsor" src="/luci-static/resources/openclash/img/Sponsor.svg?<%=random%>" loading="lazy" alt="Sponsor" width="73px" height="20px" onerror="return imgerrorfuns(this,'https://img.shields.io/badge/Sponsor--lightgrey?logo=ko-fi&style=social')" onclick="return sponsorpage()" />
</p>
</td></tr>
<tr><td width="100%" colspan="4">
Expand Down Expand Up @@ -877,7 +878,7 @@

function clashversion_error()
{
clashversion.innerHTML = '<img id="clashversion" src="/https/github.com/luci-static/resources/openclash/img/version.svg" alt="currentversion" height="21px" onerror="return imgerrorfuns(this,\'https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/version.png\')" onclick="return go_update()">';
clashversion.innerHTML = '<img id="clashversion" src="/https/github.com/luci-static/resources/openclash/img/version.svg?<%=random%>" alt="currentversion" height="21px" onerror="return imgerrorfuns(this,\'https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/o/op/openclash/<%=RELEASE_BRANCH%>/img/version.png\')" onclick="return go_update()">';
};

function imgerrorfuns(imgobj,imgSrc){
Expand Down
Loading

0 comments on commit cf2d19e

Please sign in to comment.