update 2023-11-19 23:34:57
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-openclash
|
||||
PKG_VERSION:=0.45.141
|
||||
PKG_VERSION:=0.45.152
|
||||
PKG_RELEASE:=beta
|
||||
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
|
||||
|
||||
@ -13,6 +13,9 @@ define Package/$(PKG_NAME)/config
|
||||
config PACKAGE_kmod-inet-diag
|
||||
default y if PACKAGE_$(PKG_NAME)
|
||||
|
||||
config PACKAGE_luci-compat
|
||||
default y if PACKAGE_$(PKG_NAME)
|
||||
|
||||
config PACKAGE_kmod-nft-tproxy
|
||||
default y if PACKAGE_firewall4
|
||||
|
||||
@ -97,6 +100,7 @@ endef
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
sed -i "s/v0.00.00-beta/v$(PKG_VERSION)-beta/g" /www/luci-static/resources/openclash/img/version.svg >/dev/null 2>&1
|
||||
/etc/init.d/network restart >/dev/null 2>&1 &
|
||||
exit 0
|
||||
endef
|
||||
|
||||
@ -135,10 +139,15 @@ define Package/$(PKG_NAME)/postrm
|
||||
rm -rf /tmp/openclash_edit_file_name >/dev/null 2>&1
|
||||
rm -rf /tmp/openclash_*_region>/dev/null 2>&1
|
||||
sed -i '/OpenClash Append/,/OpenClash Append End/d' "/usr/lib/lua/luci/model/network.lua" >/dev/null 2>&1
|
||||
sed -i '/.*kB maximum content size*/c\HTTP_MAX_CONTENT = 1024*100 -- 100 kB maximum content size' /usr/lib/lua/luci/http.lua >/dev/null 2>&1
|
||||
sed -i '/.*kB maximum content size*/c\export let HTTP_MAX_CONTENT = 1024*100; // 100 kB maximum content size' /usr/share/ucode/luci/http.uc >/dev/null 2>&1
|
||||
uci -q delete firewall.openclash
|
||||
uci -q commit firewall
|
||||
uci -q delete ucitrack.@openclash[-1]
|
||||
uci -q commit ucitrack
|
||||
uci -q delete network.utun
|
||||
uci -q commit network
|
||||
/etc/init.d/network restart >/dev/null 2>&1 &
|
||||
rm -rf /tmp/luci-*
|
||||
exit 0
|
||||
endef
|
||||
|
@ -994,7 +994,7 @@ function action_switch_dashboard()
|
||||
uci:set("openclash", "config", "dashboard_type", "Meta")
|
||||
uci:commit("openclash")
|
||||
end
|
||||
elseif tonumber(state) == 1 then
|
||||
elseif switch_name == "Yacd" and tonumber(state) == 1 then
|
||||
if switch_type == "Official" then
|
||||
uci:set("openclash", "config", "yacd_type", "Official")
|
||||
uci:commit("openclash")
|
||||
|
@ -266,7 +266,15 @@ o.description = font_red..bold_on..translate("TCP Concurrent Request IPs, Choose
|
||||
o.default = "0"
|
||||
|
||||
o = s:taboption("meta", Flag, "enable_unified_delay", font_red..bold_on..translate("Enable Unified Delay")..bold_off..font_off)
|
||||
o.description = font_red..bold_on..translate("Change the delay calculation method to remove extra delays such as handshaking")..bold_off..font_off
|
||||
o.description = font_red..bold_on..translate("Change The Delay Calculation Method To Remove Extra Delays Such as Handshaking")..bold_off..font_off
|
||||
o.default = "0"
|
||||
|
||||
o = s:taboption("meta", ListValue, "keep_alive_interval", font_red..bold_on..translate("TCP Keep-alive Interval(s)")..bold_off..font_off)
|
||||
o.description = font_red..bold_on..translate("Change The TCP Keep-alive Interval, Selecting a Larger Value Avoids Abnormal Resource Consumption")..bold_off..font_off
|
||||
o:value("0", translate("Disable"))
|
||||
o:value("15")
|
||||
o:value("1800")
|
||||
o:value("3600")
|
||||
o.default = "0"
|
||||
|
||||
o = s:taboption("meta", ListValue, "find_process_mode", translate("Enable Process Rule"))
|
||||
|
@ -82,7 +82,15 @@ if token then
|
||||
fs.unlink(sub_path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
---- UA
|
||||
o = s:option(Value, "sub_ua", "User-Agent")
|
||||
o.description = font_red..bold_on..translate("Used for Downloading Subscriptions, Defaults to Clash")..bold_off..font_off
|
||||
o:value("Clash")
|
||||
o:value("clash.meta")
|
||||
o.default = "Clash"
|
||||
o.rmempty = true
|
||||
|
||||
---- subconverter
|
||||
o = s:option(Flag, "sub_convert", translate("Subscribe Convert Online"))
|
||||
o.description = translate("Convert Subscribe Online With Template")
|
||||
|
@ -159,8 +159,7 @@ HTTP.setfilehandler(
|
||||
)
|
||||
|
||||
if HTTP.formvalue("upload") then
|
||||
local f = HTTP.formvalue("ulfile")
|
||||
if #f <= 0 then
|
||||
if not um.value then
|
||||
um.value = translate("No Specify Upload File")
|
||||
end
|
||||
end
|
||||
|
@ -80,7 +80,7 @@ o.rmempty = false
|
||||
o.default = o.disbled
|
||||
|
||||
---- Proxy group
|
||||
o = s:option(Value, "specific_group", translate("Specific Group"))
|
||||
o = s:option(Value, "specific_group", translate("Specific Group (Support Regex)"))
|
||||
o.description = translate("Group Use For Proxy The DNS")..translate("(Only Meta Core)")
|
||||
o:depends("group", "nameserver")
|
||||
o:depends("group", "fallback")
|
||||
|
@ -135,6 +135,7 @@ o:value("vmess", translate("Vmess"))
|
||||
o:value("trojan", translate("trojan"))
|
||||
o:value("vless", translate("Vless ")..translate("(Only Meta Core)"))
|
||||
o:value("hysteria", translate("Hysteria ")..translate("(Only Meta Core)"))
|
||||
o:value("hysteria2", translate("Hysteria2 ")..translate("(Only Meta Core)"))
|
||||
o:value("wireguard", translate("WireGuard")..translate("(TUN&Meta Core)"))
|
||||
o:value("tuic", translate("Tuic")..translate("(Only Meta Core)"))
|
||||
o:value("snell", translate("Snell"))
|
||||
@ -169,6 +170,7 @@ o.rmempty = false
|
||||
o:depends("type", "ss")
|
||||
o:depends("type", "ssr")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ Tuic ]]--
|
||||
o = s:option(Value, "tc_ip", translate("Server IP"))
|
||||
@ -285,11 +287,13 @@ o = s:option(Value, "hysteria_up", translate("up"))
|
||||
o.rmempty = false
|
||||
o.description = translate("Required")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
o = s:option(Value, "hysteria_down", translate("down"))
|
||||
o.rmempty = false
|
||||
o.description = translate("Required")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
o = s:option(Value, "psk", translate("Psk"))
|
||||
o.rmempty = true
|
||||
@ -544,6 +548,7 @@ o:depends("type", "http")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "vless")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
o:depends("type", "tuic")
|
||||
|
||||
-- [[ TLS ]]--
|
||||
@ -590,6 +595,7 @@ o.rmempty = true
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "http")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ headers ]]--
|
||||
o = s:option(DynamicList, "http_headers", translate("headers"))
|
||||
@ -622,6 +628,7 @@ o.rmempty = false
|
||||
o:value("h3")
|
||||
o:value("h2")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ trojan-ws-path ]]--
|
||||
o = s:option(Value, "trojan_ws_path", translate("Path"))
|
||||
@ -638,8 +645,15 @@ o:depends("obfs_trojan", "ws")
|
||||
-- [[ hysteria_obfs ]]--
|
||||
o = s:option(Value, "hysteria_obfs", translate("obfs"))
|
||||
o.rmempty = true
|
||||
o.placeholder = translate("yourpassword")
|
||||
o.placeholder = translate("obfs-str")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ hysteria_obfs_password ]]--
|
||||
o = s:option(Value, "hysteria_obfs_password", translate("obfs-password"))
|
||||
o.rmempty = true
|
||||
o.placeholder = translate("yourpassword")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ hysteria_auth ]]--
|
||||
--o = s:option(Value, "hysteria_auth", translate("auth"))
|
||||
@ -658,12 +672,14 @@ o = s:option(Value, "hysteria_ca", translate("ca"))
|
||||
o.rmempty = true
|
||||
o.placeholder = translate("./my.ca")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ hysteria_ca_str ]]--
|
||||
o = s:option(Value, "hysteria_ca_str", translate("ca_str"))
|
||||
o.rmempty = true
|
||||
o.placeholder = translate("xyz")
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
|
||||
-- [[ recv_window_conn ]]--
|
||||
o = s:option(Value, "recv_window_conn", translate("recv_window_conn"))
|
||||
@ -719,7 +735,7 @@ o:value("true")
|
||||
o:value("false")
|
||||
o:depends("type", "vmess")
|
||||
|
||||
-- [[ TFO ]]--
|
||||
-- [[ Fast Open ]]--
|
||||
o = s:option(ListValue, "fast_open", translate("Fast Open"))
|
||||
o.rmempty = true
|
||||
o.default = "true"
|
||||
@ -747,6 +763,7 @@ o:depends("type", "snell")
|
||||
o = s:option(Value, "fingerprint", translate("Fingerprint")..translate("(Only Meta Core)"))
|
||||
o.rmempty = true
|
||||
o:depends("type", "hysteria")
|
||||
o:depends("type", "hysteria2")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "http")
|
||||
o:depends("type", "trojan")
|
||||
@ -924,4 +941,5 @@ o.write = function()
|
||||
end
|
||||
|
||||
m:append(Template("openclash/toolbar_show"))
|
||||
m:append(Template("openclash/config_editor"))
|
||||
return m
|
||||
|
@ -25,6 +25,7 @@ m.description = translate("Note: To restore the default configuration, try acces
|
||||
"<br/>"..font_green..translate("Note: Turning on secure DNS in the browser will cause abnormal shunting, please be careful to turn it off")..font_off..
|
||||
"<br/>"..font_green..translate("Note: Some software will modify the device HOSTS, which will cause abnormal shunt, please pay attention to check")..font_off..
|
||||
"<br/>"..font_green..translate("Note: Game proxy please use nodes except Vmess")..font_off..
|
||||
"<br/>"..font_green..translate("Note: If you need to perform client access control in Fake-ip mode, please change the DNS hijacking mode to firewall forwarding")..font_off..
|
||||
"<br/>"..translate("Note: The default proxy routes local traffic, BT, PT download, etc., please use redir mode as much as possible and pay attention to traffic avoidance")..
|
||||
"<br/>"..translate("Note: If the connection is abnormal, please follow the steps on this page to check first")..": ".."<a href='javascript:void(0)' onclick='javascript:return winOpen(\"https://github.com/vernesong/OpenClash/wiki/%E7%BD%91%E7%BB%9C%E8%BF%9E%E6%8E%A5%E5%BC%82%E5%B8%B8%E6%97%B6%E6%8E%92%E6%9F%A5%E5%8E%9F%E5%9B%A0\")'>"..translate("Click to the page").."</a>"
|
||||
|
||||
@ -48,7 +49,7 @@ s:tab("debug", translate("Debug Logs"))
|
||||
s:tab("dlercloud", translate("Dler Cloud"))
|
||||
|
||||
o = s:taboption("op_mode", Flag, "enable_meta_core", font_red..bold_on..translate("Enable Meta Core")..bold_off..font_off)
|
||||
o.description = font_red..bold_on..translate("Some Premium Core Features are Unavailable, For Other More Useful Functions Go Wiki:")..bold_off..font_off.." ".."<a href='javascript:void(0)' onclick='javascript:return winOpen(\"https://clash-meta.wiki/\")'>https://clash-meta.wiki/</a>"
|
||||
o.description = font_red..bold_on..translate("Some Premium Core Features are Unavailable, For Other More Useful Functions Go Wiki:")..bold_off..font_off.." ".."<a href='javascript:void(0)' onclick='javascript:return winOpen(\"https://wiki.metacubex.one/\")'>https://wiki.metacubex.one/</a>"
|
||||
o.default = 0
|
||||
|
||||
o = s:taboption("op_mode", ListValue, "en_mode", font_red..bold_on..translate("Select Mode")..bold_off..font_off)
|
||||
@ -1111,6 +1112,10 @@ o = s:taboption("dashboard", DummyValue, "Yacd", translate("Switch(Update) Yacd
|
||||
o.template="openclash/switch_dashboard"
|
||||
o.rawhtml = true
|
||||
|
||||
o = s:taboption("dashboard", DummyValue, "Metacubexd", translate("Update Metacubexd Version"))
|
||||
o.template="openclash/switch_dashboard"
|
||||
o.rawhtml = true
|
||||
|
||||
---- ipv6
|
||||
o = s:taboption("ipv6", Flag, "ipv6_enable", translate("Proxy IPv6 Traffic"))
|
||||
o.description = font_red..bold_on..translate("The Gateway and DNS of The Connected Device Must be The Router IP, Disable IPv6 DHCP To Avoid Abnormal Connection If You Do Not Use")..bold_off..font_off
|
||||
|
@ -316,6 +316,11 @@ function other_log_area(id, readOnly, wid, height)
|
||||
other_log_area.markText({line:0,ch:0},{line:9999,ch:9999}, {css: 'font-size:13px'});
|
||||
};
|
||||
|
||||
var custom_cfg_value = document.getElementById("cbid.openclash." + window.location.pathname.split("/")[window.location.pathname.split("/").length - 1] + ".other_parameters");
|
||||
if (custom_cfg_value) {
|
||||
editor(custom_cfg_value, 'false', '100%', '300px');
|
||||
};
|
||||
|
||||
var custom_firewall = document.getElementById("cbid.openclash.config.firewall_custom");
|
||||
var custom_ymchange = document.getElementById("cbid.openclash.config.ymchange_custom");
|
||||
if (custom_firewall) {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<%+cbi/valueheader%>
|
||||
<div style="text-align: center; margin:0 auto; display: block; width: 100%; height: 50px; text-overflow: ellipsis;">
|
||||
<div>
|
||||
<%:Note: Please Upload File According To File Type, File Will Be Saved To The Prompt Path%>
|
||||
</div>
|
||||
<div style="color: green; transform:translateY(100%);">
|
||||
<%
|
||||
local val = self:cfgvalue(section) or self.default or ""
|
||||
write(pcdata(val))
|
||||
%>
|
||||
</div>
|
||||
<div style="text-align: center; margin:2% auto; display: block; width: 100%; text-overflow: ellipsis;">
|
||||
<div>
|
||||
<%:Note: Please Upload File According To File Type, File Will Be Saved To The Prompt Path%>
|
||||
</div>
|
||||
<div style="color: green; margin-top: 1%;">
|
||||
<%
|
||||
local val = self:cfgvalue(section) or self.default or ""
|
||||
write(pcdata(val))
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
<%+cbi/valuefooter%>
|
||||
|
@ -87,8 +87,9 @@
|
||||
<input type="radio" id="direct" name="radios" value="direct" onclick="return switch_rule_mode(this.value)"/>
|
||||
<label for="direct">Direct</label>
|
||||
</span></td><td width="25%"><%:Control Panel Login Secret%></td><td width="25%" align="left" id="_dase"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"><%:Yacd Control Panel%></td><td width="25%" align="left" id="_web"><%:Collecting data...%></td><td width="25%"><%:Dashboard Control Panel%></td><td width="25%" align="left" id="_webo"><%:Collecting data...%></td></tr>
|
||||
<tr id="tool_label2"><td colspan="4"><div style="margin: 10px 0; text-align: center">
|
||||
<tr><td colspan="4"><div style="margin: 10px 0; text-align: center"><span id="_web" style="width: 33%; display: inline-block;"></span><span id="_webm" style="width: 33%; display: inline-block;"><%:Collecting data...%></span><span id="_webo" style="width: 33%; display: inline-block;"></span></div></td></tr>
|
||||
<tr id="tool_label2"><td colspan="4">
|
||||
<div style="margin: 10px 0; text-align: center">
|
||||
<span>
|
||||
<%:Up:%>
|
||||
<span id="upload_">
|
||||
@ -152,27 +153,28 @@
|
||||
</span>
|
||||
|
||||
</span>
|
||||
</div></td></tr>
|
||||
<tr height="50px">
|
||||
<td width="100%" colspan="4">
|
||||
<div id="hid_btn" style="height: 25px;width: 100px;margin: 0 auto;" onclick="hid_btn_action()">
|
||||
<div style="margin: 0 auto; top: 50%;" class="dot-typing"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="hid_1"><td width="100%" colspan="4"><p style="margin: 10px 0; text-align: center"><b><%:Quick Operation%></b></p></td></tr>
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr height="50px">
|
||||
<td width="100%" colspan="4">
|
||||
<div id="hid_btn" style="height: 25px;width: 100px;margin: 0 auto;" onclick="hid_btn_action()">
|
||||
<div style="margin: 0 auto; top: 50%;" class="dot-typing"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="hid_1"><td width="100%" colspan="4"><p style="margin: 10px 0; text-align: center"><b><%:Quick Operation%></b></p></td></tr>
|
||||
<tr id="hid_2">
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_close_all_connection"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_reload_firewall"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_flush_fakeip_cache"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_subscribe"><%:Collecting data...%></p></td>
|
||||
</tr>
|
||||
<tr id="hid_3">
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_other_rules"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_geoip"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_geosite"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_one_key_update"><%:Collecting data...%></p></td>
|
||||
</tr>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_close_all_connection"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_reload_firewall"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_flush_fakeip_cache"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_subscribe"><%:Collecting data...%></p></td>
|
||||
</tr>
|
||||
<tr id="hid_3">
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_other_rules"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_geoip"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_geosite"><%:Collecting data...%></p></td>
|
||||
<td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_one_key_update"><%:Collecting data...%></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset id="state" class="cbi-section">
|
||||
@ -193,6 +195,7 @@
|
||||
var mode = document.getElementById('_mode');
|
||||
var web = document.getElementById('_web');
|
||||
var webo = document.getElementById('_webo');
|
||||
var webm = document.getElementById('_webm');
|
||||
var watchdog = document.getElementById('_watchdog');
|
||||
var daip = document.getElementById('_daip');
|
||||
var dase = document.getElementById('_dase');
|
||||
@ -257,8 +260,9 @@
|
||||
}
|
||||
watchdog.innerHTML = status.watchdog ? ' | <%:Daemons%>: <b style=color:green><%:Running%></b>' : ' | <%:Daemons%>: <b style=color:red><%:Not Running%></b>';
|
||||
dase.innerHTML = status.dase ? "<b style=color:green>"+status.dase+"</b>" : "<b style=color:red>"+"<%:Not Set%>"+"</b>";
|
||||
web.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Open Panel%>" onclick="return ycad_dashboard(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
webo.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Open Panel%>" onclick="return net_dashboard(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
web.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Yacd Control Panel%>" onclick="return ycad_dashboard(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
webo.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Dashboard Control Panel%>" onclick="return net_dashboard(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
webm.innerHTML = status.web ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Metacubexd Control Panel%>" onclick="return meta_dashboard(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
close_all_connection.innerHTML = status.clash ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Close All Connections%>" onclick="return b_close_all_connection(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
reload_firewall.innerHTML = status.clash ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Reload Firewall Rules%>" onclick="return b_reload_firewall(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
flush_fakeip_cache.innerHTML = status.clash ? '<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Flush Fake-IP Cache%>" onclick="return b_flush_fakeip_cache(this)"/>' : '<b style=color:red><%:Not Running%></b>';
|
||||
@ -820,11 +824,31 @@
|
||||
});
|
||||
};
|
||||
|
||||
function meta_dashboard(btn)
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Metacubexd Control Panel%>';
|
||||
if (status.daip && window.location.hostname == status.daip) {
|
||||
url9='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/metacubexd/?hostname='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
else if (status.daip && window.location.hostname != status.daip && status.db_foward_domain && status.db_foward_port) {
|
||||
var ui_proto = status.db_forward_ssl == 0 ? 'http://' : 'https://';
|
||||
url9='<%="'+ui_proto+status.db_foward_domain+':'+status.db_foward_port+'/ui/metacubexd/?hostname='+ status.db_foward_domain + '&port=' + status.db_foward_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
else {
|
||||
url9='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/metacubexd/"%>';
|
||||
}
|
||||
winOpen(url9);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
function ycad_dashboard(btn)
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Open Panel%>';
|
||||
btn.value = '<%:Yacd Control Panel%>';
|
||||
if (status.daip && window.location.hostname == status.daip) {
|
||||
url1='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/yacd/?hostname='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
@ -844,7 +868,7 @@
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Open Panel%>';
|
||||
btn.value = '<%:Dashboard Control Panel%>';
|
||||
if (status.daip && window.location.hostname == status.daip) {
|
||||
url2='<%="http://'+window.location.hostname+':'+status.cn_port+'/ui/dashboard/#/?host='+ window.location.hostname + '&port=' + status.cn_port + '&secret=' + status.dase +'"%>';
|
||||
}
|
||||
|
@ -24,6 +24,9 @@
|
||||
switch_dashboard_<%=self.option%>.innerHTML = '<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Switch To Meta Version%>" onclick="return switch_dashboard(this, btn_type_<%=self.option%>, \'Meta\')"/>';
|
||||
}
|
||||
}
|
||||
if ( btn_type_<%=self.option%> == "Metacubexd" ) {
|
||||
switch_dashboard_<%=self.option%>.innerHTML = '<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Update Metacubexd Version%>" onclick="return switch_dashboard(this, btn_type_<%=self.option%>, \'Official\')"/>';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -47,17 +50,25 @@
|
||||
if ( name == "Dashboard" ) {
|
||||
document.getElementById("switch_dashboard_"+name).innerHTML = '<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Switch Successful%> - <%:Switch To Meta Version%>" onclick="return switch_dashboard(this, \'Dashboard\', \'Meta\')"/>';
|
||||
}
|
||||
else
|
||||
else if ( name == "Yacd" )
|
||||
{
|
||||
document.getElementById("switch_dashboard_"+name).innerHTML = '<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Switch Successful%> - <%:Switch To Meta Version%>" onclick="return switch_dashboard(this, \'Yacd\', \'Meta\')"/>';
|
||||
}
|
||||
else{
|
||||
document.getElementById("switch_dashboard_"+name).innerHTML = '<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Update Successful%> - <%:Update Metacubexd Version%>" onclick="return switch_dashboard(this, \'Metacubexd\', \'Official\')"/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( status.download_state == "2" ) {
|
||||
btn.value = '<%:Unzip Error%>';
|
||||
}
|
||||
else {
|
||||
btn.value = '<%:Switch Failed%>';
|
||||
if ( name == "Metacubexd" ) {
|
||||
btn.value = '<%:Update Failed%>';
|
||||
}
|
||||
else {
|
||||
btn.value = '<%:Switch Failed%>';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
<%+cbi/valueheader%>
|
||||
<div style="text-align: center; margin:0 auto; display:block; white-space: nowrap;">
|
||||
<label class="cbi-value" style="display:inline-block; width: 100%;" for="ulfile"><%:Upload File Type%> <%:(Click to select)%>
|
||||
<label class="cbi-value" style="display:inline-block; width: 100%;" for="ulfiles"><%:Upload File Type%> <%:(Click to select)%>
|
||||
<select name="file_type" style="width:auto">
|
||||
<option value="config" selected="selected"><%:Config File%> (.yaml)</option>
|
||||
<option value="proxy-provider"><%:Proxy Provider File%></option>
|
||||
|
@ -1167,6 +1167,9 @@ msgstr "Yacd 控制面板"
|
||||
msgid "Dashboard Control Panel"
|
||||
msgstr "Dashboard 控制面板"
|
||||
|
||||
msgid "Metacubexd Control Panel"
|
||||
msgstr "Metacubexd 控制面板"
|
||||
|
||||
msgid "Control Panel Login IP"
|
||||
msgstr "控制面板登录 IP"
|
||||
|
||||
@ -1227,9 +1230,6 @@ msgstr "兼容"
|
||||
msgid "Mix"
|
||||
msgstr "混合"
|
||||
|
||||
msgid "Open Panel"
|
||||
msgstr "打开控制面板"
|
||||
|
||||
msgid "Close All Connections"
|
||||
msgstr "重置所有链接"
|
||||
|
||||
@ -2976,6 +2976,9 @@ msgstr "注意: 游戏代理请使用 Vmess 以外的节点"
|
||||
msgid "Note: If the connection is abnormal, please follow the steps on this page to check first"
|
||||
msgstr "注意: 连接异常时请按照此页步骤先进行检查"
|
||||
|
||||
msgid "Note: If you need to perform client access control in Fake-ip mode, please change the DNS hijacking mode to firewall forwarding"
|
||||
msgstr "注意: Fake-ip 模式下如需要进行客户端访问控制,请将DNS劫持模式改为防火墙转发"
|
||||
|
||||
msgid "Click to the page"
|
||||
msgstr "点击前往"
|
||||
|
||||
@ -3036,8 +3039,8 @@ msgstr "指定接口"
|
||||
msgid "DNS Lookup Only Through The Specific Interface"
|
||||
msgstr "DNS 仅通过特定接口进行查询"
|
||||
|
||||
msgid "Specific Group"
|
||||
msgstr "指定策略组"
|
||||
msgid "Specific Group (Support Regex)"
|
||||
msgstr "指定策略组(支持正则匹配)"
|
||||
|
||||
msgid "Group Use For Proxy The DNS"
|
||||
msgstr "用于代理此 DNS 的策略组"
|
||||
@ -3105,9 +3108,18 @@ msgstr "切换(更新) Dashboard 版本"
|
||||
msgid "Switch(Update) Yacd Version"
|
||||
msgstr "切换(更新) Yacd 版本"
|
||||
|
||||
msgid "Update Metacubexd Version"
|
||||
msgstr "更新 Metacubexd 版本"
|
||||
|
||||
msgid "Downloading File..."
|
||||
msgstr "文件下载中..."
|
||||
|
||||
msgid "Update Failed"
|
||||
msgstr "更新失败"
|
||||
|
||||
msgid "Update Successful"
|
||||
msgstr "更新成功"
|
||||
|
||||
msgid "Switch Failed"
|
||||
msgstr "切换失败"
|
||||
|
||||
@ -3432,8 +3444,17 @@ msgstr "警告:跳过核心不支持的 nameserver-policy 规则"
|
||||
msgid "Enable Unified Delay"
|
||||
msgstr "*启用统一延迟"
|
||||
|
||||
msgid "Change the delay calculation method to remove extra delays such as handshaking"
|
||||
msgid "Change The Delay Calculation Method To Remove Extra Delays Such as Handshaking"
|
||||
msgstr "更换延迟计算方式,通过去除握手等额外开销来降低延迟数值"
|
||||
|
||||
msgid "Tip: If the download fails, try setting the CDN in Overwrite Settings - General Settings - Github Address Modify Options"
|
||||
msgstr "提示:如果下载失败,您可以尝试在覆写设置 - 常规设置 - Github地址修改选项中设置CDN"
|
||||
|
||||
msgid "Change The TCP Keep-alive Interval, Selecting a Larger Value Avoids Abnormal Resource Consumption"
|
||||
msgstr "更改 TCP Keep-alive 间隔,选择较大数值可以避免异常的资源消耗"
|
||||
|
||||
msgid "TCP Keep-alive Interval(s)"
|
||||
msgstr "TCP Keep-alive 间隔(s)"
|
||||
|
||||
msgid "Used for Downloading Subscriptions, Defaults to Clash"
|
||||
msgstr "用于下载订阅时指定 UA,默认为 Clash"
|
||||
|
@ -25,7 +25,7 @@ CACHE_PATH_OLD="/etc/openclash/.cache"
|
||||
CACHE_PATH="/etc/openclash/cache.db"
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
LOCK_FILE=/tmp/lock/openclash.lock
|
||||
LOCK_FILE="/tmp/lock/openclash.lock"
|
||||
PROXY_FWMARK="0x162"
|
||||
PROXY_ROUTE_TABLE="0x162"
|
||||
|
||||
@ -942,14 +942,23 @@ upnp_exclude()
|
||||
if [ -n "$line" ]; then
|
||||
upnp_ip=$(echo "$line" |awk -F ':' '{print $3}')
|
||||
upnp_dp=$(echo "$line" |awk -F ':' '{print $4}')
|
||||
upnp_type=$(echo "$line" |awk -F ':' '{print $1}')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ]; then
|
||||
if [ -n "$FW4" ]; then
|
||||
if [ -z "$(nft list chain inet fw4 openclash_upnp |grep "$upnp_ip" |grep "$upnp_dp")" ]; then
|
||||
nft add rule inet fw4 openclash_upnp ip saddr { "$upnp_ip" } udp sport "$upnp_dp" counter return 2>/dev/null
|
||||
if [ "$upnp_type" == "UDP" ]; then
|
||||
nft add rule inet fw4 openclash_upnp ip saddr { "$upnp_ip" } udp sport "$upnp_dp" counter return 2>/dev/null
|
||||
else
|
||||
nft add rule inet fw4 openclash_upnp ip saddr { "$upnp_ip" } tcp sport "$upnp_dp" counter return 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ -z "$(iptables -t mangle -nL openclash_upnp |grep "$upnp_ip" |grep "$upnp_dp")" ]; then
|
||||
iptables -t mangle -A openclash_upnp -p udp -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
if [ "$upnp_type" == "UDP" ]; then
|
||||
iptables -t mangle -A openclash_upnp -p udp -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
else
|
||||
iptables -t mangle -A openclash_upnp -p tcp -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -2502,7 +2511,6 @@ if [ -z "$FW4" ]; then
|
||||
#TUN模式
|
||||
#启动TUN
|
||||
set_tun_tap
|
||||
|
||||
#设置防火墙
|
||||
if [ "$router_self_proxy" = "1" ] || ([ "$enable_redirect_dns" != "2" ] && [ "$en_mode" = "fake-ip" ]); then
|
||||
if [ "$en_mode" = "fake-ip" ]; then
|
||||
@ -2960,17 +2968,9 @@ revert_firewall()
|
||||
#TUN
|
||||
ip route del default dev utun table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
route delete -net "$fakeip_range" dev utun >/dev/null 2>&1
|
||||
ip link set dev utun down >/dev/null 2>&1
|
||||
ip tuntap del utun mode tun >/dev/null 2>&1
|
||||
|
||||
ip -6 route del default dev utun table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
ip -6 rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
ip -6 rule del oif utun table 2022 >/dev/null 2>&1
|
||||
ip -6 route del default dev utun table 2022 >/dev/null 2>&1
|
||||
ip -6 route del fdfe:dcba:9876::/126 dev utun proto kernel metric 256 >/dev/null 2>&1
|
||||
ip -6 link set dev utun down >/dev/null 2>&1
|
||||
ip -6 tuntap del utun mode tun >/dev/null 2>&1
|
||||
|
||||
if [ -n "$FW4" ]; then
|
||||
for nft in "input" "forward" "dstnat" "srcnat" "nat_output" "mangle_prerouting" "mangle_output"; do
|
||||
@ -3099,6 +3099,7 @@ get_config()
|
||||
upnp_lease_file=$(uci -q get upnpd.config.upnp_lease_file)
|
||||
global_client_fingerprint=$(uci -q get openclash.config.global_client_fingerprint || echo "0")
|
||||
enable_unified_delay=$(uci -q get openclash.config.enable_unified_delay || echo "0")
|
||||
keep_alive_interval=$(uci -q get openclash.config.keep_alive_interval || echo "0")
|
||||
[ -z "$dns_port" ] && dns_port=7874 && uci -q set openclash.config.dns_port=7874
|
||||
uci -q set openclash.config.restricted_mode=0 && uci -q commit openclash
|
||||
}
|
||||
@ -3126,7 +3127,7 @@ start()
|
||||
if ! $quick_start; then
|
||||
LOG_OUT "Step 3: Modify The Config File..."
|
||||
config_check
|
||||
/usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$TMP_CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$enable_meta_core" "$enable_meta_sniffer" "$enable_geoip_dat" "$geodata_loader" "$enable_meta_sniffer_custom" "$interface_name" "$enable_tcp_concurrent" "$core_type" "$append_default_dns" "$enable_meta_sniffer_pure_ip" "$find_process_mode" "$fakeip_range" "$global_client_fingerprint" "$ipv6_mode" "$stack_type_v6" "$enable_unified_delay"
|
||||
/usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$TMP_CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$enable_meta_core" "$enable_meta_sniffer" "$enable_geoip_dat" "$geodata_loader" "$enable_meta_sniffer_custom" "$interface_name" "$enable_tcp_concurrent" "$core_type" "$append_default_dns" "$enable_meta_sniffer_pure_ip" "$find_process_mode" "$fakeip_range" "$global_client_fingerprint" "$ipv6_mode" "$stack_type_v6" "$enable_unified_delay" "$keep_alive_interval"
|
||||
/usr/share/openclash/yml_rules_change.sh 2>/dev/null "$rule_source" "$enable_custom_clash_rules" "$TMP_CONFIG_FILE" "$enable_rule_proxy" "$CONFIG_NAME" "$router_self_proxy" "$lan_ip" "$proxy_port" "$tproxy_port" "$enable_meta_core" "$enable_redirect_dns" "$fakeip_range" "$en_mode"
|
||||
/usr/share/openclash/openclash_custom_domain_dns.sh >/dev/null 2>&1
|
||||
#Custom overwrite
|
||||
@ -3265,10 +3266,11 @@ restart()
|
||||
|
||||
reload()
|
||||
{
|
||||
[ -f "$LOCK_FILE" ] && exit 0
|
||||
enable=$(uci -q get openclash.config.enable)
|
||||
if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "firewall" ]; then
|
||||
LOG_OUT "Reload OpenClash Firewall Rules..."
|
||||
set_lock
|
||||
LOG_OUT "Reload OpenClash Firewall Rules..."
|
||||
revert_firewall 2>/dev/null
|
||||
do_run_mode 2>/dev/null
|
||||
get_config 2>/dev/null
|
||||
|
@ -190,9 +190,32 @@ uci -q set uhttpd.main.max_requests=50
|
||||
uci -q set uhttpd.main.max_connections=100
|
||||
uci -q set uhttpd.main.script_timeout=3600
|
||||
uci -q commit uhttpd
|
||||
sed -i '/.*kB maximum content size*/c\HTTP_MAX_CONTENT = 1024*1024' /usr/lib/lua/luci/http.lua >/dev/null 2>&1
|
||||
sed -i '/.*kB maximum content size*/c\HTTP_MAX_CONTENT = 1024*10240 -- 100 kB maximum content size' /usr/lib/lua/luci/http.lua >/dev/null 2>&1
|
||||
sed -i '/.*kB maximum content size*/c\export let HTTP_MAX_CONTENT = 1024*10240; // 100 kB maximum content size' /usr/share/ucode/luci/http.uc >/dev/null 2>&1
|
||||
|
||||
/etc/init.d/uhttpd restart >/dev/null 2>&1
|
||||
|
||||
#set tun interface firewall rule
|
||||
add_utun_firewall_zone()
|
||||
{
|
||||
local section="$1"
|
||||
local name network
|
||||
config_get "name" "$section" "name" ""
|
||||
config_get "network" "$section" "network" ""
|
||||
if [ "$name" = "lan" ] && [ -z "$(echo $network |grep utun)" ]; then
|
||||
uci -q set firewall."$section".network="$network utun"
|
||||
uci -q commit firewall
|
||||
fi
|
||||
}
|
||||
|
||||
uci -q set network.utun=interface
|
||||
uci -q set network.utun.proto=none
|
||||
uci -q set network.utun.ifname=utun
|
||||
uci -q set network.utun.device=utun
|
||||
uci -q commit network
|
||||
|
||||
config_load "firewall"
|
||||
config_foreach add_utun_firewall_zone "zone"
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
@ -31,14 +31,7 @@ if [ "$TIME" != "$CHTIME" ]; then
|
||||
curl -SsL -m 60 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ] || [ -n "$(cat $LAST_OPVER |grep '<html>')" ]; then
|
||||
curl -SsL -m 60 --retry 2 https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/o/op/openclash/"$RELEASE_BRANCH"/core_version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl_status=${PIPESTATUS[0]}
|
||||
else
|
||||
curl_status=0
|
||||
fi
|
||||
|
||||
if [ "$curl_status" -ne 0 ] ; then
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
|
||||
rm -rf $LAST_OPVER
|
||||
fi
|
||||
fi
|
||||
|
@ -89,15 +89,15 @@ config_download()
|
||||
{
|
||||
if [ -n "$subscribe_url_param" ]; then
|
||||
if [ -n "$c_address" ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: Clash' "$c_address""$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: ${sub_ua}' "$c_address""$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: Clash' https://api.dler.io/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: ${sub_ua}' https://api.dler.io/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: Clash' https://subconverter.herokuapp.com/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: ${sub_ua}' https://subconverter.herokuapp.com/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: Clash' "$subscribe_url" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H 'User-Agent: ${sub_ua}' "$subscribe_url" -o "$CFG_FILE" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -506,7 +506,7 @@ EOF
|
||||
|
||||
server_key_match()
|
||||
{
|
||||
local key_match key_word
|
||||
local key_match key_word
|
||||
|
||||
if [ -n "$(echo "$1" |grep "^ \{0,\}$")" ] || [ -n "$(echo "$1" |grep "^\t\{0,\}$")" ]; then
|
||||
return
|
||||
@ -546,7 +546,7 @@ server_key_match()
|
||||
|
||||
sub_info_get()
|
||||
{
|
||||
local section="$1" subscribe_url template_path subscribe_url_param template_path_encode key_match_param key_ex_match_param c_address de_ex_keyword
|
||||
local section="$1" subscribe_url template_path subscribe_url_param template_path_encode key_match_param key_ex_match_param c_address de_ex_keyword sub_ua
|
||||
config_get_bool "enabled" "$section" "enabled" "1"
|
||||
config_get "name" "$section" "name" ""
|
||||
config_get "sub_convert" "$section" "sub_convert" ""
|
||||
@ -563,6 +563,7 @@ sub_info_get()
|
||||
config_get "rule_provider" "$section" "rule_provider" ""
|
||||
config_get "custom_template_url" "$section" "custom_template_url" ""
|
||||
config_get "de_ex_keyword" "$section" "de_ex_keyword" ""
|
||||
config_get "sub_ua" "$section" "sub_ua" "Clash"
|
||||
|
||||
if [ "$enabled" -eq 0 ]; then
|
||||
return
|
||||
@ -641,7 +642,6 @@ sub_info_get()
|
||||
LOG_OUT "Start Updating Config File【$name】..."
|
||||
|
||||
config_download
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -s "$CFG_FILE" ]; then
|
||||
#prevent ruby unexpected error
|
||||
sed -i -E 's/protocol-param: ([^,'"'"'"''}( *#)\n\r]+)/protocol-param: "\1"/g' "$CFG_FILE" 2>/dev/null
|
||||
|
@ -71,13 +71,8 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/o/op/openclash/"$RELEASE_BRANCH"/core-lateset/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_tun.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl_status=${PIPESTATUS[0]}
|
||||
else
|
||||
curl_status=0
|
||||
fi
|
||||
if [ "$curl_status" -eq 0 ]; then
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
|
||||
gzip -t /tmp/clash_tun.gz >/dev/null 2>&1
|
||||
fi
|
||||
;;
|
||||
@ -94,13 +89,8 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/o/op/openclash/"$RELEASE_BRANCH"/core-lateset/meta/clash-"$CPU_MODEL".tar.gz -o /tmp/clash_meta.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash_meta.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl_status=${PIPESTATUS[0]}
|
||||
else
|
||||
curl_status=0
|
||||
fi
|
||||
if [ "$curl_status" -eq 0 ]; then
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
|
||||
gzip -t /tmp/clash_meta.tar.gz >/dev/null 2>&1
|
||||
fi
|
||||
;;
|
||||
@ -117,13 +107,8 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/core/"$RELEASE_BRANCH"/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/o/op/openclash/"$RELEASE_BRANCH"/core-lateset/dev/clash-"$CPU_MODEL".tar.gz -o /tmp/clash.tar.gz 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/clash.tar.gz" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl_status=${PIPESTATUS[0]}
|
||||
else
|
||||
curl_status=0
|
||||
fi
|
||||
if [ "$curl_status" -eq 0 ]; then
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
|
||||
gzip -t /tmp/clash.tar.gz >/dev/null 2>&1
|
||||
fi
|
||||
esac
|
||||
|
@ -18,7 +18,7 @@
|
||||
DOWNLOAD_PATH="https://codeload.github.com/MetaCubeX/Razord-meta/zip/refs/heads/gh-pages"
|
||||
FILE_PATH_INCLUDE="Razord-meta-gh-pages"
|
||||
fi
|
||||
else
|
||||
elif [ "$DASH_NAME" == "Yacd" ]; then
|
||||
UNPACK_FILE_DIR="/usr/share/openclash/ui/yacd/"
|
||||
BACKUP_FILE_DIR="/usr/share/openclash/ui/yacd_backup/"
|
||||
if [ "$DASH_TYPE" == "Official" ]; then
|
||||
@ -28,6 +28,11 @@
|
||||
DOWNLOAD_PATH="https://codeload.github.com/MetaCubeX/Yacd-meta/zip/refs/heads/gh-pages"
|
||||
FILE_PATH_INCLUDE="Yacd-meta-gh-pages"
|
||||
fi
|
||||
else
|
||||
UNPACK_FILE_DIR="/usr/share/openclash/ui/metacubexd/"
|
||||
BACKUP_FILE_DIR="/usr/share/openclash/ui/metacubexd_backup/"
|
||||
DOWNLOAD_PATH="https://codeload.github.com/MetaCubeX/metacubexd/zip/refs/heads/gh-pages"
|
||||
FILE_PATH_INCLUDE="metacubexd-gh-pages"
|
||||
fi
|
||||
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$DOWNLOAD_PATH" -o "$DASH_FILE_DIR" 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$DASH_FILE_DIR" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
|
@ -39,9 +39,6 @@
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/v/v2/v2raya/dists/v2ray-rules-dat/geoip.dat" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOIP_CUSTOM_URL" -o /tmp/GeoIP.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoIP.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
|
@ -39,9 +39,6 @@
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/v/v2/v2raya/dists/v2ray-rules-dat/geosite.dat" -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 "$GEOSITE_CUSTOM_URL" -o /tmp/GeoSite.dat 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/GeoSite.dat" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
|
@ -822,7 +822,7 @@ function auto_get_policy_group(passwd, ip, port)
|
||||
if con then
|
||||
con = JSON.parse(con)
|
||||
end
|
||||
if con then
|
||||
if con and con.connections then
|
||||
for i = 1, #(con.connections) do
|
||||
if type == "Netflix" then
|
||||
if string.match(con.connections[i].metadata.host, "www%.netflix%.com") then
|
||||
@ -1382,7 +1382,7 @@ function paramount_plus_unlock_test()
|
||||
if not string.find(data.url_effective, "intl") then
|
||||
status = 2
|
||||
data = SYS.exec(string.format("curl -sL --connect-timeout 5 -m 5 --speed-time 5 --speed-limit 1 --retry 2 -H 'Accept-Language: en' -H 'Content-Type: application/json' -H 'User-Agent: %s' %s", UA, url))
|
||||
region = string.upper(string.sub(string.match(data, "\"siteEdition\":\"%a+|%a+\""), 19, -1)) or string.upper(string.sub(string.match(data, "property: '%a+'"), 12, -2))
|
||||
region = string.upper(string.sub(string.match(data, "\"siteEdition\":\"%a+|%a+\""), 19, -2)) or string.upper(string.sub(string.match(data, "property: '%a+'"), 12, -2))
|
||||
if region then
|
||||
if FS.isfile(string.format("/tmp/openclash_%s_region", type)) then
|
||||
old_region = FS.readfile(string.format("/tmp/openclash_%s_region", type))
|
||||
|
@ -58,13 +58,8 @@ if [ -n "$OP_CV" ] && [ -n "$OP_LV" ] && [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1
|
||||
else
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/o/op/openclash/"$RELEASE_BRANCH"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="/tmp/openclash.ipk" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl_status=${PIPESTATUS[0]}
|
||||
else
|
||||
curl_status=0
|
||||
fi
|
||||
if [ "$curl_status" -eq 0 ] && [ -s "/tmp/openclash.ipk" ]; then
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -s "/tmp/openclash.ipk" ]; then
|
||||
LOG_OUT "【OpenClash - v$LAST_VER】Download Successful, Start Pre Update Test..."
|
||||
|
||||
if [ -z "$(opkg install /tmp/openclash.ipk --noaction 2>/dev/null |grep 'Upgrading luci-app-openclash on root' 2>/dev/null)" ]; then
|
||||
|
@ -22,14 +22,7 @@ if [ "$TIME" != "$CHTIME" ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://raw.githubusercontent.com/vernesong/OpenClash/package/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
|
||||
if [ "${PIPESTATUS[0]}" -ne 0 ] || [ -n "$(cat $LAST_OPVER |grep '<html>')" ]; then
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/o/op/openclash/"$RELEASE_BRANCH"/version -o $LAST_OPVER 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$LAST_OPVER" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
curl_status=${PIPESTATUS[0]}
|
||||
else
|
||||
curl_status=0
|
||||
fi
|
||||
|
||||
if [ "$curl_status" -eq 0 ] && [ -z "$(cat $LAST_OPVER |grep '<html>')" ]; then
|
||||
if [ "${PIPESTATUS[0]}" -eq 0 ] && [ -z "$(cat $LAST_OPVER |grep '<html>')" ]; then
|
||||
OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $2$3}' 2>/dev/null)
|
||||
if [ "$(expr "$OP_CV" \>= "$OP_LV")" = "1" ]; then
|
||||
sed -i '/^https:/,$d' $LAST_OPVER
|
||||
|
@ -224,14 +224,13 @@ fi
|
||||
if [ -n "$FW4" ]; then
|
||||
for i in `$(nft list chain inet fw4 openclash_upnp |grep "return")`
|
||||
do
|
||||
upnp_ip=$(echo "$i" |awk -F 'ip saddr \\{ ' '{print $2}' |awk '{print $1}')
|
||||
upnp_dp=$(echo "$i" |awk -F 'udp sport ' '{print $2}' |awk '{print $1}')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ]; then
|
||||
if [ -z "$(cat "$upnp_lease_file" |grep "$upnp_ip" |grep "$upnp_dp")" ]; then
|
||||
handles=$(nft list chain inet fw4 openclash_upnp |grep "$i" |awk -F '# handle ' '{print$2}')
|
||||
for handle in $handles; do
|
||||
nft delete rule inet fw4 openclash_upnp handle ${handle}
|
||||
done
|
||||
upnp_ip=$(echo "$i" |awk -F 'ip saddr ' '{print $2}' |awk '{print $1}')
|
||||
upnp_dp=$(echo "$i" |awk -F 'sport ' '{print $2}' |awk '{print $1}')
|
||||
upnp_type=$(echo "$i" |awk -F 'sport ' '{print $1}' |awk '{print $4}' |tr '[a-z]' '[A-Z]')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ] && [ -n "$upnp_type" ]; then
|
||||
if [ -z "$(cat "$upnp_lease_file" |grep "$upnp_ip" |grep "$upnp_dp" |grep "$upnp_type")" ]; then
|
||||
handle=$(nft -a list chain inet fw4 openclash_upnp |grep "$i" |awk -F '# handle ' '{print$2}')
|
||||
nft delete rule inet fw4 openclash_upnp handle ${handle}
|
||||
fi
|
||||
fi
|
||||
done >/dev/null 2>&1
|
||||
@ -239,10 +238,11 @@ fi
|
||||
for i in `$(iptables -t mangle -nL openclash_upnp |grep "RETURN")`
|
||||
do
|
||||
upnp_ip=$(echo "$i" |awk '{print $4}')
|
||||
upnp_dp=$(echo "$i" |awk -F 'udp spt:' '{print $2}')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ]; then
|
||||
if [ -z "$(cat "$upnp_lease_file" |grep "$upnp_ip" |grep "$upnp_dp")" ]; then
|
||||
iptables -t mangle -D openclash_upnp -p udp -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
upnp_dp=$(echo "$i" |awk -F 'spt:' '{print $2}')
|
||||
upnp_type=$(echo "$i" |awk '{print $2}' |tr '[a-z]' '[A-Z]')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ] && [ -n "$upnp_type" ]; then
|
||||
if [ -z "$(cat "$upnp_lease_file" |grep "$upnp_ip" |grep "$upnp_dp" |grep "$upnp_type")" ]; then
|
||||
iptables -t mangle -D openclash_upnp -p "$upnp_type" -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
done >/dev/null 2>&1
|
||||
@ -254,14 +254,15 @@ fi
|
||||
if [ -n "$line" ]; then
|
||||
upnp_ip=$(echo "$line" |awk -F ':' '{print $3}')
|
||||
upnp_dp=$(echo "$line" |awk -F ':' '{print $4}')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ]; then
|
||||
upnp_type=$(echo "$line" |awk -F ':' '{print $1}' |tr '[A-Z]' '[a-z]')
|
||||
if [ -n "$upnp_ip" ] && [ -n "$upnp_dp" ] && [ -n "$upnp_type" ]; then
|
||||
if [ -n "$FW4" ]; then
|
||||
if [ -z "$(nft list chain inet fw4 openclash_upnp |grep "$upnp_ip" |grep "$upnp_dp")" ]; then
|
||||
nft add rule inet fw4 openclash_upnp ip saddr { "$upnp_ip" } udp sport "$upnp_dp" counter return 2>/dev/null
|
||||
if [ -z "$(nft list chain inet fw4 openclash_upnp |grep "$upnp_ip" |grep "$upnp_dp" |grep "$upnp_type")" ]; then
|
||||
nft add rule inet fw4 openclash_upnp ip saddr { "$upnp_ip" } "$upnp_type" sport "$upnp_dp" counter return 2>/dev/null
|
||||
fi
|
||||
else
|
||||
if [ -z "$(iptables -t mangle -nL openclash_upnp |grep "$upnp_ip" |grep "$upnp_dp")" ]; then
|
||||
iptables -t mangle -A openclash_upnp -p udp -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
if [ -z "$(iptables -t mangle -nL openclash_upnp |grep "$upnp_ip" |grep "$upnp_dp" |grep "$upnp_type")" ]; then
|
||||
iptables -t mangle -A openclash_upnp -p "$upnp_type" -s "$upnp_ip" --sport "$upnp_dp" -j RETURN 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1 @@
|
||||
import{i,f as s,b as r,d as l}from"./vendor-5507c805.js";const n=l('<div class="py-2 text-center text-lg font-semibold">'),a=t=>(()=>{const e=n();return i(e,s(()=>t.children)),r(()=>e.classList.toggle("divider",!!t.withDivider)),e})();export{a as C};
|
@ -0,0 +1 @@
|
||||
import{c as t,L as V,i as e,F as C,b as w,d as f,k as y,p as P,j as X,g as M,M as Z,ae as G,P as J,ap as K,aq as Q,t as A,D as U,e as Y}from"./vendor-5507c805.js";import{c as ee,g as te,a as le,e as re,f as j,r as se}from"./index-83f95c10.js";import{u as W,y as ne,T as ae,z as oe,L as g,A as ie,E as ce,F as N,G as O,H as B,M as de,c as ge,B as ue,x as he}from"./index-bd53d7c8.js";import{C as I}from"./ConfigTitle-dd5fc83b.js";const fe=f('<div class="flex flex-col gap-4"><div><select class="select select-bordered w-full"></select></div><div><select class="select select-bordered w-full"></select></div><div><select class="select select-bordered w-full">'),k=f("<option>"),me=o=>{const[s]=W();return t(de,{ref:c=>{var i;return(i=o.ref)==null?void 0:i.call(o,c)},get icon(){return t(V,{size:24})},get title(){return s("logsSettings")},get children(){const c=fe(),i=c.firstChild,d=i.firstChild,b=i.nextSibling,_=b.firstChild,p=b.nextSibling,$=p.firstChild;return e(i,t(I,{withDivider:!0,get children(){return s("tableSize")}}),d),d.addEventListener("change",l=>ne(l.target.value)),e(d,t(C,{get each(){return Object.values(ae)},children:l=>(()=>{const n=k();return n.value=l,e(n,()=>s(l)),n})()})),e(b,t(I,{withDivider:!0,get children(){return s("logLevel")}}),_),_.addEventListener("change",l=>oe(l.target.value)),e(_,t(C,{get each(){return[g.Info,g.Error,g.Warning,g.Debug,g.Silent]},children:l=>(()=>{const n=k();return n.value=l,e(n,()=>s(l)),n})()})),e(p,t(I,{withDivider:!0,get children(){return s("logMaxRows")}}),$),$.addEventListener("change",l=>ie(parseInt(l.target.value))),e($,t(C,{each:ce,children:l=>(()=>{const n=k();return n.value=l,e(n,l),n})()})),w(()=>d.value=N()),w(()=>_.value=O()),w(()=>$.value=B()),c}})},ve=f("<span>"),_e=f('<div class="flex h-full flex-col gap-2"><div class="join w-full"><input type=search class="input join-item input-primary input-sm flex-1 flex-shrink-0 sm:input-md"></div><div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300"><table><thead class="sticky top-0 z-10"></thead><tbody>'),$e=f("<tr>"),be=f('<th class=bg-base-200><div class="flex items-center"><div>'),pe=f('<tr class="hover:!bg-primary hover:text-primary-content">'),Se=f("<td class=py-2>"),q=(o,s,c,i)=>{const d=se(o.getValue(s),c);return i({itemRank:d}),d.passed},Fe=()=>{let o;const[s]=W();let c=1;const[i,d]=y([]),b=ge("logs",{level:O()});P(()=>{const r=b();r&&(d(m=>[{...r,seq:c},...m].slice(0,B())),c++)});const[_,p]=y(""),[$,l]=X(y([]),{name:"logsTableSorting",storage:localStorage}),n=[{header:s("sequence"),accessorFn:r=>r.seq},{header:s("type"),accessorFn:r=>r.type,cell:({row:r})=>{const m=r.original.type;let u="";switch(m){case g.Error:u="text-error";break;case g.Warning:u="text-warning";break;case g.Info:u="text-info";break;case g.Debug:u="text-success";break}return(()=>{const S=ve();return M(S,u),e(S,()=>`[${r.original.type}]`),S})()}},{header:s("payload"),accessorFn:r=>r.payload}],E=ee({filterFns:{fuzzy:q},state:{get globalFilter(){return _()},get sorting(){return $()}},get data(){return i()},sortDescFirst:!0,columns:n,onGlobalFilterChange:p,onSortingChange:l,globalFilterFn:q,getFilteredRowModel:te(),getSortedRowModel:le(),getCoreRowModel:re()});return(()=>{const r=_e(),m=r.firstChild,u=m.firstChild,S=m.nextSibling,R=S.firstChild,D=R.firstChild,H=D.nextSibling;return u.$$input=a=>p(a.target.value),e(m,t(ue,{class:"join-item btn-sm sm:btn-md",onClick:()=>o==null?void 0:o.showModal(),get icon(){return t(Z,{})}}),null),e(D,t(G,{get each(){return E.getHeaderGroups()},children:a=>{const v=a();return(()=>{const h=$e();return e(h,t(G,{get each(){return v.headers},children:L=>{const x=L();return(()=>{const z=be(),T=z.firstChild,F=T.firstChild;return J(F,"click",x.column.getToggleSortingHandler(),!0),e(F,()=>j(x.column.columnDef.header,x.getContext())),e(T,()=>({asc:t(K,{}),desc:t(Q,{})})[x.column.getIsSorted()]??null,null),w(()=>M(F,A(x.column.getCanSort()&&"cursor-pointer select-none","flex-1"))),z})()}})),h})()}})),e(H,t(C,{get each(){return E.getRowModel().rows},children:a=>(()=>{const v=pe();return e(v,t(C,{get each(){return a.getVisibleCells()},children:h=>(()=>{const L=Se();return e(L,()=>j(h.column.columnDef.cell,h.getContext())),L})()})),v})()})),e(r,t(me,{ref:a=>o=a}),null),w(a=>{const v=s("search"),h=A(he(N()),"table relative rounded-none");return v!==a._v$&&U(u,"placeholder",a._v$=v),h!==a._v$2&&M(R,a._v$2=h),a},{_v$:void 0,_v$2:void 0}),r})()};Y(["input","click"]);export{Fe as default};
|
@ -0,0 +1 @@
|
||||
import{B as z,a1 as A,a2 as N,a3 as P,a4 as q,N as H,i as c,c as h,O as M,F as O,d as C,a5 as x,v as U,e as T,w as X}from"./vendor-5507c805.js";import{u as G,e as m,B as _,s as f,a as J,b as S,t as K}from"./index-bd53d7c8.js";let y;const Q=new Uint8Array(16);function W(){if(!y&&(y=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!y))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y(Q)}const l=[];for(let t=0;t<256;++t)l.push((t+256).toString(16).slice(1));function Y(t,e=0){return l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]}const Z=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),E={randomUUID:Z};function tt(t,e,d){if(E.randomUUID&&!e&&!t)return E.randomUUID();t=t||{};const i=t.random||(t.rng||W)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){d=d||0;for(let r=0;r<16;++r)e[d+r]=i[r];return e}return Y(i)}const et=C('<div class="mx-auto flex max-w-screen-sm flex-col items-center gap-4 py-10"><form class=contents><div class="flex w-full flex-col gap-4"><div class=flex-1><label class=label><span class=label-text></span></label><input name=url type=url class="input input-bordered w-full"placeholder=http://127.0.0.1:9090 list=defaultEndpoints><datalist id=defaultEndpoints><option value=http://127.0.0.1:9090></option></datalist></div><div class=flex-1><label class=label><span class=label-text></span></label><input name=secret type=password class="input input-bordered w-full"placeholder=secret></div></div></form><div class="grid w-full grid-cols-2 gap-4">'),nt=C('<div class="badge badge-info flex w-full cursor-pointer items-center justify-between gap-4 py-4"><span class=truncate>'),st=x.object({url:x.string().min(1),secret:x.string()}),it=()=>{const[t]=G(),e=z(),d=A(),i=n=>{S(n),d("/overview")},r=(n,s)=>X.get(n,{headers:s?{Authorization:`Bearer ${s}`}:{}}).then(({ok:a})=>a).catch(a=>{const{message:o}=a;U.error(o)}),R=async n=>{const s=m().find(a=>a.id===n);s&&await r(s.url,s.secret)&&i(n)},b=async({url:n,secret:s})=>{const a=K(n);if(!await r(a,s))return;const o=tt(),u=m().slice(),p=u.find(v=>v.url===a);if(!p){f([{id:o,url:a,secret:s},...u]),i(o);return}p.secret=s,p.id=o,f(u),i(o)},I=n=>{const{message:s}=n;U.error(s)},{form:$}=N({extend:P({schema:st}),onSubmit:b,onError:I}),L=n=>{J()===n&&S(""),f(m().filter(s=>s.id!==n))};return q(()=>{const n=new URLSearchParams(e.search);n.has("hostname")?b({url:`${window.location.protocol}//${n.get("hostname")}${n.get("port")?`:${n.get("port")}`:""}`,secret:n.get("secret")??""}):m().length===0&&b({url:"http://127.0.0.1:9090",secret:""})}),(()=>{const n=et(),s=n.firstChild,a=s.firstChild,o=a.firstChild,u=o.firstChild,p=u.firstChild,v=o.nextSibling,k=v.firstChild,D=k.firstChild,B=s.nextSibling;return H($,s,()=>$),c(p,()=>t("endpointURL")),c(D,()=>t("secret")),c(a,h(_,{type:"submit",class:"btn-primary uppercase",get children(){return t("add")}}),null),c(B,h(O,{get each(){return m()},children:({id:w,url:V})=>(()=>{const g=nt(),j=g.firstChild;return g.$$click=()=>R(w),c(j,V),c(g,h(_,{class:"btn-circle btn-ghost btn-xs text-white",onClick:F=>{F.stopPropagation(),L(w)},get children(){return h(M,{})}}),null),g})()})),n})()};T(["click"]);export{it as default};
|
@ -0,0 +1 @@
|
||||
import{Y as a}from"./vendor-5507c805.js";import{ac as m}from"./index-bd53d7c8.js";const s=o=>a(o).locale(m()).fromNow();export{s as f};
|
After Width: | Height: | Size: 900 B |
@ -0,0 +1,270 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 200.00 200.00">
|
||||
<g stroke-width="2.00" fill="none" stroke-linecap="butt">
|
||||
<path stroke="#babcbd" vector-effect="non-scaling-stroke" d="
|
||||
M 40.95 140.48
|
||||
Q 68.55 157.30 96.63 173.25
|
||||
C 102.24 176.44 107.25 175.99 112.94 172.72
|
||||
Q 137.94 158.32 162.95 143.97
|
||||
Q 165.51 142.50 167.13 140.70
|
||||
A 1.36 1.36 0.0 0 0 167.49 139.78
|
||||
C 167.62 114.80 168.11 94.50 166.94 76.07
|
||||
C 166.62 71.04 164.79 67.55 160.95 64.72"
|
||||
/>
|
||||
<path stroke="#edefef" vector-effect="non-scaling-stroke" d="
|
||||
M 160.95 64.72
|
||||
C 158.30 59.86 148.11 55.99 143.18 53.08
|
||||
C 131.17 46.00 119.07 39.12 106.93 32.27
|
||||
C 102.78 29.92 100.95 27.45 95.80 30.54
|
||||
Q 86.26 36.27 72.74 43.77
|
||||
C 65.00 48.06 55.94 53.83 47.28 58.44
|
||||
C 36.47 64.19 37.03 68.23 37.02 79.49
|
||||
Q 36.99 107.48 37.00 135.54
|
||||
A 1.33 1.30 24.1 0 0 37.35 136.43
|
||||
L 40.95 140.48"
|
||||
/>
|
||||
<path stroke="#cdcdcd" vector-effect="non-scaling-stroke" d="
|
||||
M 160.95 64.72
|
||||
C 162.26 67.10 163.25 68.73 163.25 71.58
|
||||
Q 163.26 102.51 163.09 133.43
|
||||
Q 163.07 137.05 160.83 138.33
|
||||
Q 133.44 154.04 106.07 169.70
|
||||
C 102.53 171.72 96.73 171.58 93.59 169.67
|
||||
C 81.84 162.53 70.33 156.39 57.98 148.94
|
||||
Q 49.77 143.99 40.95 140.48"
|
||||
/>
|
||||
<path stroke="#848484" vector-effect="non-scaling-stroke" d="
|
||||
M 155.05 66.47
|
||||
A 0.30 0.30 0.0 0 0 155.05 65.95
|
||||
L 100.11 34.53
|
||||
A 0.30 0.30 0.0 0 0 99.81 34.53
|
||||
L 44.98 65.96
|
||||
A 0.30 0.30 0.0 0 0 44.98 66.48
|
||||
L 99.82 97.91
|
||||
A 0.30 0.30 0.0 0 0 100.12 97.91
|
||||
L 155.05 66.47"
|
||||
/>
|
||||
<path stroke="#848484" vector-effect="non-scaling-stroke" d="
|
||||
M 97.83 102.22
|
||||
A 0.32 0.32 0.0 0 0 97.67 101.94
|
||||
L 42.48 70.37
|
||||
A 0.32 0.32 0.0 0 0 42.00 70.65
|
||||
L 42.00 133.51
|
||||
A 0.32 0.32 0.0 0 0 42.16 133.79
|
||||
L 97.04 165.13
|
||||
A 0.32 0.32 0.0 0 0 97.52 164.85
|
||||
L 97.83 102.22"
|
||||
/>
|
||||
<path stroke="#848484" vector-effect="non-scaling-stroke" d="
|
||||
M 102.35 101.92
|
||||
A 0.32 0.32 0.0 0 0 102.19 102.20
|
||||
L 102.47 164.86
|
||||
A 0.32 0.32 0.0 0 0 102.95 165.14
|
||||
L 157.78 133.85
|
||||
A 0.32 0.32 0.0 0 0 157.94 133.57
|
||||
L 157.72 70.85
|
||||
A 0.32 0.32 0.0 0 0 157.24 70.57
|
||||
L 102.35 101.92"
|
||||
/>
|
||||
<path stroke="#848484" vector-effect="non-scaling-stroke" d="
|
||||
M 101.2539 41.9921
|
||||
A 1.17 1.17 0.0 0 0 100.0859 40.8201
|
||||
L 100.0459 40.8200
|
||||
A 1.17 1.17 0.0 0 0 98.8739 41.9880
|
||||
L 98.7861 92.2679
|
||||
A 1.17 1.17 0.0 0 0 99.9541 93.4399
|
||||
L 99.9941 93.4400
|
||||
A 1.17 1.17 0.0 0 0 101.1661 92.2720
|
||||
L 101.2539 41.9921"
|
||||
/>
|
||||
<path stroke="#848484" vector-effect="non-scaling-stroke" d="
|
||||
M 93.8121 104.2576
|
||||
A 1.09 1.09 0.0 0 0 92.3238 103.8561
|
||||
L 48.3895 129.1194
|
||||
A 1.09 1.09 0.0 0 0 47.9879 130.6077
|
||||
L 48.0079 130.6424
|
||||
A 1.09 1.09 0.0 0 0 49.4962 131.0439
|
||||
L 93.4305 105.7806
|
||||
A 1.09 1.09 0.0 0 0 93.8321 104.2923
|
||||
L 93.8121 104.2576"
|
||||
/>
|
||||
<path stroke="#848484" vector-effect="non-scaling-stroke" d="
|
||||
M 152.0194 130.6077
|
||||
A 1.09 1.09 0.0 0 0 151.6178 129.1194
|
||||
L 107.6488 103.8361
|
||||
A 1.09 1.09 0.0 0 0 106.1606 104.2377
|
||||
L 106.1406 104.2723
|
||||
A 1.09 1.09 0.0 0 0 106.5422 105.7606
|
||||
L 150.5112 131.0439
|
||||
A 1.09 1.09 0.0 0 0 151.9994 130.6423
|
||||
L 152.0194 130.6077"
|
||||
/>
|
||||
</g>
|
||||
<path fill="#dadedf" d="
|
||||
M 0.00 0.00
|
||||
L 200.00 0.00
|
||||
L 200.00 200.00
|
||||
L 0.00 200.00
|
||||
L 0.00 0.00
|
||||
Z
|
||||
M 40.95 140.48
|
||||
Q 68.55 157.30 96.63 173.25
|
||||
C 102.24 176.44 107.25 175.99 112.94 172.72
|
||||
Q 137.94 158.32 162.95 143.97
|
||||
Q 165.51 142.50 167.13 140.70
|
||||
A 1.36 1.36 0.0 0 0 167.49 139.78
|
||||
C 167.62 114.80 168.11 94.50 166.94 76.07
|
||||
C 166.62 71.04 164.79 67.55 160.95 64.72
|
||||
C 158.30 59.86 148.11 55.99 143.18 53.08
|
||||
C 131.17 46.00 119.07 39.12 106.93 32.27
|
||||
C 102.78 29.92 100.95 27.45 95.80 30.54
|
||||
Q 86.26 36.27 72.74 43.77
|
||||
C 65.00 48.06 55.94 53.83 47.28 58.44
|
||||
C 36.47 64.19 37.03 68.23 37.02 79.49
|
||||
Q 36.99 107.48 37.00 135.54
|
||||
A 1.33 1.30 24.1 0 0 37.35 136.43
|
||||
L 40.95 140.48
|
||||
Z"
|
||||
/>
|
||||
<path fill="#ffffff" d="
|
||||
M 160.95 64.72
|
||||
C 162.26 67.10 163.25 68.73 163.25 71.58
|
||||
Q 163.26 102.51 163.09 133.43
|
||||
Q 163.07 137.05 160.83 138.33
|
||||
Q 133.44 154.04 106.07 169.70
|
||||
C 102.53 171.72 96.73 171.58 93.59 169.67
|
||||
C 81.84 162.53 70.33 156.39 57.98 148.94
|
||||
Q 49.77 143.99 40.95 140.48
|
||||
L 37.35 136.43
|
||||
A 1.33 1.30 24.1 0 1 37.00 135.54
|
||||
Q 36.99 107.48 37.02 79.49
|
||||
C 37.03 68.23 36.47 64.19 47.28 58.44
|
||||
C 55.94 53.83 65.00 48.06 72.74 43.77
|
||||
Q 86.26 36.27 95.80 30.54
|
||||
C 100.95 27.45 102.78 29.92 106.93 32.27
|
||||
C 119.07 39.12 131.17 46.00 143.18 53.08
|
||||
C 148.11 55.99 158.30 59.86 160.95 64.72
|
||||
Z
|
||||
M 155.05 66.47
|
||||
A 0.30 0.30 0.0 0 0 155.05 65.95
|
||||
L 100.11 34.53
|
||||
A 0.30 0.30 0.0 0 0 99.81 34.53
|
||||
L 44.98 65.96
|
||||
A 0.30 0.30 0.0 0 0 44.98 66.48
|
||||
L 99.82 97.91
|
||||
A 0.30 0.30 0.0 0 0 100.12 97.91
|
||||
L 155.05 66.47
|
||||
Z
|
||||
M 97.83 102.22
|
||||
A 0.32 0.32 0.0 0 0 97.67 101.94
|
||||
L 42.48 70.37
|
||||
A 0.32 0.32 0.0 0 0 42.00 70.65
|
||||
L 42.00 133.51
|
||||
A 0.32 0.32 0.0 0 0 42.16 133.79
|
||||
L 97.04 165.13
|
||||
A 0.32 0.32 0.0 0 0 97.52 164.85
|
||||
L 97.83 102.22
|
||||
Z
|
||||
M 102.35 101.92
|
||||
A 0.32 0.32 0.0 0 0 102.19 102.20
|
||||
L 102.47 164.86
|
||||
A 0.32 0.32 0.0 0 0 102.95 165.14
|
||||
L 157.78 133.85
|
||||
A 0.32 0.32 0.0 0 0 157.94 133.57
|
||||
L 157.72 70.85
|
||||
A 0.32 0.32 0.0 0 0 157.24 70.57
|
||||
L 102.35 101.92
|
||||
Z"
|
||||
/>
|
||||
<path fill="#080808" d="
|
||||
M 155.05 66.47
|
||||
L 100.12 97.91
|
||||
A 0.30 0.30 0.0 0 1 99.82 97.91
|
||||
L 44.98 66.48
|
||||
A 0.30 0.30 0.0 0 1 44.98 65.96
|
||||
L 99.81 34.53
|
||||
A 0.30 0.30 0.0 0 1 100.11 34.53
|
||||
L 155.05 65.95
|
||||
A 0.30 0.30 0.0 0 1 155.05 66.47
|
||||
Z
|
||||
M 101.2539 41.9921
|
||||
A 1.17 1.17 0.0 0 0 100.0859 40.8201
|
||||
L 100.0459 40.8200
|
||||
A 1.17 1.17 0.0 0 0 98.8739 41.9880
|
||||
L 98.7861 92.2679
|
||||
A 1.17 1.17 0.0 0 0 99.9541 93.4399
|
||||
L 99.9941 93.4400
|
||||
A 1.17 1.17 0.0 0 0 101.1661 92.2720
|
||||
L 101.2539 41.9921
|
||||
Z"
|
||||
/>
|
||||
<rect fill="#ffffff" x="-1.19" y="-26.31" transform="translate(100.02,67.13) rotate(0.1)" width="2.38"
|
||||
height="52.62" rx="1.17"/>
|
||||
<path fill="#9a9a9b" d="
|
||||
M 160.95 64.72
|
||||
C 164.79 67.55 166.62 71.04 166.94 76.07
|
||||
C 168.11 94.50 167.62 114.80 167.49 139.78
|
||||
A 1.36 1.36 0.0 0 1 167.13 140.70
|
||||
Q 165.51 142.50 162.95 143.97
|
||||
Q 137.94 158.32 112.94 172.72
|
||||
C 107.25 175.99 102.24 176.44 96.63 173.25
|
||||
Q 68.55 157.30 40.95 140.48
|
||||
Q 49.77 143.99 57.98 148.94
|
||||
C 70.33 156.39 81.84 162.53 93.59 169.67
|
||||
C 96.73 171.58 102.53 171.72 106.07 169.70
|
||||
Q 133.44 154.04 160.83 138.33
|
||||
Q 163.07 137.05 163.09 133.43
|
||||
Q 163.26 102.51 163.25 71.58
|
||||
C 163.25 68.73 162.26 67.10 160.95 64.72
|
||||
Z"
|
||||
/>
|
||||
<path fill="#080808" d="
|
||||
M 97.83 102.22
|
||||
L 97.52 164.85
|
||||
A 0.32 0.32 0.0 0 1 97.04 165.13
|
||||
L 42.16 133.79
|
||||
A 0.32 0.32 0.0 0 1 42.00 133.51
|
||||
L 42.00 70.65
|
||||
A 0.32 0.32 0.0 0 1 42.48 70.37
|
||||
L 97.67 101.94
|
||||
A 0.32 0.32 0.0 0 1 97.83 102.22
|
||||
Z
|
||||
M 93.8121 104.2576
|
||||
A 1.09 1.09 0.0 0 0 92.3238 103.8561
|
||||
L 48.3895 129.1194
|
||||
A 1.09 1.09 0.0 0 0 47.9879 130.6077
|
||||
L 48.0079 130.6424
|
||||
A 1.09 1.09 0.0 0 0 49.4962 131.0439
|
||||
L 93.4305 105.7806
|
||||
A 1.09 1.09 0.0 0 0 93.8321 104.2923
|
||||
L 93.8121 104.2576
|
||||
Z"
|
||||
/>
|
||||
<path fill="#080808" d="
|
||||
M 102.35 101.92
|
||||
L 157.24 70.57
|
||||
A 0.32 0.32 0.0 0 1 157.72 70.85
|
||||
L 157.94 133.57
|
||||
A 0.32 0.32 0.0 0 1 157.78 133.85
|
||||
L 102.95 165.14
|
||||
A 0.32 0.32 0.0 0 1 102.47 164.86
|
||||
L 102.19 102.20
|
||||
A 0.32 0.32 0.0 0 1 102.35 101.92
|
||||
Z
|
||||
M 152.0194 130.6077
|
||||
A 1.09 1.09 0.0 0 0 151.6178 129.1194
|
||||
L 107.6488 103.8361
|
||||
A 1.09 1.09 0.0 0 0 106.1606 104.2377
|
||||
L 106.1406 104.2723
|
||||
A 1.09 1.09 0.0 0 0 106.5422 105.7606
|
||||
L 150.5112 131.0439
|
||||
A 1.09 1.09 0.0 0 0 151.9994 130.6423
|
||||
L 152.0194 130.6077
|
||||
Z"
|
||||
/>
|
||||
<rect fill="#ffffff" x="-26.43" y="-1.11" transform="translate(70.91,117.45) rotate(-29.9)" width="52.86"
|
||||
height="2.22" rx="1.09"/>
|
||||
<rect fill="#ffffff" x="-26.45" y="-1.11" transform="translate(129.08,117.44) rotate(29.9)" width="52.90"
|
||||
height="2.22" rx="1.09"/>
|
||||
</svg>
|
After Width: | Height: | Size: 7.9 KiB |
@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
||||
/>
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
||||
<link rel="apple-touch-icon" href="./pwa-192x192.png" />
|
||||
|
||||
<title>metacubexd</title>
|
||||
<script type="module" crossorigin src="./assets/index-bd53d7c8.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/vendor-5507c805.js">
|
||||
<link rel="stylesheet" href="./assets/index-788b021a.css">
|
||||
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
||||
<div id="root" style="display: contents"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
{"name":"metacubexd","short_name":"metacubexd","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","icons":[{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]}
|
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 622 B |
@ -0,0 +1 @@
|
||||
if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('./sw.js', { scope: './' })})}
|
@ -0,0 +1 @@
|
||||
if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const u=s=>i(s,r),t={module:{uri:r},exports:o,require:u};e[r]=Promise.all(n.map((s=>t[s]||u(s)))).then((s=>(l(...s),o)))}}define(["./workbox-56a10583"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-8226e777.js",revision:null},{url:"assets/ConfigTitle-dd5fc83b.js",revision:null},{url:"assets/Connections-02d8e92b.js",revision:null},{url:"assets/global-9f47a568.js",revision:null},{url:"assets/index-788b021a.css",revision:null},{url:"assets/index-83f95c10.js",revision:null},{url:"assets/index-bd53d7c8.js",revision:null},{url:"assets/Logs-2575e4f0.js",revision:null},{url:"assets/Overview-51176cc0.js",revision:null},{url:"assets/Proxies-99da7d66.js",revision:null},{url:"assets/Rules-3b098996.js",revision:null},{url:"assets/Setup-a0db2f96.js",revision:null},{url:"assets/vendor-5507c805.js",revision:null},{url:"index.html",revision:"a5e1d64ce0c9b3d960836f3a18769fa1"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"4d78c8bc6207146065400ff644fe5a13"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
|
@ -227,21 +227,22 @@ yml_dns_get()
|
||||
Value = YAML.load_file('$2');
|
||||
Value['proxy-groups'].each{
|
||||
|x|
|
||||
if x['name'] == '$specific_group' then
|
||||
if (x.key?('use') and not x['use'].to_a.empty?) or (x.key?('proxies') and not x['proxies'].to_a.empty?) then
|
||||
puts 'return'
|
||||
end;
|
||||
if x['name'] =~ /${specific_group}/ then
|
||||
puts x['name'];
|
||||
break;
|
||||
end;
|
||||
};
|
||||
}.join;
|
||||
rescue Exception => e
|
||||
puts 'return'
|
||||
puts 'return';
|
||||
end;" 2>/dev/null)
|
||||
|
||||
if [ "$group_check" != "return" ]; then
|
||||
/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 "$specific_group"
|
||||
if [ "$group_check" != "return" ] && [ -n "$group_check" ]; then
|
||||
specific_group="#$group_check"
|
||||
else
|
||||
specific_group=""
|
||||
fi
|
||||
specific_group="#$specific_group"
|
||||
|
||||
elif [ "$specific_group" != "Disable" ] && [ -n "$specific_group" ]; then
|
||||
LOG_OUT "Warning: Only Meta Core Support Specific Group, Skip Setting【$dns_type$dns_address】"
|
||||
specific_group=""
|
||||
@ -380,6 +381,9 @@ Thread.new{
|
||||
if '${34}' == '1' then
|
||||
Value['unified-delay']=true;
|
||||
end;
|
||||
if '${35}' != '0' then
|
||||
Value['keep-alive-interval']=${35};
|
||||
end;
|
||||
if '${29}' != '0' then
|
||||
Value['find-process-mode']='${29}';
|
||||
end;
|
||||
|
@ -1024,7 +1024,7 @@ do
|
||||
}.join
|
||||
end;
|
||||
|
||||
if '$server_type' == 'hysteria' then
|
||||
if '$server_type' == 'hysteria' or '$server_type' == 'hysteria2' then
|
||||
Thread.new{
|
||||
#hysteria_protocol
|
||||
if Value['proxies'][$count].key?('protocol') then
|
||||
@ -1106,6 +1106,13 @@ do
|
||||
end
|
||||
}.join
|
||||
|
||||
#hysteria_obfs_password
|
||||
if Value['proxies'][$count].key?('obfs-password') then
|
||||
hysteria_obfs_password = '${uci_set}hysteria_obfs_password=' + Value['proxies'][$count]['obfs-password'].to_s
|
||||
system(hysteria_obfs_password)
|
||||
end
|
||||
}.join
|
||||
|
||||
Thread.new{
|
||||
#hysteria_auth
|
||||
if Value['proxies'][$count].key?('auth') then
|
||||
|
@ -302,6 +302,7 @@ yml_servers_set()
|
||||
config_get "multiplex_statistic" "$section" "multiplex_statistic" ""
|
||||
config_get "multiplex_only_tcp" "$section" "multiplex_only_tcp" ""
|
||||
config_get "other_parameters" "$section" "other_parameters" ""
|
||||
config_get "hysteria_obfs_password" "$section" "hysteria_obfs_password" ""
|
||||
|
||||
if [ "$enabled" = "0" ]; then
|
||||
return
|
||||
@ -908,6 +909,75 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
#hysteria2
|
||||
if [ "$type" = "hysteria2" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
- name: "$name"
|
||||
type: $type
|
||||
server: "$server"
|
||||
port: $port
|
||||
password: "$password"
|
||||
EOF
|
||||
if [ -n "$hysteria_up" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
up: "$hysteria_up"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$hysteria_down" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
down: "$hysteria_down"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$skip_cert_verify" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
skip-cert-verify: $skip_cert_verify
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$sni" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
sni: "$sni"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$hysteria_alpn" ]; then
|
||||
if [ -z "$(echo $hysteria_alpn |grep ' ')" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
alpn:
|
||||
- "$hysteria_alpn"
|
||||
EOF
|
||||
else
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
alpn:
|
||||
EOF
|
||||
config_list_foreach "$section" "hysteria_alpn" set_alpn
|
||||
fi
|
||||
fi
|
||||
if [ -n "$hysteria_obfs" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
obfs: "$hysteria_obfs"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$hysteria_obfs_password" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
obfs-password: "$hysteria_obfs_password"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$hysteria_ca" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
ca: "$hysteria_ca"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$hysteria_ca_str" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
ca-str: "$hysteria_ca_str"
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$fingerprint" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
fingerprint: "$fingerprint"
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
#vless
|
||||
if [ "$type" = "vless" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
|
@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=natflow
|
||||
PKG_VERSION:=20231120
|
||||
PKG_VERSION:=20231122
|
||||
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ptpt52/natflow/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=4bf98b57780b0597ea1dc6ae624e031339fe9bccce4b3511f15dcdf6fceddde5
|
||||
PKG_HASH:=ba8a9c66ab0cacac3921907933eda96315a6832296f21090740ee1cccdf2607c
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
PKG_MAINTAINER:=Chen Minqiang <ptpt52@gmail.com>
|
||||
|