update 2022-11-06 09:00:18

This commit is contained in:
github-actions[bot] 2022-11-06 09:00:18 +08:00
parent f4913703e9
commit 86c005d02a
7 changed files with 984 additions and 228 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.45.69
PKG_VERSION:=0.45.70
PKG_RELEASE:=beta
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>

View File

@ -616,12 +616,12 @@ function sub_info_get()
day_left = 0
end
if used and total and used <= total then
percent = string.format("%.1f",(used/total)*100) or nil
if used and total and used < total then
percent = string.format("%.1f",((total-used)/total)*100) or nil
elseif used == nil or total == nil or total == 0 then
percent = 0
else
percent = 100
else
percent = 0
end
total = fs.filesize(total) or "null"
used = fs.filesize(used) or "null"

View File

@ -60,7 +60,7 @@ function sub_info_get_<%=idname%>()
}
else {
//document.getElementById('<%=idname%>').innerHTML = "<%:Plan Traffic%>" + ": " + "<span style=color:green>" + save_info.used + "</span> | <span style=color:green>" + save_info.total + "</span> <br/> <%:Plan Expiration Time%>: " + "<span style=color:green>" + save_info.expire + "</span>";
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((save_info.used), (save_info.total), (save_info.percent ? (100-save_info.percent) : 0), false, false, (save_info.expire), (save_info.day_left ? save_info.day_left : 0));
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((save_info.used), (save_info.total), (save_info.percent ? save_info.percent : 0), false, false, (save_info.expire), (save_info.day_left ? save_info.day_left : 0));
}
};
@ -71,7 +71,7 @@ function sub_info_get_<%=idname%>()
retry_<%=idname%> = 0;
localStorage.setItem("<%=filename%>",JSON.stringify(status));
document.getElementById('<%=idname%>').className = "sub_tab_show";
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((status.used), (status.total), (100-status.percent), false, false, (status.expire), (status.day_left));
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((status.used), (status.total), (status.percent), false, false, (status.expire), (status.day_left));
//document.getElementById('<%=idname%>').innerHTML = "<%:Plan Traffic%>" + ": " + "<span style=color:green>" + status.used + "</span> | <span style=color:green>" + status.total + "</span> <br/> <%:Plan Expiration Time%>: " + "<span style=color:green>" + status.expire + "</span>";
}
else if ( x && x.status == 200 && status.sub_info == "No Sub Info Found" ) {

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v0.45.69-beta"><title>Current Version: v0.45.69-beta</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="186" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="97" height="20" fill="#555"/><rect x="97" width="89" height="20" fill="#007ec6"/><rect width="186" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="870">Current Version</text><text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="870">Current Version</text><text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="790">v0.45.69-beta</text><text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="790">v0.45.69-beta</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v0.45.70-beta"><title>Current Version: v0.45.70-beta</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="186" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="97" height="20" fill="#555"/><rect x="97" width="89" height="20" fill="#007ec6"/><rect width="186" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="870">Current Version</text><text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="870">Current Version</text><text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="790">v0.45.70-beta</text><text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="790">v0.45.70-beta</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -868,7 +868,13 @@ stop() {
fi
$PS -w | grep -v "grep" | grep ssr-monitor | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
$PS -w | grep -v "grep" | grep "sleep 0000" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
$PS -w | grep -v "grep" | grep "$TMP_PATH" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
( \
# Graceful kill first, so programs have the chance to stop its subprocesses
$PS -w | grep -v "grep" | grep "$TMP_PATH" | awk '{print $1}' | xargs kill >/dev/null 2>&1 ; \
sleep 3s; \
# Force kill hanged programs
$PS -w | grep -v "grep" | grep "$TMP_PATH" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 ; \
)
killall -q -9 v2ray-plugin obfs-local xray-plugin
rm -f /var/lock/ssr-monitor.lock
if [ -f "/tmp/dnsmasq.d/dnsmasq-ssrplus.conf" ]; then

View File

@ -1,10 +0,0 @@
uci -q batch <<EOF
set bypass.@global[0].dports='1'
commit bypass
set shadowsocksr.@global[0].dports='1'
commit shadowsocksr
set passwall.@global_forwarding[0].udp_redir_ports='1:65535'
commit passwall
set passwall2.@global_forwarding[0].udp_redir_ports='1:65535'
commit passwall2
EOF