mirror of
https://github.com/roacn/openwrt-packages.git
synced 2025-01-05 10:27:05 +08:00
🚀 Sync 2024-11-10 00:27
This commit is contained in:
parent
223d1b05eb
commit
7d3b16a3e5
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-openclash
|
||||
PKG_VERSION:=0.46.033
|
||||
PKG_VERSION:=0.46.050
|
||||
PKG_RELEASE:=beta
|
||||
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
|
||||
|
||||
@ -27,6 +27,15 @@ define Package/$(PKG_NAME)/config
|
||||
|
||||
config PACKAGE_iptables-mod-extra
|
||||
default y if ! PACKAGE_firewall4
|
||||
|
||||
config PACKAGE_dnsmasq_full_ipset
|
||||
default y if ! PACKAGE_firewall4
|
||||
|
||||
config PACKAGE_dnsmasq_full_nftset
|
||||
default y if PACKAGE_firewall4
|
||||
|
||||
config PACKAGE_ipset
|
||||
default y if ! PACKAGE_firewall4
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
@ -34,7 +43,7 @@ define Package/$(PKG_NAME)
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=LuCI support for clash
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+dnsmasq-full +coreutils +coreutils-nohup +bash +curl +ca-certificates +ipset +ip-full \
|
||||
DEPENDS:=+dnsmasq-full +coreutils +coreutils-nohup +bash +curl +ca-certificates +ip-full \
|
||||
+libcap +libcap-bin +ruby +ruby-yaml +kmod-tun +unzip
|
||||
MAINTAINER:=vernesong
|
||||
endef
|
||||
@ -64,9 +73,7 @@ define Build/Prepare
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_domain_dns.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_domain_dns.list" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_domain_dns_policy.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_domain_dns_policy.list" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_fallback_filter.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_fallback_filter.yaml" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_force_sniffing_domain.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_force_sniffing_domain.yaml" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_sniffing_domain_filter.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_sniffing_domain_filter.yaml" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_sniffing_ports_filter.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_sniffing_ports_filter.yaml" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_sniffer.yaml" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_sniffer.yaml" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_localnetwork_ipv4.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_localnetwork_ipv4.list" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_localnetwork_ipv6.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_localnetwork_ipv6.list" >/dev/null 2>&1
|
||||
cp -f "$(PKG_BUILD_DIR)/root/etc/openclash/custom/openclash_custom_chnroute_pass.list" "$(PKG_BUILD_DIR)/root/usr/share/openclash/backup/openclash_custom_chnroute_pass.list" >/dev/null 2>&1
|
||||
|
@ -830,15 +830,12 @@ end
|
||||
|
||||
function action_toolbar_show_sys()
|
||||
local pid = luci.sys.exec("pidof clash |head -1 |tr -d '\n' 2>/dev/null")
|
||||
local mem, cpu
|
||||
local cpu
|
||||
if pid and pid ~= "" then
|
||||
mem = tonumber(luci.sys.exec(string.format("cat /proc/%s/status 2>/dev/null |grep -w VmRSS |awk '{print $2}'", pid)))
|
||||
cpu = luci.sys.exec(string.format("top -b -n1 |grep -E '%s' 2>/dev/null |grep -v grep |awk '{for (i=1;i<=NF;i++) {if ($i ~ /clash/) break; else cpu=i}}; {print $cpu}' 2>/dev/null", pid))
|
||||
if mem and cpu then
|
||||
mem = fs.filesize(mem*1024) or "0 KB"
|
||||
if cpu then
|
||||
cpu = string.match(cpu, "%d+") or "0"
|
||||
else
|
||||
mem = "0 KB"
|
||||
cpu = "0"
|
||||
end
|
||||
else
|
||||
@ -846,7 +843,6 @@ function action_toolbar_show_sys()
|
||||
end
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json({
|
||||
mem = mem,
|
||||
cpu = cpu;
|
||||
})
|
||||
end
|
||||
|
@ -53,9 +53,9 @@ for t,o in ipairs(fs.glob("/etc/openclash/config/*"))do
|
||||
e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",a.mtime)
|
||||
end
|
||||
if uci:get("openclash", "config", "config_path") and string.sub(uci:get("openclash", "config", "config_path"), 23, -1) == e[t].name then
|
||||
e[t].state=translate("Enable")
|
||||
e[t].state=translate("Enabled")
|
||||
else
|
||||
e[t].state=translate("Disable")
|
||||
e[t].state=translate("Disabled")
|
||||
end
|
||||
e[t].check=translate(config_check(o))
|
||||
end
|
||||
@ -75,7 +75,7 @@ if a then
|
||||
ck.template="openclash/cfg_check"
|
||||
sb.template="openclash/sub_info_show"
|
||||
|
||||
btnis=tb:option(Button,"switch",translate("Switch Config"))
|
||||
btnis=tb:option(Button,"switch",translate("Switch"))
|
||||
btnis.template="openclash/other_button"
|
||||
btnis.render=function(o,t,a)
|
||||
if not e[t] then return false end
|
||||
@ -172,4 +172,4 @@ if uci:get("openclash", "config", "dler_token") then
|
||||
return m, dler, form, s, ap, d
|
||||
else
|
||||
return m, form, s, ap, d
|
||||
end
|
||||
end
|
||||
|
@ -33,7 +33,8 @@ if not lan_ip or lan_ip == "" then
|
||||
end
|
||||
m = Map("openclash", translate("Overwrite Settings"))
|
||||
m.pageaction = false
|
||||
m.description = translate("Note: To restore the default configuration, try accessing:").." <a href='javascript:void(0)' onclick='javascript:restore_config(this)'>http://"..lan_ip.."/cgi-bin/luci/admin/services/openclash/restore</a>"
|
||||
m.description = translate("Note: To restore the default configuration, try accessing:").." <a href='javascript:void(0)' onclick='javascript:restore_config(this)'>http://"..lan_ip.."/cgi-bin/luci/admin/services/openclash/restore</a>"..
|
||||
"<br/>"..font_green..translate("For More Useful Meta Core Functions Go Wiki")..": "..font_off.."<a href='javascript:void(0)' onclick='javascript:return winOpen(\"https://wiki.metacubex.one/\")'>"..translate("https://wiki.metacubex.one/").."</a>"
|
||||
|
||||
s = m:section(TypedSection, "openclash")
|
||||
s.anonymous = true
|
||||
@ -147,7 +148,7 @@ o = s:taboption("dns", Flag, "enable_custom_dns", font_red..bold_on..translate("
|
||||
o.description = font_red..bold_on..translate("Set OpenClash Upstream DNS Resolve Server")..bold_off..font_off
|
||||
o.default = 0
|
||||
|
||||
o = s:taboption("dns", Flag, "enable_respect_rules", font_red..bold_on..translate("Respect Rules")..bold_off..font_off)
|
||||
o = s:taboption("dns", Flag, "enable_respect_rules", font_red..bold_on..translate("Respect Rules").."(respect-rules)"..bold_off..font_off)
|
||||
o.description = font_red..bold_on..translate("Whether or not The Connection to the DNS Server Follow the Rules in Config")..bold_off..font_off
|
||||
o.default = 0
|
||||
|
||||
@ -292,14 +293,6 @@ o = s:taboption("meta", Flag, "enable_unified_delay", font_red..bold_on..transla
|
||||
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"))
|
||||
o.description = translate("Whether to Enable Process Rules, If You Are Not Sure, Please Choose off Which Useful in Router Environment")
|
||||
o:value("0", translate("Disable"))
|
||||
@ -347,62 +340,21 @@ o.description = translate("Custom The Force and Skip Sniffing Doamin Lists")
|
||||
o.default = 0
|
||||
o:depends("enable_meta_sniffer", "1")
|
||||
|
||||
sniffing_domain_force = s:taboption("meta", Value, "sniffing_domain_force")
|
||||
sniffing_domain_force:depends("enable_meta_sniffer_custom", "1")
|
||||
sniffing_domain_force.template = "cbi/tvalue"
|
||||
sniffing_domain_force.description = translate("Will Override Dns Queries If Domains in The List")
|
||||
sniffing_domain_force.rows = 20
|
||||
sniffing_domain_force.wrap = "off"
|
||||
sniffer_custom = s:taboption("meta", Value, "sniffer_custom")
|
||||
sniffer_custom:depends("enable_meta_sniffer_custom", "1")
|
||||
sniffer_custom.template = "cbi/tvalue"
|
||||
sniffer_custom.rows = 20
|
||||
sniffer_custom.wrap = "off"
|
||||
|
||||
function sniffing_domain_force.cfgvalue(self, section)
|
||||
return NXFS.readfile("/etc/openclash/custom/openclash_force_sniffing_domain.yaml") or ""
|
||||
function sniffer_custom.cfgvalue(self, section)
|
||||
return NXFS.readfile("/etc/openclash/custom/openclash_custom_sniffer.yaml") or ""
|
||||
end
|
||||
function sniffing_domain_force.write(self, section, value)
|
||||
function sniffer_custom.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n?", "\n")
|
||||
local old_value = NXFS.readfile("/etc/openclash/custom/openclash_force_sniffing_domain.yaml")
|
||||
local old_value = NXFS.readfile("/etc/openclash/custom/openclash_custom_sniffer.yaml")
|
||||
if value ~= old_value then
|
||||
NXFS.writefile("/etc/openclash/custom/openclash_force_sniffing_domain.yaml", value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
sniffing_port_filter = s:taboption("meta", Value, "sniffing_port_filter")
|
||||
sniffing_port_filter:depends("enable_meta_sniffer_custom", "1")
|
||||
sniffing_port_filter.template = "cbi/tvalue"
|
||||
sniffing_port_filter.description = translate("Will Only Sniffing If Ports in The List")
|
||||
sniffing_port_filter.rows = 20
|
||||
sniffing_port_filter.wrap = "off"
|
||||
|
||||
function sniffing_port_filter.cfgvalue(self, section)
|
||||
return NXFS.readfile("/etc/openclash/custom/openclash_sniffing_ports_filter.yaml") or ""
|
||||
end
|
||||
function sniffing_port_filter.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n?", "\n")
|
||||
local old_value = NXFS.readfile("/etc/openclash/custom/openclash_sniffing_ports_filter.yaml")
|
||||
if value ~= old_value then
|
||||
NXFS.writefile("/etc/openclash/custom/openclash_sniffing_ports_filter.yaml", value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
sniffing_domain_filter = s:taboption("meta", Value, "sniffing_domain_filter")
|
||||
sniffing_domain_filter:depends("enable_meta_sniffer_custom", "1")
|
||||
sniffing_domain_filter.template = "cbi/tvalue"
|
||||
sniffing_domain_filter.description = translate("Will Disable Sniffing If Domains(sni) in The List")
|
||||
sniffing_domain_filter.rows = 20
|
||||
sniffing_domain_filter.wrap = "off"
|
||||
|
||||
function sniffing_domain_filter.cfgvalue(self, section)
|
||||
return NXFS.readfile("/etc/openclash/custom/openclash_sniffing_domain_filter.yaml") or ""
|
||||
end
|
||||
function sniffing_domain_filter.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n?", "\n")
|
||||
local old_value = NXFS.readfile("/etc/openclash/custom/openclash_sniffing_domain_filter.yaml")
|
||||
if value ~= old_value then
|
||||
NXFS.writefile("/etc/openclash/custom/openclash_sniffing_domain_filter.yaml", value)
|
||||
NXFS.writefile("/etc/openclash/custom/openclash_custom_sniffer.yaml", value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -121,7 +121,7 @@ o = a:option(Button, "Commit", " ")
|
||||
o.inputtitle = translate("Commit Settings")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
m.uci:commit("openclash")
|
||||
end
|
||||
|
||||
@ -129,7 +129,7 @@ o = a:option(Button, "Apply", " ")
|
||||
o.inputtitle = translate("Update Config")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
m.uci:set("openclash", "config", "enable", 1)
|
||||
m.uci:commit("openclash")
|
||||
uci:foreach("openclash", "config_subscribe",
|
||||
|
@ -177,9 +177,9 @@ else
|
||||
e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",a.mtime)
|
||||
end
|
||||
if uci:get("openclash", "config", "config_path") and string.sub(uci:get("openclash", "config", "config_path"), 23, -1) == e[t].name then
|
||||
e[t].state=translate("Enable")
|
||||
e[t].state=translate("Enabled")
|
||||
else
|
||||
e[t].state=translate("Disable")
|
||||
e[t].state=translate("Disabled")
|
||||
end
|
||||
e[t].size=fs.filesize(a.size)
|
||||
e[t].check=translate(config_check(o))
|
||||
@ -201,7 +201,7 @@ st.template="openclash/cfg_check"
|
||||
ck.template="openclash/cfg_check"
|
||||
sb.template="openclash/sub_info_show"
|
||||
|
||||
btnis=tb:option(Button,"switch",translate("Switch Config"))
|
||||
btnis=tb:option(Button,"switch",translate("Switch"))
|
||||
btnis.template="openclash/other_button"
|
||||
btnis.render=function(o,t,a)
|
||||
if not e[t] then return false end
|
||||
|
@ -59,7 +59,7 @@ o.rempty = false
|
||||
|
||||
---- interface
|
||||
o = s:option(Value, "interface", translate("Specific Interface"))
|
||||
o.description = translate("DNS Lookup Only Through The Specific Interface")..translate("(Only TUN Core)")
|
||||
o.description = translate("DNS Lookup Only Through The Specific Interface")
|
||||
local interfaces = SYS.exec("ls -l /sys/class/net/ 2>/dev/null |awk '{print $9}' 2>/dev/null")
|
||||
for interface in string.gmatch(interfaces, "%S+") do
|
||||
o:value(interface)
|
||||
@ -68,6 +68,11 @@ o:value("Disable", translate("Disable"))
|
||||
o.default = "Disable"
|
||||
o.rempty = false
|
||||
|
||||
---- direct-nameserver
|
||||
o = s:option(Flag, "direct_nameserver", translate("Direct Nameserver"), translate("Use For Domain Need Direct")..translate("(Only Meta Core)"))
|
||||
o.rmempty = false
|
||||
o.default = o.disbled
|
||||
|
||||
---- Node Domain Resolve
|
||||
o = s:option(Flag, "node_resolve", translate("Node Domain Resolve"), translate("Use For Node Domain Resolve")..translate("(Only Meta Core)"))
|
||||
o.rmempty = false
|
||||
@ -79,6 +84,12 @@ o:depends("type", "https")
|
||||
o.rmempty = false
|
||||
o.default = o.disbled
|
||||
|
||||
---- Skip-cert-verify
|
||||
o = s:option(Flag, "skip_cert_verify", translate("skip-cert-verify"), translate("skip-cert-verify")..translate("(Only Meta Core)"))
|
||||
o:depends("type", "https")
|
||||
o.rmempty = false
|
||||
o.default = o.disbled
|
||||
|
||||
---- ECS Subnet
|
||||
o = s:option(Value, "ecs_subnet", translate("ECS Subnet"),translate("Specify the ECS Subnet Address")..translate("(Only Meta Core)"))
|
||||
o:depends("type", "https")
|
||||
|
@ -227,7 +227,7 @@ end
|
||||
o:value("DIRECT")
|
||||
o:value("REJECT")
|
||||
|
||||
o = s:option(ListValue, "OpenAI", translate("OpenAI"))
|
||||
o = s:option(ListValue, "AI_Suite", translate("AI Suite"))
|
||||
o:depends("rule_name", "lhie1")
|
||||
o.rmempty = true
|
||||
for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
|
||||
@ -407,7 +407,7 @@ o:value("REJECT")
|
||||
end
|
||||
|
||||
local t = {
|
||||
{Commit, Back}
|
||||
{Commit, Back}
|
||||
}
|
||||
a = m:section(Table, t)
|
||||
|
||||
@ -415,16 +415,16 @@ o = a:option(Button,"Commit", " ")
|
||||
o.inputtitle = translate("Commit Settings")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
m.uci:commit(openclash)
|
||||
--luci.http.redirect(m.redirect)
|
||||
m.uci:commit(openclash)
|
||||
--luci.http.redirect(m.redirect)
|
||||
end
|
||||
|
||||
o = a:option(Button,"Back", " ")
|
||||
o.inputtitle = translate("Back Settings")
|
||||
o.inputstyle = "reset"
|
||||
o.write = function()
|
||||
m.uci:revert(openclash, sid)
|
||||
luci.http.redirect(m.redirect)
|
||||
m.uci:revert(openclash, sid)
|
||||
luci.http.redirect(m.redirect)
|
||||
end
|
||||
|
||||
m:append(Template("openclash/toolbar_show"))
|
||||
|
@ -87,7 +87,7 @@ return r
|
||||
end
|
||||
|
||||
local t = {
|
||||
{Refresh, Create, Delete_all, Apply}
|
||||
{Refresh, Create, Delete_all, Apply}
|
||||
}
|
||||
|
||||
a = proxy_form:section(Table, t)
|
||||
|
@ -255,8 +255,6 @@ o = a:option(Button,"Load_Config", " ")
|
||||
o.inputtitle = translate("Read Config")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
m.uci:set("openclash", "config", "enable", 0)
|
||||
m.uci:commit("openclash")
|
||||
luci.sys.call("/usr/share/openclash/yml_groups_get.sh 2>/dev/null &")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash"))
|
||||
end
|
||||
@ -265,18 +263,14 @@ o = a:option(Button, "Commit", " ")
|
||||
o.inputtitle = translate("Commit Settings")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
m.uci:set("openclash", "config", "enable", 0)
|
||||
m.uci:commit("openclash")
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
end
|
||||
|
||||
o = a:option(Button, "Apply", " ")
|
||||
o.inputtitle = translate("Apply Settings")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
m.uci:set("openclash", "config", "enable", 0)
|
||||
m.uci:commit("openclash")
|
||||
fs.unlink("/tmp/Proxy_Group")
|
||||
luci.sys.call("/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 &")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash"))
|
||||
end
|
||||
|
@ -1101,6 +1101,7 @@ o = s:taboption("ipv6", ListValue, "ipv6_mode", translate("IPv6 Proxy Mode"))
|
||||
o:value("0", translate("TProxy Mode"))
|
||||
o:value("1", translate("Redirect Mode"))
|
||||
o:value("2", translate("TUN Mode")..translate("(Only Meta Core)"))
|
||||
o:value("3", translate("Mix Mode")..translate("(Only Meta Core)"))
|
||||
o.default = "0"
|
||||
o:depends("ipv6_enable", "1")
|
||||
|
||||
@ -1108,6 +1109,8 @@ o = s:taboption("ipv6", ListValue, "stack_type_v6", translate("Select Stack Type
|
||||
o.description = translate("Select Stack Type For TUN Mode, According To The Running Speed on Your Machine")
|
||||
o:depends({ipv6_mode= "2", en_mode = "redir-host"})
|
||||
o:depends({ipv6_mode= "2", en_mode = "fake-ip"})
|
||||
o:depends({ipv6_mode= "3", en_mode = "redir-host"})
|
||||
o:depends({ipv6_mode= "3", en_mode = "fake-ip"})
|
||||
o:value("system", translate("System "))
|
||||
o:value("gvisor", translate("gVisor"))
|
||||
o:value("mixed", translate("Mixed")..translate("(Only Meta Core)"))
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<%
|
||||
local val = self:cfgvalue(section)
|
||||
if val == translate("Enable") or val == translate("Config Normal") or val == translate("Exist") then
|
||||
if val == translate("Enable") or val == translate("Enabled") or val == translate("Config Normal") or val == translate("Exist") then
|
||||
%>
|
||||
<div style="color: green; font-weight:bold;">
|
||||
<%
|
||||
|
@ -357,9 +357,7 @@ var myEditor_name_cus_r2 = document.getElementById("cbid.openclash.config.custom
|
||||
var myEditor_fake_filter = document.getElementById("cbid.openclash.config.custom_fake_filter");
|
||||
var myEditor_custom_domain_dns = document.getElementById("cbid.openclash.config.custom_domain_dns");
|
||||
var myEditor_edit_file = document.getElementById("cbid.openclash.config.edit_file");
|
||||
var myEditor_sniffing_domain_force = document.getElementById("cbid.openclash.config.sniffing_domain_force");
|
||||
var myEditor_sniffing_domain_filter = document.getElementById("cbid.openclash.config.sniffing_domain_filter");
|
||||
var myEditor_sniffing_port_filter = document.getElementById("cbid.openclash.config.sniffing_port_filter");
|
||||
var myEditor_custom_sniffer = document.getElementById("cbid.openclash.config.sniffer_custom");
|
||||
|
||||
if (myEditor_hosts) {
|
||||
editor(myEditor_hosts, 'false', '100%', '300px');
|
||||
@ -390,19 +388,10 @@ if (myEditor_custom_domain_dns) {
|
||||
other_editor(myEditor_custom_domain_dns, 'false', '100%', '300px');
|
||||
};
|
||||
|
||||
if (myEditor_sniffing_domain_force) {
|
||||
other_editor(myEditor_sniffing_domain_force, 'false', '100%', '300px');
|
||||
if (myEditor_custom_sniffer) {
|
||||
other_editor(myEditor_custom_sniffer, 'false', '100%', '300px');
|
||||
};
|
||||
|
||||
if (myEditor_sniffing_domain_filter) {
|
||||
other_editor(myEditor_sniffing_domain_filter, 'false', '100%', '300px');
|
||||
};
|
||||
|
||||
if (myEditor_sniffing_port_filter) {
|
||||
other_editor(myEditor_sniffing_port_filter, 'false', '100%', '300px');
|
||||
};
|
||||
|
||||
|
||||
var core_log = document.getElementById("core_log");
|
||||
var oc_log = document.getElementById("cbid.openclash.config.clog");
|
||||
if (core_log && oc_log) {
|
||||
|
@ -225,20 +225,20 @@ function line_tolocal(str){
|
||||
var cn = 0;
|
||||
var sn = 0;
|
||||
str.trim().split('\n').forEach(function(v, i) {
|
||||
var regex = /"([^"]*)"/g;
|
||||
var regex = /(time=)"([^"]*)"/g;
|
||||
var res = regex.exec(v);
|
||||
if (res) {
|
||||
var dt = new Date(res[1]);
|
||||
var dt = new Date(res[2]);
|
||||
}
|
||||
else {
|
||||
var dtt = new Date(v.substring(0,19));
|
||||
}
|
||||
if (dt && dt != "Invalid Date"){
|
||||
if (v.indexOf("level=") != -1) {
|
||||
var log_info = v.substring(res[1].length + 7);
|
||||
var log_info = v.substring(res[2].length + 7);
|
||||
}
|
||||
else {
|
||||
var log_info = v.substring(res[1].length + 2);
|
||||
var log_info = v.substring(res[2].length + 2);
|
||||
}
|
||||
cstrt[cn]=dt.getFullYear()+"-"+p(dt.getMonth()+1)+"-"+p(dt.getDate())+" "+p(dt.getHours())+":"+p(dt.getMinutes())+":"+p(dt.getSeconds())+log_info;
|
||||
cn = cn + 1;
|
||||
|
@ -303,7 +303,7 @@
|
||||
if (localStorage.getItem('privacy_my_ip') != 'true') {
|
||||
$$.getElementById('ip-upaiyun').innerHTML = resp.data.remote_addr;
|
||||
};
|
||||
$$.getElementById('ip-upaiyun-geo').innerHTML = resp.data.remote_addr_location.country + resp.data.remote_addr_location.province + resp.data.remote_addr_location.city + ' ' + resp.data.remote_addr_location.isp;
|
||||
$$.getElementById('ip-upaiyun-geo').innerHTML = resp.data.remote_addr_location.country + ' ' + resp.data.remote_addr_location.province + ' ' + resp.data.remote_addr_location.city + ' ' + resp.data.remote_addr_location.isp;
|
||||
//IP.parseIPIpip(resp.data.remote_addr, 'ip-upaiyun-geo');
|
||||
addTitleOnOverflow();
|
||||
})
|
||||
@ -379,7 +379,7 @@
|
||||
if (localStorage.getItem('privacy_my_ip') != 'true') {
|
||||
$$.getElementById('ip-pcol').innerHTML = data.ip;
|
||||
};
|
||||
$$.getElementById('ip-pcol-geo').innerHTML = `${data.pro}${data.city}${data.region} ${pcisp[1]}`;
|
||||
$$.getElementById('ip-pcol-geo').innerHTML = `${data.pro} ${data.city} ${data.region} ${pcisp[1]}`;
|
||||
addTitleOnOverflow();
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,14 @@
|
||||
<head>
|
||||
<style>
|
||||
.dot-typing{position:relative;left:-9999px;width:10px;height:10px;border-radius:5px;background-color:#9880ff;color:#9880ff;box-shadow:9984px 0 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px 0 0 0 #9880ff;animation:dotTyping 1.5s infinite linear}@keyframes dotTyping{0%{box-shadow:9984px 0 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px 0 0 0 #9880ff}16.667%{box-shadow:9984px -10px 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px 0 0 0 #9880ff}33.333%{box-shadow:9984px 0 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px 0 0 0 #9880ff}50%{box-shadow:9984px 0 0 0 #9880ff,9999px -10px 0 0 #9880ff,10014px 0 0 0 #9880ff}66.667%{box-shadow:9984px 0 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px 0 0 0 #9880ff}83.333%{box-shadow:9984px 0 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px -10px 0 0 #9880ff}100%{box-shadow:9984px 0 0 0 #9880ff,9999px 0 0 0 #9880ff,10014px 0 0 0 #9880ff}}
|
||||
.arrow-down{
|
||||
display:inline-block;
|
||||
width:0px;
|
||||
height:0px;
|
||||
border-style:solid;
|
||||
border-width:10px;
|
||||
border-color: rgb(65 122 180) transparent transparent transparent;
|
||||
}
|
||||
|
||||
.radio-button{
|
||||
display: none;
|
||||
white-space: nowrap;
|
||||
@ -36,7 +44,7 @@
|
||||
<tr>
|
||||
<td colspan="4" width="100%">
|
||||
<p style="margin: 10px 0; text-align: center">
|
||||
<img id="_logo" src="/luci-static/resources/openclash/img/meta.png?<%=random%>" loading="lazy" width="150px" height="150px" onload="return logo_check(this,this.src,'https://raw.githubusercontent.com/vernesong/OpenClash/<%=RELEASE_BRANCH%>/img/meta.png')" onerror="return logo_error(this,'/luci-static/resources/openclash/img/meta.png?<%=random%>')" title="Hello, World!" alt="OpenClash" onclick="return homepage()" />
|
||||
<img id="_logo" src="/luci-static/resources/openclash/img/logo.png?<%=random%>" loading="lazy" width="150px" height="150px" onload="return logo_check(this,this.src,'https://raw.githubusercontent.com/vernesong/OpenClash/<%=RELEASE_BRANCH%>/img/meta.png')" onerror="return logo_error(this,'/luci-static/resources/openclash/img/logo.png?<%=random%>')" title="Hello, World!" alt="OpenClash" onclick="return homepage()" />
|
||||
</p>
|
||||
<p id="_clashversion" style="margin: 10px 0; text-align: center">
|
||||
<img src="/luci-static/resources/openclash/img/version.svg?<%=random%>" alt="currentversion" height="21px" onclick="return go_update()">
|
||||
@ -71,11 +79,11 @@
|
||||
</span></td><td width="25%"><%:Control Panel Login Port%></td><td width="25%" align="left" id="_dapo"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"><%:Proxy Mode%></td><td width="25%" align="left"><span id="radio-de"><%:Collecting data...%></span><span id="radio-mode" class="radio-button">
|
||||
<input type="radio" id="rule" name="radios" value="rule" checked onclick="return switch_rule_mode(this.value)"/>
|
||||
<label for="rule">Rule</label>
|
||||
<label for="rule"><%:Rule%></label>
|
||||
<input type="radio" id="global" name="radios" value="global" onclick="return switch_rule_mode(this.value)"/>
|
||||
<label for="global">Global</label>
|
||||
<label for="global"><%:Global%></label>
|
||||
<input type="radio" id="direct" name="radios" value="direct" onclick="return switch_rule_mode(this.value)"/>
|
||||
<label for="direct">Direct</label>
|
||||
<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 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">
|
||||
@ -147,8 +155,8 @@
|
||||
</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 id="hid_btn" style="text-align: center;" onclick="hid_btn_action()">
|
||||
<div id="hid_icon" class="arrow-down"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -217,6 +225,7 @@
|
||||
var radio_ru_mode = document.getElementById('radio-ru-mode');
|
||||
var radio_ru = document.getElementsByName("radios-ru");
|
||||
var radio_run_normal = document.getElementById("run_normal");
|
||||
var hid_icon = document.getElementById("hid_icon");
|
||||
var script_radio;
|
||||
var script_radio_label;
|
||||
var hid_btn_if = true;
|
||||
@ -226,6 +235,7 @@
|
||||
var luci_protocol;
|
||||
var ws_t;
|
||||
var ws_c;
|
||||
var ws_m;
|
||||
var state_refresh;
|
||||
var s;
|
||||
var gr;
|
||||
@ -286,10 +296,15 @@
|
||||
};
|
||||
|
||||
function ws_open() {
|
||||
if (ws_t) {ws_t.close();}
|
||||
if (ws_c) {ws_c.close();}
|
||||
if (ws_m) {ws_m.close();}
|
||||
ws_t = new WebSocket(luci_protocol+"/traffic?token="+status.dase);
|
||||
ws_c = new WebSocket(luci_protocol+"/connections?token="+status.dase);
|
||||
ws_m = new WebSocket(luci_protocol+"/memory?token="+status.dase);
|
||||
ws_t.onmessage = ws_tmessage;
|
||||
ws_c.onmessage = ws_cmessage;
|
||||
ws_m.onmessage = ws_mmessage;
|
||||
ws_t.onerror = ws_terror;
|
||||
ws_t.onopen = function (event) {
|
||||
ws_connect = true;
|
||||
@ -542,6 +557,7 @@
|
||||
hid_2.style.display = "";
|
||||
hid_3.style.display = "";
|
||||
state.style.display = "block";
|
||||
hid_icon.style.borderColor = "transparent transparent rgb(65 122 180) transparent";
|
||||
hid_btn_if = false;
|
||||
clearInterval(state_refresh);
|
||||
state_refresh=setInterval("state_get()",1000*2);
|
||||
@ -550,6 +566,7 @@
|
||||
hid_2.style.display = "none";
|
||||
hid_3.style.display = "none";
|
||||
state.style.display = "none";
|
||||
hid_icon.style.borderColor = "rgb(65 122 180) transparent transparent transparent";
|
||||
hid_btn_if = true;
|
||||
clearInterval(state_refresh);
|
||||
}
|
||||
@ -601,7 +618,6 @@
|
||||
function show_sys() {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "toolbar_show_sys")%>', null, function(x, status) {
|
||||
if (x && x.status == 200 && x.responseText != "") {
|
||||
document.getElementById("mem_t").innerHTML = "<font style=\"color:green\">"+status.mem+"</font>";
|
||||
if (status.cpu <= 50) {
|
||||
document.getElementById("cpu_t").innerHTML = "<font style=\"color:green\">"+status.cpu+" %</font>";
|
||||
}
|
||||
@ -616,7 +632,6 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
document.getElementById("mem_t").innerHTML = "<font style=\"color:green\">0 KB</font>";
|
||||
document.getElementById("cpu_t").innerHTML = "<font style=\"color:green\">0 %</font>";
|
||||
}
|
||||
});
|
||||
@ -658,6 +673,16 @@
|
||||
else {
|
||||
document.getElementById("connect_t").innerHTML = "<font style=\"color:green\">0</font>";
|
||||
}
|
||||
};
|
||||
|
||||
function ws_mmessage(event) {
|
||||
var data = JSON.parse(event.data)
|
||||
if (data.inuse) {
|
||||
document.getElementById("mem_t").innerHTML = "<font style=\"color:green\">"+bytesToSize(data.inuse)+"/S</font>";
|
||||
}
|
||||
else {
|
||||
document.getElementById("mem_t").innerHTML = "<font style=\"color:green\">0 KB</font>";
|
||||
}
|
||||
show_sys();
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
<%:Current Config File%>:
|
||||
<select class="tool_label_select" id="cfg_name">
|
||||
</select>
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Switch Config%>" onclick="return switch_config(this)" />
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Switch%>" onclick="return switch_config(this)" />
|
||||
|
||||
</span>
|
||||
</li>
|
||||
|
@ -53,10 +53,10 @@ msgstr "第三方规则订阅"
|
||||
msgid "Dashboard Settings"
|
||||
msgstr "外部控制"
|
||||
|
||||
msgid "Enable"
|
||||
msgid "Enabled"
|
||||
msgstr "启用"
|
||||
|
||||
msgid "Disable"
|
||||
msgid "Disabled"
|
||||
msgstr "停用"
|
||||
|
||||
msgid "Running"
|
||||
@ -912,7 +912,7 @@ msgstr "文件名"
|
||||
msgid "Grammar Check"
|
||||
msgstr "语法检查"
|
||||
|
||||
msgid "Switch Config"
|
||||
msgid "Switch"
|
||||
msgstr "切换"
|
||||
|
||||
msgid "Size"
|
||||
@ -1647,6 +1647,9 @@ msgstr "版本内核更新成功!"
|
||||
msgid "Core Update Failed. Please Make Sure Enough Flash Memory Space or Selected Correct Core Platform And Try Again!"
|
||||
msgstr "版本内核更新失败,请确认设备闪存空间足够或内核平台正确后再试!"
|
||||
|
||||
msgid "Core Update Failed. Please Make Sure Enough Flash Memory Space And Try Again!"
|
||||
msgstr "版本内核更新失败,请确认设备闪存空间足够后再试!"
|
||||
|
||||
msgid "No Compiled Version Selected, Please Select In Update Page And Try Again!"
|
||||
msgstr "未选择编译版本,请到升级页面选择后再试!"
|
||||
|
||||
@ -1983,20 +1986,20 @@ msgstr "第二步: 组件运行前检查..."
|
||||
msgid "Step 3: Modify The Config File..."
|
||||
msgstr "第三步: 修改配置文件..."
|
||||
|
||||
msgid "Step 3: Quick Start Mode, Skip Modify The Config File..."
|
||||
msgstr "第三步: 快速启动模式,跳过修改配置文件..."
|
||||
|
||||
msgid "Step 4: Start Running The Clash Core..."
|
||||
msgstr "第四步: 启动主程序..."
|
||||
|
||||
msgid "Step 5: Check The Core Status..."
|
||||
msgstr "第五步: 检查内核启动状态..."
|
||||
msgid "Step 5: Set Dnsmasq..."
|
||||
msgstr "第五步: 设置 Dnsmasq 程序..."
|
||||
|
||||
msgid "Step 6: Set Firewall Rules..."
|
||||
msgstr "第六步: 设置防火墙规则..."
|
||||
|
||||
msgid "Step 7: Restart Dnsmasq..."
|
||||
msgstr "第七步: 重启 Dnsmasq 程序..."
|
||||
|
||||
msgid "Step 8: Add Cron Rules, Start Daemons..."
|
||||
msgstr "第八步: 添加计划任务,启动进程守护程序..."
|
||||
msgid "Step 7: Add Cron Rules, Start Daemons..."
|
||||
msgstr "第七步: 添加计划任务,启动进程守护程序..."
|
||||
|
||||
msgid "OpenClash Start Successful!"
|
||||
msgstr "OpenClash 启动成功,请等待服务器上线!"
|
||||
@ -2049,8 +2052,8 @@ msgstr "守护程序:已尝试自动重启三次 Clash 内核,为防止频
|
||||
msgid "Watchdog: Log Size Limit, Clean Up All Log Records..."
|
||||
msgstr "守护程序:因日志大小限制,清理所有日志内容..."
|
||||
|
||||
msgid "Watchdog: Setting Firewall For Enabling Redirect..."
|
||||
msgstr "守护程序:检测到转发规则顺序错误,修改插件防火墙规则..."
|
||||
msgid "Watchdog: Setting Firewall For Rules Order..."
|
||||
msgstr "守护程序:检测到防火墙规则顺序有误,修改插件防火墙规则..."
|
||||
|
||||
msgid "Watchdog: Force Reset DNS Hijack..."
|
||||
msgstr "守护程序:重新设置 Dnsmasq 的 DNS 转发选项..."
|
||||
@ -2760,9 +2763,6 @@ msgstr "发生了一些错误,测试失败..."
|
||||
msgid "Network instability may occur during testing, Are you sure want to start test?"
|
||||
msgstr "测试过程中可能会造成网络不稳定,确定要开始测试吗?"
|
||||
|
||||
msgid "Error: Edit Vmess Compatible Failed,"
|
||||
msgstr "错误:Vmess 节点兼容性修改失败,"
|
||||
|
||||
msgid "Subscription Info"
|
||||
msgstr "订阅信息"
|
||||
|
||||
@ -2874,23 +2874,11 @@ msgstr "(仅 TUN 内核)"
|
||||
msgid "(TUN&Meta Core)"
|
||||
msgstr "(TUN&Meta 内核)"
|
||||
|
||||
msgid "Will Override Dns Queries If Domains in The List"
|
||||
msgstr "列表中的域名将会强制进行探测(嗅探)"
|
||||
|
||||
msgid "Will Disable Sniffing If Domains(sni) in The List"
|
||||
msgstr "列表中的域名(sni)不会进行探测(嗅探)"
|
||||
|
||||
msgid "Will Only Sniffing If Ports in The List"
|
||||
msgstr "仅探测(嗅探)列表中指定的协议端口"
|
||||
|
||||
msgid "Custom Sniffer Settings"
|
||||
msgstr "自定义流量探测(嗅探)设置"
|
||||
|
||||
msgid "Custom The Force and Skip Sniffing Doamin Lists"
|
||||
msgstr "自定义强制和忽略流量探测(嗅探)的域名列表"
|
||||
|
||||
msgid "Warning: Only TUN Core Support Script Mode, Switch To The Rule Mode!"
|
||||
msgstr "警告:仅 TUN 内核支持 Script 模式,已切换为 Rule 模式!"
|
||||
msgstr "自定义强制和忽略流量探测(嗅探)的域名列表等"
|
||||
|
||||
msgid "Enable Tcp Concurrent"
|
||||
msgstr "*启用 TCP 并发"
|
||||
@ -2919,6 +2907,12 @@ msgstr "指定策略组(支持正则匹配)"
|
||||
msgid "Group Use For Proxy The DNS"
|
||||
msgstr "用于代理此 DNS 的策略组"
|
||||
|
||||
msgid "Direct Nameserver"
|
||||
msgstr "直连域名解析"
|
||||
|
||||
msgid "Use For Domain Need Direct"
|
||||
msgstr "用于解析直连域名的 IP 地址"
|
||||
|
||||
msgid "Node Domain Resolve"
|
||||
msgstr "节点域名解析"
|
||||
|
||||
@ -3036,8 +3030,8 @@ msgstr "绕过指定区域 IPv6 黑名单"
|
||||
msgid "Domains or IPs in The List Will Not be Affected by The China IP Route Option, Depend on Dnsmasq"
|
||||
msgstr "列表中的域名或 IP 将不会受到绕过指定区域 IP 选项的影响,此功能依赖于 Dnsmasq"
|
||||
|
||||
msgid "Warning: You May Need to Turn off The Rebinding Protection Option of Dnsmasq When Hosts Has Set a Reserved Address"
|
||||
msgstr "警告:Hosts 设置了保留地址时需要关闭 Dnsmasq 的重绑定保护选项才能生效"
|
||||
msgid "Warning: You May Need to Turn off The Rebinding Protection Option of Dnsmasq When Hosts Has Set a Reserved Address..."
|
||||
msgstr "警告:Hosts 设置了保留地址时需要关闭 Dnsmasq 的重绑定保护选项才能生效..."
|
||||
|
||||
msgid "Auto Select Logic"
|
||||
msgstr "*自动选择逻辑"
|
||||
@ -3072,9 +3066,6 @@ msgstr "探测(嗅探)纯 IP 连接"
|
||||
msgid "Download Failed:"
|
||||
msgstr "下载失败:"
|
||||
|
||||
msgid "Tip: Waiting for TUN Interface Start..."
|
||||
msgstr "提示:正在等待 TUN 接口启动..."
|
||||
|
||||
msgid "Warning: Dnsmasq not Support nftset, Use ipset..."
|
||||
msgstr "警告:Dnsmasq 不支持 nftset, 使用 ipset 代替..."
|
||||
|
||||
@ -3234,8 +3225,8 @@ msgstr "Redirect 模式"
|
||||
msgid "TUN Mode"
|
||||
msgstr "TUN 模式"
|
||||
|
||||
msgid "TUN Mode"
|
||||
msgstr "TUN 模式"
|
||||
msgid "Mix Mode"
|
||||
msgstr "Mix 混合模式【UDP-TUN,TCP-转发】"
|
||||
|
||||
msgid "Tip: IPv6 Proxy Mode is Redirect..."
|
||||
msgstr "提示:IPv6 代理模式为 Redirect..."
|
||||
@ -3246,6 +3237,9 @@ msgstr "提示:IPv6 代理模式为 TUN..."
|
||||
msgid "Tip: IPv6 Proxy Mode is TProxy..."
|
||||
msgstr "提示:IPv6 代理模式为 TProxy..."
|
||||
|
||||
msgid "Tip: IPv6 Proxy Mode is Mix..."
|
||||
msgstr "提示:IPv6 代理模式为 Mix 混合..."
|
||||
|
||||
msgid "Warning: Can't Settting Only Intranet Allowed Function, Get IPv4 WAN Interfaces error, Please Verify The Firewall's WAN Zone Name is wan, Ignore This IF The Device Does not Have a WAN Interfaces..."
|
||||
msgstr "警告:设置仅允许内网功能失败,无法获取 IPv4 的 WAN 接口名称,请确保防火墙设置中 IPv4 WAN 区域的名称为 wan,如设备无 WAN 口请忽略此提示..."
|
||||
|
||||
@ -3288,12 +3282,6 @@ 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"
|
||||
|
||||
@ -3397,4 +3385,49 @@ msgid "Override the ECS Subnet Address"
|
||||
msgstr "强制覆盖 DNS 查询的子网区域地址"
|
||||
|
||||
msgid "Tip: Respect-rules Option Need Proxy-server-nameserver Option Must Be Setted, Auto Set to"
|
||||
msgstr "提示:使用 Respect-rules 功能时 Proxy-server-nameserver 必须配置,插件将默认将其设置为"
|
||||
msgstr "提示:使用 Respect-rules 功能时 Proxy-server-nameserver 必须配置,插件将默认将其设置为"
|
||||
|
||||
msgid "Tip: Config File"
|
||||
msgstr "提示:配置文件"
|
||||
|
||||
msgid "Downloading URL"
|
||||
msgstr "订阅的下载链接为"
|
||||
|
||||
msgid "Downloading User-Agent"
|
||||
msgstr "订阅的 User-Agent 为"
|
||||
|
||||
msgid "Warning: Option"
|
||||
msgstr "警告:选项"
|
||||
|
||||
msgid "Tip: Option"
|
||||
msgstr "提示:选项"
|
||||
|
||||
msgid "is Setted"
|
||||
msgstr "设置了"
|
||||
|
||||
msgid "as DNS Server Which May Cause DNS Loop, Please Consider Removing It When DNS Works Abnormally..."
|
||||
msgstr "作为 DNS 服务器,这可能造成 DNS 回环错误,如发现 DNS 工作异常请考虑移除该设置..."
|
||||
|
||||
msgid "as DNS Server Which May Cause DNS Loop, Already Remove It..."
|
||||
msgstr "作为 DNS 服务器,这可能造成 DNS 回环错误,已移除该设置..."
|
||||
|
||||
msgid "Error: Set Custom DNS Failed,"
|
||||
msgstr "错误:设置自定义 DNS 错误,"
|
||||
|
||||
msgid "Error: Set proxy-server-nameserver Failed,"
|
||||
msgstr "错误:设置 proxy-server-nameserver 错误,"
|
||||
|
||||
msgid "Error: Set direct-nameserver Failed,"
|
||||
msgstr "错误:设置 direct-nameserver 错误,"
|
||||
|
||||
msgid "Error: Set fallback-filter Failed,"
|
||||
msgstr "错误:设置 fallback-filter 错误,"
|
||||
|
||||
msgid "Rule"
|
||||
msgstr "规则"
|
||||
|
||||
msgid "Global"
|
||||
msgstr "全局"
|
||||
|
||||
msgid "Direct"
|
||||
msgstr "直连"
|
||||
|
@ -57,7 +57,7 @@ config openclash 'config'
|
||||
option router_self_proxy '1'
|
||||
option release_branch 'master'
|
||||
option dashboard_type 'Official'
|
||||
option yacd_type 'Official'
|
||||
option yacd_type 'Meta'
|
||||
option append_default_dns '0'
|
||||
option enable_respect_rules '0'
|
||||
option geo_custom_url 'https://testingcf.jsdelivr.net/gh/alecthw/mmdb_china_ip_list@release/lite/Country.mmdb'
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -14,6 +14,9 @@ fallback-filter:
|
||||
geoip: true
|
||||
geoip-code: CN
|
||||
ipcidr:
|
||||
- ::/128
|
||||
- ::1/128
|
||||
- 2001::/32
|
||||
- 0.0.0.0/8
|
||||
- 10.0.0.0/8
|
||||
- 100.64.0.0/10
|
||||
@ -37,4 +40,4 @@ fallback-filter:
|
||||
- "+.githubusercontent.com"
|
||||
- "+.googlevideo.com"
|
||||
- "+.msftconnecttest.com"
|
||||
- "+.msftncsi.com"
|
||||
- "+.msftncsi.com"
|
||||
|
@ -12,29 +12,37 @@ LOG_FILE="/tmp/openclash.log"
|
||||
CONFIG_FILE="$1" #config path
|
||||
|
||||
#Simple Demo:
|
||||
#General Demo
|
||||
#Key Overwrite Demo
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--value
|
||||
#ruby_edit "$CONFIG_FILE" "['redir-port']" "7892"
|
||||
#ruby_edit "$CONFIG_FILE" "['secret']" "123456"
|
||||
#ruby_edit "$CONFIG_FILE" "['dns']['enable']" "true"
|
||||
#ruby_edit "$CONFIG_FILE" "['dns']['proxy-server-nameserver']" "['https://doh.pub/dns-query','https://223.5.5.5:443/dns-query']"
|
||||
|
||||
#Hash Demo
|
||||
#Hash Overwrite Demo
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--hash type value
|
||||
#ruby_edit "$CONFIG_FILE" "['experimental']" "{'sniff-tls-sni'=>true}"
|
||||
#ruby_edit "$CONFIG_FILE" "['sniffer']" "{'sniffing'=>['tls','http']}"
|
||||
#ruby_edit "$CONFIG_FILE" "['dns']['nameserver-policy']" "{'+.msftconnecttest.com'=>'114.114.114.114', '+.msftncsi.com'=>'114.114.114.114', 'geosite:gfw'=>['https://dns.cloudflare.com/dns-query', 'https://dns.google/dns-query#ecs=1.1.1.1/24&ecs-override=true'], 'geosite:cn'=>['114.114.114.114'], 'geosite:geolocation-!cn'=>['https://dns.cloudflare.com/dns-query', 'https://dns.google/dns-query#ecs=1.1.1.1/24&ecs-override=true']}"
|
||||
#ruby_edit "$CONFIG_FILE" "['sniffer']" "{'enable'=>true, 'parse-pure-ip'=>true, 'force-domain'=>['+.netflix.com', '+.nflxvideo.net', '+.amazonaws.com', '+.media.dssott.com'], 'skip-domain'=>['+.apple.com', 'Mijia Cloud', 'dlg.io.mi.com', '+.oray.com', '+.sunlogin.net'], 'sniff'=>{'TLS'=>nil, 'HTTP'=>{'ports'=>[80, '8080-8880'], 'override-destination'=>true}}}"
|
||||
|
||||
#Array Demo:
|
||||
#Array Insert Value Demo:
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--position(start from 0, end with -1)
|
||||
#4--value
|
||||
#ruby_arr_insert "$CONFIG_FILE" "['dns']['nameserver']" "0" "114.114.114.114"
|
||||
|
||||
#Array Add From Yaml File Demo:
|
||||
#Array Insert Other Array Demo:
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--position(start from 0, end with -1)
|
||||
#4--array
|
||||
#ruby_arr_insert_arr "$CONFIG_FILE" "['dns']['proxy-server-nameserver']" "0" "['https://doh.pub/dns-query','https://223.5.5.5:443/dns-query']"
|
||||
|
||||
#Array Insert From Yaml File Demo:
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--position(start from 0, end with -1)
|
||||
@ -42,7 +50,20 @@ CONFIG_FILE="$1" #config path
|
||||
#5--value key name in #4 file
|
||||
#ruby_arr_add_file "$CONFIG_FILE" "['dns']['fallback-filter']['ipcidr']" "0" "/etc/openclash/custom/openclash_custom_fallback_filter.yaml" "['fallback-filter']['ipcidr']"
|
||||
|
||||
#Ruby Script Demo:
|
||||
#Delete Array Value Demo:
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--value
|
||||
#ruby_delete "$CONFIG_FILE" "['dns']['nameserver']" "114.114.114.114"
|
||||
|
||||
#Delete Key Demo:
|
||||
#1--config path
|
||||
#2--key name
|
||||
#3--key name
|
||||
#ruby_delete "$CONFIG_FILE" "['dns']" "nameserver"
|
||||
#ruby_delete "$CONFIG_FILE" "" "dns"
|
||||
|
||||
#Ruby Script Demo:
|
||||
#ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
|
||||
# begin
|
||||
# Value = YAML.load_file('$CONFIG_FILE');
|
||||
|
@ -0,0 +1,41 @@
|
||||
# 嗅探域名 可选配置
|
||||
sniffer:
|
||||
## 对 redir-host 类型识别的流量进行强制嗅探
|
||||
## 如:Tun、Redir 和 TProxy 并 DNS 为 redir-host 皆属于
|
||||
force-dns-mapping: true
|
||||
## 对所有未获取到域名的流量进行强制嗅探
|
||||
parse-pure-ip: true
|
||||
# 是否使用嗅探结果作为实际访问,默认 true
|
||||
# 全局配置,优先级低于 sniffer.sniff 实际配置
|
||||
override-destination: false
|
||||
sniff: # TLS 和 QUIC 默认如果不配置 ports 默认嗅探 443
|
||||
QUIC:
|
||||
ports: [ 443 ]
|
||||
|
||||
TLS:
|
||||
ports: [443, 8443]
|
||||
|
||||
# 默认嗅探 80
|
||||
HTTP:
|
||||
ports: [80, 8080-8880]
|
||||
# 是否使用嗅探结果作为实际访问
|
||||
override-destination: true
|
||||
force-domain:
|
||||
# - '+' # Force all domain to use sniffer
|
||||
- "+.netflix.com"
|
||||
- "+.nflxvideo.net"
|
||||
- "+.amazonaws.com"
|
||||
- "+.media.dssott.com"
|
||||
## 对嗅探结果进行跳过
|
||||
skip-domain:
|
||||
- '+.apple.com'
|
||||
- Mijia Cloud
|
||||
- dlg.io.mi.com
|
||||
- +.oray.com
|
||||
- +.sunlogin.net
|
||||
- +.push.apple.com
|
||||
#- geosite:cn
|
||||
# skip-src-address: # 对于来源ip跳过嗅探
|
||||
# - 192.168.0.3/32
|
||||
# skip-dst-address: # 对于目标ip跳过嗅探
|
||||
# - 192.168.0.3/32
|
@ -1,6 +0,0 @@
|
||||
force-domain:
|
||||
# - '+'
|
||||
- '+.netflix.com'
|
||||
- '+.nflxvideo.net'
|
||||
- '+.amazonaws.com'
|
||||
- '+.media.dssott.com'
|
@ -1,7 +0,0 @@
|
||||
skip-domain:
|
||||
- '+.apple.com'
|
||||
- Mijia Cloud
|
||||
- dlg.io.mi.com
|
||||
- +.oray.com
|
||||
- +.sunlogin.net
|
||||
#- geosite:cn
|
@ -1,12 +0,0 @@
|
||||
sniff:
|
||||
# TLS 默认如果不配置 ports 默认嗅探 443
|
||||
TLS:
|
||||
# ports: [443, 8443]
|
||||
|
||||
# 默认嗅探 80
|
||||
HTTP:
|
||||
# 需要嗅探的端口
|
||||
|
||||
ports: [80, 8080-8880]
|
||||
# 是否使用嗅探结果作为实际访问
|
||||
override-destination: true
|
@ -22,26 +22,19 @@ payload:
|
||||
- DOMAIN-SUFFIX,claude.ai
|
||||
|
||||
# > Copilot
|
||||
- DOMAIN-SUFFIX,bing.com
|
||||
- DOMAIN-SUFFIX,bingapis.com
|
||||
- DOMAIN-SUFFIX,microsoft-falcon.io
|
||||
- DOMAIN-SUFFIX,microsoftapp.net
|
||||
- DOMAIN,api.msn.com
|
||||
- DOMAIN,assets.msn.com
|
||||
- DOMAIN,copilot.microsoft.com
|
||||
- DOMAIN,location.microsoft.com
|
||||
- DOMAIN,login.microsoftonline.com
|
||||
- DOMAIN,self.events.data.microsoft.com
|
||||
- DOMAIN-SUFFIX,copilot.microsoft.com
|
||||
|
||||
# > Gemini
|
||||
- DOMAIN-SUFFIX,gemini.google.com
|
||||
- DOMAIN,apis.google.com
|
||||
- DOMAIN,colab.research.google.com
|
||||
- DOMAIN,content-developerprofiles-pa.googleapis.com
|
||||
- DOMAIN,generativelanguage.googleapis.com
|
||||
- DOMAIN-SUFFIX,generativelanguage.googleapis.com
|
||||
- DOMAIN-SUFFIX,proactivebackend-pa.googleapis.com
|
||||
|
||||
# > Meta AI
|
||||
- DOMAIN-SUFFIX,meta.ai
|
||||
|
||||
# > Perplexity AI
|
||||
- DOMAIN-SUFFIX,perplexity.ai
|
||||
- DOMAIN-SUFFIX,perplexity.ai
|
||||
|
||||
# > Siri
|
||||
- DOMAIN-SUFFIX,apple-relay.apple.com
|
||||
- DOMAIN,guzzoni.smoot.apple.com
|
@ -30,9 +30,7 @@ cp -f "/etc/openclash/custom/openclash_custom_fake_filter.list" "/usr/share/open
|
||||
cp -f "/etc/openclash/custom/openclash_custom_domain_dns.list" "/usr/share/openclash/backup/openclash_custom_domain_dns.list" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_custom_domain_dns_policy.list" "/usr/share/openclash/backup/openclash_custom_domain_dns_policy.list" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_custom_fallback_filter.yaml" "/usr/share/openclash/backup/openclash_custom_fallback_filter.yaml" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_force_sniffing_domain.yaml" "/usr/share/openclash/backup/openclash_force_sniffing_domain.yaml" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_sniffing_domain_filter.yaml" "/usr/share/openclash/backup/openclash_sniffing_domain_filter.yaml" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_sniffing_ports_filter.yaml" "/usr/share/openclash/backup/openclash_sniffing_ports_filter.yaml" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_custom_sniffer.yaml" "/usr/share/openclash/backup/openclash_custom_sniffer.yaml" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_custom_localnetwork_ipv4.list" "/usr/share/openclash/backup/openclash_custom_localnetwork_ipv4.list" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_custom_localnetwork_ipv6.list" "/usr/share/openclash/backup/openclash_custom_localnetwork_ipv6.list" >/dev/null 2>&1
|
||||
cp -f "/etc/openclash/custom/openclash_custom_chnroute_pass.list" "/usr/share/openclash/backup/openclash_custom_chnroute_pass.list" >/dev/null 2>&1
|
||||
@ -102,17 +100,6 @@ uci -q commit openclash
|
||||
if [ -f "/tmp/openclash.bak" ]; then
|
||||
mv -f "/tmp/openclash.bak" "/etc/config/openclash" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash/." "/etc/openclash/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_config/." "/etc/openclash/config/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_core/." "/etc/openclash/core/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_history/." "/etc/openclash/history/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_proxy_provider/." "/etc/openclash/proxy_provider/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_rule_provider/." "/etc/openclash/rule_provider/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_game_rules/." "/etc/openclash/game_rules/" >/dev/null 2>&1
|
||||
mv -f "/tmp/openclash_custom_rules.list.bak" "/etc/openclash/custom/openclash_custom_rules.list" >/dev/null 2>&1
|
||||
mv -f "/tmp/openclash_custom_rules_2.list.bak" "/etc/openclash/custom/openclash_custom_rules_2.list" >/dev/null 2>&1
|
||||
mv -f "/tmp/openclash_custom_hosts.list.bak" "/etc/openclash/custom/openclash_custom_hosts.list" >/dev/null 2>&1
|
||||
mv -f "/tmp/openclash_custom_fake_filter.list.bak" "/etc/openclash/custom/openclash_custom_fake_filter.list" >/dev/null 2>&1
|
||||
mv -f "/tmp/openclash_custom_domain_dns.list.bak" "/etc/openclash/custom/openclash_custom_domain_dns.list" >/dev/null 2>&1
|
||||
if [ -d "/tmp/openclash_dashboard/" ]; then
|
||||
rm -rf "/usr/share/openclash/ui/dashboard/" >/dev/null 2>&1
|
||||
cp -rf "/tmp/openclash_dashboard/." "/usr/share/openclash/ui/dashboard/" >/dev/null 2>&1
|
||||
@ -124,13 +111,18 @@ if [ -f "/tmp/openclash.bak" ]; then
|
||||
rm -rf "/tmp/openclash_yacd/" >/dev/null 2>&1
|
||||
fi
|
||||
rm -rf "/etc/openclash/openclash" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/fake_filter.list" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/openclash_servers_fake_filter.conf" >/dev/null 2>&1
|
||||
rm -rf /etc/openclash/core/clash >/dev/null 2>&1
|
||||
rm -rf /etc/openclash/core/clash_tun >/dev/null 2>&1
|
||||
rm -rf /etc/openclash/accelerated-domains.china.conf >/dev/null 2>&1
|
||||
rm -rf "/tmp/openclash" >/dev/null 2>&1
|
||||
rm -rf "/tmp/openclash.bak" >/dev/null 2>&1
|
||||
#old version files
|
||||
rm -rf "/etc/openclash/fake_filter.list" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/openclash_servers_fake_filter.conf" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/core/clash" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/core/clash_tun" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/accelerated-domains.china.conf" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/custom/openclash_force_sniffing_domain.yaml" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/custom/openclash_sniffing_ports_filter.yaml" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/custom/openclash_sniffing_port_filter.yaml" >/dev/null 2>&1
|
||||
rm -rf "/etc/openclash/custom/openclash_sniffing_domain_filter.yaml" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
uci -q set openclash.config.enable=0
|
||||
|
@ -2,4 +2,8 @@ module YAML
|
||||
class << self
|
||||
alias_method :load, :unsafe_load if YAML.respond_to? :unsafe_load
|
||||
end
|
||||
|
||||
def self.LOG(info)
|
||||
puts Time.new.strftime("%Y-%m-%d %H:%M:%S") + " #{info}"
|
||||
end
|
||||
end
|
@ -50,7 +50,6 @@ config_test()
|
||||
{
|
||||
if [ -f "$CLASH" ]; then
|
||||
LOG_OUT "Config File Download Successful, Test If There is Any Errors..."
|
||||
chmod o+w "$CFG_FILE" 2>/dev/null
|
||||
test_info=$(nohup $CLASH -t -d $CLASH_CONFIG -f "$CFG_FILE")
|
||||
local IFS=$'\n'
|
||||
for i in $test_info; do
|
||||
@ -71,13 +70,17 @@ config_test()
|
||||
|
||||
config_download()
|
||||
{
|
||||
LOG_OUT "Tip: Config File【$name】Downloading User-Agent【$sub_ua】..."
|
||||
if [ -n "$subscribe_url_param" ]; then
|
||||
if [ -n "$c_address" ]; then
|
||||
echo "$LOGTIME Tip: Config File【$name】Downloading URL【$c_address$subscribe_url_param】..." >> $LOG_FILE
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" "$c_address""$subscribe_url_param" -o "$CFG_FILE" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
else
|
||||
echo "$LOGTIME Tip: Config File【$name】Downloading URL【https://api.dler.io/sub$subscribe_url_param】..." >> $LOG_FILE
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" https://api.dler.io/sub"$subscribe_url_param" -o "$CFG_FILE" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
else
|
||||
echo "$LOGTIME Tip: Config File【$name】Downloading URL【$subscribe_url】..." >> $LOG_FILE
|
||||
curl -SsL --connect-timeout 30 -m 60 --speed-time 30 --speed-limit 1 --retry 2 -H "$sub_ua" "$subscribe_url" -o "$CFG_FILE" 2>&1 |sed ':a;N;$!ba; s/\n/ /g' | awk -v time="$(date "+%Y-%m-%d %H:%M:%S")" -v file="$CFG_FILE" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"
|
||||
fi
|
||||
}
|
||||
@ -100,44 +103,63 @@ config_cus_up()
|
||||
LOG_OUT "Config File【$name】is Replaced Successfully, Start Picking Nodes..."
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
|
||||
begin
|
||||
threads = [];
|
||||
Value = YAML.load_file('$CONFIG_FILE');
|
||||
if Value.has_key?('proxies') and not Value['proxies'].to_a.empty? then
|
||||
Value['proxies'].reverse.each{
|
||||
|x|
|
||||
if not '$key_match_param'.empty? then
|
||||
if not /$key_match_param/i =~ x['name'] then
|
||||
Value['proxies'].delete(x)
|
||||
Value['proxy-groups'].each{
|
||||
|g|
|
||||
g['proxies'].reverse.each{
|
||||
|p|
|
||||
if p == x['name'] then
|
||||
g['proxies'].delete(p)
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
end;
|
||||
if not '$key_ex_match_param'.empty? then
|
||||
if /$key_ex_match_param/i =~ x['name'] then
|
||||
if Value['proxies'].include?(x) then
|
||||
Value['proxies'].delete(x)
|
||||
Value['proxy-groups'].each{
|
||||
|g|
|
||||
g['proxies'].reverse.each{
|
||||
|p|
|
||||
if p == x['name'] then
|
||||
g['proxies'].delete(p)
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end;
|
||||
}
|
||||
if not '$key_match_param'.empty? then
|
||||
threads << Thread.new {
|
||||
if not /$key_match_param/i =~ x['name'] then
|
||||
Value['proxies'].delete(x)
|
||||
Value['proxy-groups'].each{
|
||||
|g|
|
||||
g['proxies'].reverse.each{
|
||||
|p|
|
||||
if p == x['name'] then
|
||||
g['proxies'].delete(p)
|
||||
end;
|
||||
};
|
||||
};
|
||||
end;
|
||||
};
|
||||
end;
|
||||
if not '$key_ex_match_param'.empty? then
|
||||
threads << Thread.new {
|
||||
if /$key_ex_match_param/i =~ x['name'] then
|
||||
if Value['proxies'].include?(x) then
|
||||
Value['proxies'].delete(x)
|
||||
Value['proxy-groups'].each{
|
||||
|g|
|
||||
g['proxies'].reverse.each{
|
||||
|p|
|
||||
if p == x['name'] then
|
||||
g['proxies'].delete(p)
|
||||
end;
|
||||
};
|
||||
};
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
};
|
||||
end;
|
||||
if Value.key?('proxy-providers') and not Value['proxy-providers'].nil? then
|
||||
Value['proxy-providers'].values.each do
|
||||
|i|
|
||||
threads << Thread.new {
|
||||
if not '$key_match_param'.empty? then
|
||||
i['filter'] = '(?i)$key_match_param';
|
||||
end;
|
||||
if not '$key_ex_match_param'.empty? then
|
||||
i['exclude-filter'] = '(?i)$key_ex_match_param';
|
||||
end;
|
||||
};
|
||||
end;
|
||||
end;
|
||||
threads.each(&:join);
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Filter Proxies Failed,【' + e.message + '】'
|
||||
YAML.LOG('Error: Filter Proxies Failed,【' + e.message + '】');
|
||||
ensure
|
||||
File.open('$CONFIG_FILE','w') {|f| YAML.dump(Value, f)};
|
||||
end" 2>/dev/null >> $LOG_FILE
|
||||
@ -236,37 +258,6 @@ change_dns()
|
||||
fi
|
||||
}
|
||||
|
||||
field_name_check()
|
||||
{
|
||||
#检查field名称(不兼容旧写法)
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
|
||||
Value = YAML.load_file('$CFG_FILE');
|
||||
if Value.key?('Proxy') or Value.key?('Proxy Group') or Value.key?('Rule') or Value.key?('rule-provider') then
|
||||
if Value.key?('Proxy') then
|
||||
Value['proxies'] = Value['Proxy']
|
||||
Value.delete('Proxy')
|
||||
puts '${LOGTIME} Warning: Proxy is no longer used. Auto replaced by proxies'
|
||||
end
|
||||
if Value.key?('Proxy Group') then
|
||||
Value['proxy-groups'] = Value['Proxy Group']
|
||||
Value.delete('Proxy Group')
|
||||
puts '${LOGTIME} Warning: Proxy Group is no longer used. Auto replaced by proxy-groups'
|
||||
end
|
||||
if Value.key?('Rule') then
|
||||
Value['rules'] = Value['Rule']
|
||||
Value.delete('Rule')
|
||||
puts '${LOGTIME} Warning: Rule is no longer used. Auto replaced by rules'
|
||||
end
|
||||
if Value.key?('rule-provider') then
|
||||
Value['rule-providers'] = Value['rule-provider']
|
||||
Value.delete('rule-provider')
|
||||
puts '${LOGTIME} Warning: rule-provider is no longer used. Auto replaced by rule-providers'
|
||||
end;
|
||||
File.open('$CFG_FILE','w') {|f| YAML.dump(Value, f)};
|
||||
end;
|
||||
" 2>/dev/null >> $LOG_FILE
|
||||
}
|
||||
|
||||
config_download_direct()
|
||||
{
|
||||
if pidof clash >/dev/null && [ "$router_self_proxy" = 1 ]; then
|
||||
@ -291,7 +282,7 @@ config_download_direct()
|
||||
begin
|
||||
YAML.load_file('$CFG_FILE');
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Unable To Parse Config File,【' + e.message + '】'
|
||||
YAML.LOG('Error: Unable To Parse Config File,【' + e.message + '】');
|
||||
system 'rm -rf ${CFG_FILE} 2>/dev/null'
|
||||
end
|
||||
" 2>/dev/null >> $LOG_FILE
|
||||
@ -305,15 +296,9 @@ config_download_direct()
|
||||
change_dns
|
||||
config_error
|
||||
elif ! "$(ruby_read "$CFG_FILE" ".key?('proxies')")" && ! "$(ruby_read "$CFG_FILE" ".key?('proxy-providers')")" ; then
|
||||
field_name_check
|
||||
if ! "$(ruby_read "$CFG_FILE" ".key?('proxies')")" && ! "$(ruby_read "$CFG_FILE" ".key?('proxy-providers')")" ; then
|
||||
LOG_OUT "Error: Updated Config【$name】Has No Proxy Field, Update Exit..."
|
||||
change_dns
|
||||
config_error
|
||||
else
|
||||
change_dns
|
||||
config_su_check
|
||||
fi
|
||||
LOG_OUT "Error: Updated Config【$name】Has No Proxy Field, Update Exit..."
|
||||
change_dns
|
||||
config_error
|
||||
else
|
||||
change_dns
|
||||
config_su_check
|
||||
@ -494,7 +479,7 @@ sub_info_get()
|
||||
begin
|
||||
YAML.load_file('$CFG_FILE');
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Unable To Parse Config File,【' + e.message + '】'
|
||||
YAML.LOG('Error: Unable To Parse Config File,【' + e.message + '】');
|
||||
system 'rm -rf ${CFG_FILE} 2>/dev/null'
|
||||
end
|
||||
" 2>/dev/null >> $LOG_FILE
|
||||
@ -506,13 +491,8 @@ sub_info_get()
|
||||
LOG_OUT "Config File Format Validation Failed, Trying To Download Without Agent..."
|
||||
config_download_direct
|
||||
elif ! "$(ruby_read "$CFG_FILE" ".key?('proxies')")" && ! "$(ruby_read "$CFG_FILE" ".key?('proxy-providers')")" ; then
|
||||
field_name_check
|
||||
if ! "$(ruby_read "$CFG_FILE" ".key?('proxies')")" && ! "$(ruby_read "$CFG_FILE" ".key?('proxy-providers')")" ; then
|
||||
LOG_OUT "Error: Updated Config【$name】Has No Proxy Field, Trying To Download Without Agent..."
|
||||
config_download_direct
|
||||
else
|
||||
config_su_check
|
||||
fi
|
||||
else
|
||||
config_su_check
|
||||
fi
|
||||
|
@ -68,8 +68,7 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
if [ "$?" == "0" ]; then
|
||||
LOG_OUT "【"$CORE_TYPE"】Core Download Successful, Start Update..."
|
||||
[ -s "/tmp/clash_meta.tar.gz" ] && {
|
||||
rm -rf "$meta_core_path" >/dev/null 2>&1
|
||||
tar zxvf /tmp/clash_meta.tar.gz -C /tmp
|
||||
tar zxvfo /tmp/clash_meta.tar.gz -C /tmp >/dev/null 2>&1
|
||||
mv /tmp/clash /tmp/clash_meta >/dev/null 2>&1
|
||||
rm -rf /tmp/clash_meta.tar.gz >/dev/null 2>&1
|
||||
chmod 4755 /tmp/clash_meta >/dev/null 2>&1
|
||||
|
@ -482,21 +482,10 @@ cat >> "$DEBUG_LOG" <<-EOF
|
||||
\`\`\`
|
||||
EOF
|
||||
|
||||
wan_ip=$(/usr/share/openclash/openclash_get_network.lua "wanip")
|
||||
wan_ip6=$(/usr/share/openclash/openclash_get_network.lua "wanip6")
|
||||
sed -i -E 's/(([0-9]{1,3}\.){2})[0-9]{1,3}\.[0-9]{1,3}/\1*\.*/g' "$DEBUG_LOG" 2>/dev/null
|
||||
|
||||
if [ -n "$wan_ip" ]; then
|
||||
for i in $wan_ip; do
|
||||
wanip=$(echo "$i" |awk -F '.' '{print $1"."$2"."$3}')
|
||||
sed -i "s/${wanip}/*WAN IP*/g" "$DEBUG_LOG" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
sed -i -E 's/(:[0-9a-fA-F]{1,4}){3}/:*:*:*/' "$DEBUG_LOG" 2>/dev/null
|
||||
|
||||
if [ -n "$wan_ip6" ]; then
|
||||
for i in $wan_ip6; do
|
||||
wanip=$(echo "$i" |awk -F: 'OFS=":",NF-=1')
|
||||
sed -i "s/${wanip}/*WAN IP*/g" "$DEBUG_LOG" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
sed -i 's/Downloading URL【[^】]*】/Downloading URL【*】/g' "$DEBUG_LOG" 2>/dev/null
|
||||
|
||||
del_lock
|
@ -53,8 +53,8 @@
|
||||
begin
|
||||
YAML.load_file('/tmp/rules.yaml');
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Unable To Parse Updated Rules File,【${rule_name}:' + e.message + '】'
|
||||
system 'rm -rf /tmp/rules.yaml 2>/dev/null'
|
||||
YAML.LOG('Error: Unable To Parse Updated Rules File,【${rule_name}:' + e.message + '】');
|
||||
system 'rm -rf /tmp/rules.yaml 2>/dev/null';
|
||||
end
|
||||
" 2>/dev/null >> $LOG_FILE
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -110,7 +110,7 @@
|
||||
LOG_OUT "Detected that The Downloaded Rule File Has Been Updated, Starting To Replace..."
|
||||
mv /tmp/rules.yaml /usr/share/openclash/res/"$rule_name".yaml >/dev/null 2>&1
|
||||
LOG_OUT "Other Rules【$rule_name】Update Successful!"
|
||||
ifrestart=1
|
||||
restart=1
|
||||
else
|
||||
LOG_OUT "Updated Other Rules【$rule_name】No Change, Do Nothing!"
|
||||
fi
|
||||
@ -119,7 +119,6 @@
|
||||
fi
|
||||
}
|
||||
|
||||
LOGTIME=$(echo $(date "+%Y-%m-%d %H:%M:%S"))
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
RUlE_SOURCE=$(uci get openclash.config.rule_source 2>/dev/null)
|
||||
github_address_mod=$(uci -q get openclash.config.github_address_mod || echo 0)
|
||||
@ -131,7 +130,7 @@
|
||||
OTHER_RULE_FILE="/tmp/other_rule.yaml"
|
||||
CONFIG_FILE=$(uci get openclash.config.config_path 2>/dev/null)
|
||||
CONFIG_NAME=$(echo "$CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null)
|
||||
ifrestart=0
|
||||
restart=0
|
||||
|
||||
if [ -z "$CONFIG_FILE" ]; then
|
||||
for file_name in /etc/openclash/config/*
|
||||
@ -154,8 +153,15 @@
|
||||
if [ -z "$rule_name" ]; then
|
||||
LOG_OUT "Get Other Rules Settings Faild, Update Stop!"
|
||||
fi
|
||||
if [ "$ifrestart" -eq 1 ] && [ "$(unify_ps_prevent)" -eq 0 ] && [ "$(find /tmp/lock/ |grep -v "openclash.lock" |grep -c "openclash")" -le 1 ]; then
|
||||
if [ "$restart" -eq 1 ] && [ "$(unify_ps_prevent)" -eq 0 ] && [ "$(find /tmp/lock/ |grep -v "openclash.lock" |grep -c "openclash")" -le 1 ]; then
|
||||
/etc/init.d/openclash restart >/dev/null 2>&1 &
|
||||
elif [ "$restart" -eq 0 ] && [ "$(unify_ps_prevent)" -eq 0 ] && [ "$(find /tmp/lock/ |grep -v "openclash.lock" |grep -c "openclash")" -le 1 ] && [ "$(uci -q get openclash.config.restart)" -eq 1 ]; then
|
||||
/etc/init.d/openclash restart >/dev/null 2>&1 &
|
||||
uci -q set openclash.config.restart=0
|
||||
uci -q commit openclash
|
||||
elif [ "$restart" -eq 1 ] && [ "$(unify_ps_prevent)" -eq 0 ]; then
|
||||
uci -q set openclash.config.restart=1
|
||||
uci -q commit openclash
|
||||
fi
|
||||
fi
|
||||
rm -rf /tmp/rules.yaml >/dev/null 2>&1
|
||||
|
@ -1,23 +1,20 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/log.sh
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
|
||||
|
||||
CLASH="/etc/openclash/clash"
|
||||
CLASH_CONFIG="/etc/openclash"
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
PROXY_FWMARK="0x162"
|
||||
PROXY_ROUTE_TABLE="0x162"
|
||||
LOGTIME=$(echo $(date "+%Y-%m-%d %H:%M:%S"))
|
||||
CONFIG_FILE="/etc/openclash/$(uci -q get openclash.config.config_path |awk -F '/' '{print $5}' 2>/dev/null)"
|
||||
ipv6_enable=$(uci -q get openclash.config.ipv6_enable)
|
||||
ipv6_enable=$(uci -q get openclash.config.ipv6_enable || echo 0)
|
||||
enable_redirect_dns=$(uci -q get openclash.config.enable_redirect_dns)
|
||||
dns_port=$(uci -q get openclash.config.dns_port)
|
||||
disable_masq_cache=$(uci -q get openclash.config.disable_masq_cache)
|
||||
cfg_update_interval=$(uci -q get openclash.config.config_update_interval || echo 60)
|
||||
log_size=$(uci -q get openclash.config.log_size || echo 1024)
|
||||
core_type=$(uci -q get openclash.config.core_type)
|
||||
router_self_proxy=$(uci -q get openclash.config.router_self_proxy || echo 1)
|
||||
stream_auto_select_interval=$(uci -q get openclash.config.stream_auto_select_interval || echo 30)
|
||||
ipv6_mode=$(uci -q get openclash.config.ipv6_mode || echo 0)
|
||||
skip_proxy_address=$(uci -q get openclash.config.skip_proxy_address || echo 0)
|
||||
CRASH_NUM=0
|
||||
CFG_UPDATE_INT=1
|
||||
@ -26,7 +23,132 @@ SKIP_PROXY_ADDRESS_INTERVAL=30
|
||||
STREAM_AUTO_SELECT=1
|
||||
FW4=$(command -v fw4)
|
||||
|
||||
sleep 60
|
||||
## Skip Proxies Address
|
||||
skip_proxies_address()
|
||||
{
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
|
||||
begin
|
||||
Value = YAML.load_file('$CONFIG_FILE');
|
||||
rescue Exception => e
|
||||
YAML.LOG('Error: Load File Failed,【' + e.message + '】');
|
||||
end;
|
||||
begin
|
||||
threads = [];
|
||||
threadsp = [];
|
||||
set_commands = [];
|
||||
reg = /([0-9a-zA-Z-]{1,}\.)+([a-zA-Z]{2,})/;
|
||||
reg4 = /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/;
|
||||
reg6 = /^(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))|\[(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))\](?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/i;
|
||||
if Value.key?('proxies') or Value.key?('proxy-providers') then
|
||||
firewall_v = '$FW4';
|
||||
if firewall_v.empty? then
|
||||
firewall_v = 'ipt'
|
||||
else
|
||||
firewall_v = 'nft'
|
||||
end;
|
||||
ips = Array.new;
|
||||
servers = Array.new;
|
||||
if Value.key?('proxies') and not Value['proxies'].nil? then
|
||||
Value['proxies'].each do
|
||||
|i|
|
||||
threads << Thread.new {
|
||||
if i['server'] then
|
||||
if servers.include?(i['server']) then
|
||||
next;
|
||||
end;
|
||||
if i['server'] =~ reg and not servers.include?(i['server']) then
|
||||
servers = servers.push(i['server']).uniq
|
||||
syscall = '/usr/share/openclash/openclash_debug_dns.lua 2>/dev/null \"' + i['server'] + '\" \"true\"'
|
||||
result = IO.popen(syscall).read.split(/\n+/)
|
||||
if result then
|
||||
ips = ips | result
|
||||
end;
|
||||
else
|
||||
ips = ips.push(i['server']).uniq
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
end;
|
||||
if Value.key?('proxy-providers') and not Value['proxy-providers'].nil? then
|
||||
Value['proxy-providers'].values.each do
|
||||
|i,path|
|
||||
threads << Thread.new {
|
||||
if i['path'] and not i['path'].empty? then
|
||||
if i['path'].split('/')[0] == '.' then
|
||||
path = '/etc/openclash/'+i['path'].split('./')[1]
|
||||
else
|
||||
path = i['path']
|
||||
end;
|
||||
if File::exist?(path) then
|
||||
if YAML.load_file(path).class == String then
|
||||
YAML.LOG('Warning: Unsupported format, Proxies Address Skip Function Ignore Proxy-providers File【' + path + '】');
|
||||
next
|
||||
end;
|
||||
if YAML.load_file(path).key?('proxies') and not YAML.load_file(path)['proxies'].nil? then
|
||||
YAML.load_file(path)['proxies'].each do
|
||||
|j|
|
||||
if j['server'] then
|
||||
threadsp << Thread.new {
|
||||
if servers.include?(j['server']) then
|
||||
next;
|
||||
end;
|
||||
if j['server'] =~ reg and not servers.include?(j['server']) then
|
||||
servers = servers.push(j['server']).uniq
|
||||
syscall = '/usr/share/openclash/openclash_debug_dns.lua 2>/dev/null \"' + j['server'] + '\" \"true\"'
|
||||
result = IO.popen(syscall).read.split(/\n+/)
|
||||
if result then
|
||||
ips = ips | result
|
||||
end;
|
||||
else
|
||||
ips = ips.push(j['server']).uniq
|
||||
end;
|
||||
};
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
threadsp.each(&:join);
|
||||
};
|
||||
end;
|
||||
end;
|
||||
threads.each(&:join);
|
||||
#Add ip skip
|
||||
if ips and not ips.empty? then
|
||||
threads.clear;
|
||||
ips.each do
|
||||
|ip|
|
||||
threads << Thread.new {
|
||||
if ip and ip =~ reg4 then
|
||||
if firewall_v == 'nft' then
|
||||
set_commands << 'nft add element inet fw4 localnetwork { \"' + ip + '\" } 2>/dev/null'
|
||||
else
|
||||
set_commands << 'ipset add localnetwork \"' + ip + '\" 2>/dev/null'
|
||||
end;
|
||||
elsif ip and ip =~ reg6 then
|
||||
if firewall_v == 'nft' then
|
||||
set_commands << 'nft add element inet fw4 localnetwork6 { \"' + ip + '\" } 2>/dev/null'
|
||||
else
|
||||
set_commands << 'ipset add localnetwork6 \"' + ip + '\" 2>/dev/null'
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
threads.each(&:join);
|
||||
system(set_commands.join('; '));
|
||||
end;
|
||||
end;
|
||||
rescue Exception => e
|
||||
YAML.LOG('Error: Set Proxies Address Skip Failed,【' + e.message + '】');
|
||||
end" 2>/dev/null >> $LOG_FILE
|
||||
}
|
||||
|
||||
#wait for core start complete
|
||||
while ( [ -n "$(unify_ps_pids "/etc/init.d/openclash")" ] )
|
||||
do
|
||||
sleep 1
|
||||
done >/dev/null 2>&1
|
||||
|
||||
while :;
|
||||
do
|
||||
@ -53,52 +175,30 @@ do
|
||||
enable=$(uci -q get openclash.config.enable)
|
||||
|
||||
if [ "$enable" -eq 1 ]; then
|
||||
clash_pids=$(pidof clash |sed 's/$//g' |wc -l)
|
||||
if [ "$clash_pids" -gt 1 ]; then
|
||||
clash_pids=$(pidof clash |sed 's/$//g' |wc -l)
|
||||
if [ "$clash_pids" -gt 1 ]; then
|
||||
LOG_OUT "Watchdog: Multiple Clash Processes, Kill All..."
|
||||
clash_pids=$(pidof clash |sed 's/$//g')
|
||||
for clash_pid in $clash_pids; do
|
||||
kill -9 "$clash_pid" 2>/dev/null
|
||||
done >/dev/null 2>&1
|
||||
sleep 1
|
||||
fi 2>/dev/null
|
||||
if ! pidof clash >/dev/null; then
|
||||
fi 2>/dev/null
|
||||
if ! pidof clash >/dev/null; then
|
||||
CRASH_NUM=$(expr "$CRASH_NUM" + 1)
|
||||
if [ "$CRASH_NUM" -le 3 ]; then
|
||||
if [ "$CRASH_NUM" -le 3 ]; then
|
||||
LOG_OUT "Watchdog: Clash Core Problem, Restart..."
|
||||
touch /tmp/openclash.log 2>/dev/null
|
||||
chmod o+w /etc/openclash/proxy_provider/* 2>/dev/null
|
||||
chmod o+w /etc/openclash/rule_provider/* 2>/dev/null
|
||||
chmod o+w /etc/openclash/history/* 2>/dev/null
|
||||
chmod o+w /tmp/openclash.log 2>/dev/null
|
||||
chmod o+w /etc/openclash/cache.db 2>/dev/null
|
||||
chown nobody:nogroup /etc/openclash/core/* 2>/dev/null
|
||||
capabilties="cap_sys_resource,cap_dac_override,cap_net_raw,cap_net_bind_service,cap_net_admin,cap_sys_ptrace,cap_sys_admin"
|
||||
capsh --caps="${capabilties}+eip" -- -c "capsh --user=nobody --addamb='${capabilties}' -- -c 'nohup $CLASH -d $CLASH_CONFIG -f \"$CONFIG_FILE\" >> $LOG_FILE 2>&1 &'" >> $LOG_FILE 2>&1
|
||||
sleep 3
|
||||
if [ "$core_type" == "TUN" ] || [ "$core_type" == "Meta" ]; then
|
||||
ip route replace default dev utun table "$PROXY_ROUTE_TABLE" 2>/dev/null
|
||||
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" 2>/dev/null
|
||||
if [ "$ipv6_mode" -eq 2 ] && [ "$ipv6_enable" -eq 1 ] && [ "$core_type" == "Meta" ]; then
|
||||
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 addr add fdfe:dcba:9876::1/126 dev utun >/dev/null 2>&1
|
||||
ip -6 route add fdfe:dcba:9876::/126 dev utun proto kernel metric 256 pref medium >/dev/null 2>&1
|
||||
ip -6 route add fe80::/64 dev utun proto kernel metric 256 pref medium >/dev/null 2>&1
|
||||
ip -6 route replace default dev utun table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
sleep 60
|
||||
continue
|
||||
else
|
||||
LOG_OUT "Watchdog: Already Restart 3 Times With Clash Core Problem, Auto-Exit..."
|
||||
/etc/init.d/openclash stop
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
CRASH_NUM=0
|
||||
fi
|
||||
/etc/init.d/openclash reload "core"
|
||||
sleep 10
|
||||
continue
|
||||
else
|
||||
LOG_OUT "Watchdog: Already Restart 3 Times With Clash Core Problem, Auto-Exit..."
|
||||
/etc/init.d/openclash stop
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
CRASH_NUM=0
|
||||
fi
|
||||
fi
|
||||
|
||||
## Porxy history
|
||||
@ -111,16 +211,26 @@ fi
|
||||
LOG_OUT "Watchdog: Log Size Limit, Clean Up All Log Records..."
|
||||
fi
|
||||
|
||||
## 端口转发重启
|
||||
last_line=$(iptables -t nat -nL PREROUTING --line-number |awk '{print $1}' 2>/dev/null |awk 'END {print}' |sed -n '$p')
|
||||
op_line=$(iptables -t nat -nL PREROUTING --line-number |grep "openclash " 2>/dev/null |awk '{print $1}' 2>/dev/null |head -1)
|
||||
if [ "$last_line" != "$op_line" ] && [ -n "$op_line" ]; then
|
||||
pre_lines=$(iptables -nvL PREROUTING -t nat |sed 1,2d |sed -n '/openclash /=' 2>/dev/null |sort -rn)
|
||||
for pre_line in $pre_lines; do
|
||||
iptables -t nat -D PREROUTING "$pre_line" >/dev/null 2>&1
|
||||
done >/dev/null 2>&1
|
||||
iptables -t nat -A PREROUTING -p tcp -j openclash
|
||||
LOG_OUT "Watchdog: Setting Firewall For Enabling Redirect..."
|
||||
## 转发顺序
|
||||
if [ -z "$FW4" ]; then
|
||||
nat_last_line=$(iptables -t nat -nL PREROUTING --line-number |awk '{print $1}' 2>/dev/null |awk 'END {print}' |sed -n '$p')
|
||||
nat_op_line=$(iptables -t nat -nL PREROUTING --line-number |grep -E "openclash|OpenClash" |grep -Ev "DNS|dns" 2>/dev/null |awk '{print $1}' 2>/dev/null |head -1)
|
||||
man_last_line=$(iptables -t mangle -nL PREROUTING --line-number |awk '{print $1}' 2>/dev/null |awk 'END {print}' |sed -n '$p')
|
||||
man_op_line=$(iptables -t mangle -nL PREROUTING --line-number |grep -E "openclash|OpenClash" |grep -Ev "DNS|dns" 2>/dev/null |awk '{print $1}' 2>/dev/null |head -1)
|
||||
if ([ "$nat_last_line" != "$nat_op_line" ] && [ -n "$nat_op_line" ]) || ([ "$man_last_line" != "$man_op_line" ] && [ -n "$man_op_line" ]); then
|
||||
LOG_OUT "Watchdog: Setting Firewall For Rules Order..."
|
||||
/etc/init.d/openclash reload "firewall"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$FW4" ]; then
|
||||
nat_last_handle=$(nft -a list chain inet fw4 dstnat |awk -F '# handle ' '{print$2}' 2>/dev/null |tr -s '\n' |sed -n '$p')
|
||||
nat_op_handle=$(nft -a list chain inet fw4 dstnat |grep -E "openclash|OpenClash" |grep -Ev "DNS|dns" |awk -F '# handle ' '{print$2}' 2>/dev/null |tail -1)
|
||||
man_last_handle=$(nft -a list chain inet fw4 mangle_prerouting |awk -F '# handle ' '{print$2}' 2>/dev/null |tr -s '\n' |sed -n '$p')
|
||||
man_op_handle=$(nft -a list chain inet fw4 mangle_prerouting |grep -E "openclash|OpenClash" |grep -Ev "DNS|dns" |awk -F '# handle ' '{print$2}' 2>/dev/null |tail -1)
|
||||
if ([ "$nat_last_handle" != "$nat_op_handle" ] && [ -n "$nat_op_handle" ]) || ([ "$man_last_handle" != "$man_op_handle" ] && [ -n "$man_op_handle" ]); then
|
||||
LOG_OUT "Watchdog: Setting Firewall For Rules Order..."
|
||||
/etc/init.d/openclash reload "firewall"
|
||||
fi
|
||||
fi
|
||||
|
||||
## Localnetwork 刷新
|
||||
@ -211,103 +321,7 @@ fi
|
||||
## Skip Proxies Address
|
||||
if [ "$skip_proxy_address" -eq 1 ]; then
|
||||
if [ "$SKIP_PROXY_ADDRESS" -eq 1 ] || [ "$(expr "$SKIP_PROXY_ADDRESS" % "$SKIP_PROXY_ADDRESS_INTERVAL")" -eq 0 ]; then
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
|
||||
begin
|
||||
Value = YAML.load_file('$CONFIG_FILE');
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Load File Failed,【' + e.message + '】';
|
||||
end;
|
||||
begin
|
||||
Thread.new{
|
||||
reg = /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/;
|
||||
reg6 = /^(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))|\[(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))\](?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/i;
|
||||
if Value.key?('proxies') or Value.key?('proxy-providers') then
|
||||
firewall_v = '$FW4';
|
||||
if firewall_v.empty? then
|
||||
firewall_v = 'ipt'
|
||||
else
|
||||
firewall_v = 'nft'
|
||||
end;
|
||||
ips = Array.new;
|
||||
servers = Array.new;
|
||||
if Value.key?('proxies') and not Value['proxies'].nil? then
|
||||
Value['proxies'].each do
|
||||
|i|
|
||||
if i['server'] then
|
||||
if not i['server'] =~ reg and not i['server'] =~ reg6 and not servers.include?(i['server']) then
|
||||
servers = servers.push(i['server']).uniq
|
||||
syscall = '/usr/share/openclash/openclash_debug_dns.lua 2>/dev/null \"' + i['server'] + '\" \"true\"'
|
||||
if IO.popen(syscall).read.split(/\n+/) then
|
||||
ips = ips | IO.popen(syscall).read.split(/\n+/)
|
||||
end;
|
||||
else
|
||||
ips = ips.push(i['server']).uniq
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if Value.key?('proxy-providers') and not Value['proxy-providers'].nil? then
|
||||
Value['proxy-providers'].values.each do
|
||||
|i,path|
|
||||
if i['path'] and not i['path'].empty? then
|
||||
if i['path'].split('/')[0] == '.' then
|
||||
path = '/etc/openclash/'+i['path'].split('./')[1]
|
||||
else
|
||||
path = i['path']
|
||||
end;
|
||||
if File::exist?(path) then
|
||||
if YAML.load_file(path).class == String then
|
||||
puts '${LOGTIME} Warning: Unsupported format, Proxies Address Skip Function Ignore Proxy-providers File【' + path + '】';
|
||||
next
|
||||
end;
|
||||
if YAML.load_file(path).key?('proxies') and not YAML.load_file(path)['proxies'].nil? then
|
||||
YAML.load_file(path)['proxies'].each do
|
||||
|j|
|
||||
if j['server'] then
|
||||
if not j['server'] =~ reg and not j['server'] =~ reg6 and not servers.include?(j['server']) then
|
||||
servers = servers.push(j['server']).uniq
|
||||
syscall = '/usr/share/openclash/openclash_debug_dns.lua 2>/dev/null \"' + j['server'] + '\" \"true\"'
|
||||
if IO.popen(syscall).read.split(/\n+/) then
|
||||
ips = ips | IO.popen(syscall).read.split(/\n+/)
|
||||
end;
|
||||
else
|
||||
ips = ips.push(j['server']).uniq
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
#Add ip skip
|
||||
if ips and not ips.empty? then
|
||||
ips.each do
|
||||
|ip|
|
||||
if ip and ip =~ reg then
|
||||
if firewall_v == 'nft' then
|
||||
syscall = 'nft add element inet fw4 localnetwork { \"' + ip + '\" } 2>/dev/null'
|
||||
system(syscall)
|
||||
else
|
||||
syscall = 'ipset add localnetwork \"' + ip + '\" 2>/dev/null'
|
||||
system(syscall)
|
||||
end;
|
||||
elsif ip and ip =~ reg6 then
|
||||
if firewall_v == 'nft' then
|
||||
syscall = 'nft add element inet fw4 localnetwork6 { \"' + ip + '\" } 2>/dev/null'
|
||||
system(syscall)
|
||||
else
|
||||
syscall = 'ipset add localnetwork6 \"' + ip + '\" 2>/dev/null'
|
||||
system(syscall)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
}.join;
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Set Proxies Address Skip Failed,【' + e.message + '】';
|
||||
end" >> $LOG_FILE
|
||||
skip_proxies_address
|
||||
let SKIP_PROXY_ADDRESS++
|
||||
else
|
||||
let SKIP_PROXY_ADDRESS++
|
||||
|
@ -49,7 +49,7 @@ rules:
|
||||
- RULE-SET, Discord, Discord
|
||||
- RULE-SET, Google FCM, Google FCM
|
||||
- RULE-SET, Microsoft, Microsoft
|
||||
- RULE-SET, OpenAI, OpenAI
|
||||
- RULE-SET, AI Suite, AI Suite
|
||||
- RULE-SET, PayPal, PayPal
|
||||
- RULE-SET, Scholar, Scholar
|
||||
- RULE-SET, Speedtest, Speedtest
|
||||
@ -115,7 +115,7 @@ script:
|
||||
'Discord': 'Discord',
|
||||
'Google FCM': 'Google FCM',
|
||||
'Microsoft': 'Microsoft',
|
||||
'OpenAI': 'OpenAI',
|
||||
'AI Suite': 'AI Suite',
|
||||
'PayPal': 'PayPal',
|
||||
'Scholar': 'Scholar',
|
||||
'Speedtest': 'Speedtest',
|
||||
@ -157,360 +157,360 @@ rule-providers:
|
||||
Reject:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Reject.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Reject.yaml
|
||||
path: "./Rules/Reject"
|
||||
interval: 86400
|
||||
Special:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Special.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Special.yaml
|
||||
path: "./Rules/Special"
|
||||
interval: 86400
|
||||
PROXY:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Proxy.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Proxy.yaml
|
||||
path: "./Rules/Proxy"
|
||||
interval: 86400
|
||||
Domestic:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Domestic.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Domestic.yaml
|
||||
path: "./Rules/Domestic"
|
||||
interval: 86400
|
||||
Domestic IPs:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Domestic%20IPs.yaml
|
||||
behavior: classical
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Domestic%20IPs.yaml
|
||||
path: "./Rules/Domestic_IPs"
|
||||
interval: 86400
|
||||
LAN:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/LAN.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/LAN.yaml
|
||||
path: "./Rules/LAN"
|
||||
interval: 86400
|
||||
Netflix:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Netflix.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Netflix.yaml
|
||||
path: "./Rules/Media/Netflix"
|
||||
interval: 86400
|
||||
Spotify:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Spotify.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Spotify.yaml
|
||||
path: "./Rules/Media/Spotify"
|
||||
interval: 86400
|
||||
YouTube:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/YouTube.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/YouTube.yaml
|
||||
path: "./Rules/Media/YouTube"
|
||||
interval: 86400
|
||||
Bilibili:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Bilibili.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Bilibili.yaml
|
||||
path: "./Rules/Media/Bilibili"
|
||||
interval: 86400
|
||||
IQ:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/IQ.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/IQ.yaml
|
||||
path: "./Rules/Media/IQI"
|
||||
interval: 86400
|
||||
IQIYI:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/IQIYI.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/IQIYI.yaml
|
||||
path: "./Rules/Media/IQYI"
|
||||
interval: 86400
|
||||
Letv:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Letv.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Letv.yaml
|
||||
path: "./Rules/Media/Letv"
|
||||
interval: 86400
|
||||
Netease Music:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Netease%20Music.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Netease%20Music.yaml
|
||||
path: "./Rules/Media/Netease_Music"
|
||||
interval: 86400
|
||||
Tencent Video:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Tencent%20Video.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Tencent%20Video.yaml
|
||||
path: "./Rules/Media/Tencent_Video"
|
||||
interval: 86400
|
||||
Youku:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Youku.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Youku.yaml
|
||||
path: "./Rules/Media/Youku"
|
||||
interval: 86400
|
||||
WeTV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/WeTV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/WeTV.yaml
|
||||
path: "./Rules/Media/WeTV"
|
||||
interval: 86400
|
||||
ABC:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/ABC.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/ABC.yaml
|
||||
path: "./Rules/Media/ABC"
|
||||
interval: 86400
|
||||
Abema TV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Abema%20TV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Abema%20TV.yaml
|
||||
path: "./Rules/Media/Abema_TV"
|
||||
interval: 86400
|
||||
Amazon:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Amazon.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Amazon.yaml
|
||||
path: "./Rules/Media/Amazon"
|
||||
interval: 86400
|
||||
Apple Music:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20Music.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20Music.yaml
|
||||
path: "./Rules/Media/Apple_Music"
|
||||
interval: 86400
|
||||
Apple News:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20News.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20News.yaml
|
||||
path: "./Rules/Media/Apple_News"
|
||||
interval: 86400
|
||||
Apple TV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20TV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Apple%20TV.yaml
|
||||
path: "./Rules/Media/Apple_TV"
|
||||
interval: 86400
|
||||
Bahamut:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Bahamut.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Bahamut.yaml
|
||||
path: "./Rules/Media/Bahamut"
|
||||
interval: 86400
|
||||
BBC iPlayer:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/BBC%20iPlayer.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/BBC%20iPlayer.yaml
|
||||
path: "./Rules/Media/BBC_iPlayer"
|
||||
interval: 86400
|
||||
DAZN:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/DAZN.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/DAZN.yaml
|
||||
path: "./Rules/Media/DAZN"
|
||||
interval: 86400
|
||||
Discovery Plus:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Discovery%20Plus.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Discovery%20Plus.yaml
|
||||
path: "./Rules/Media/Discovery_Plus"
|
||||
interval: 86400
|
||||
Disney Plus:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Disney%20Plus.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Disney%20Plus.yaml
|
||||
path: "./Rules/Media/Disney_Plus"
|
||||
interval: 86400
|
||||
encoreTVB:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/encoreTVB.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/encoreTVB.yaml
|
||||
path: "./Rules/Media/encoreTVB"
|
||||
interval: 86400
|
||||
F1 TV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/F1%20TV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/F1%20TV.yaml
|
||||
path: "./Rules/Media/F1_TV"
|
||||
interval: 86400
|
||||
Fox Now:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Fox%20Now.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Fox%20Now.yaml
|
||||
path: "./Rules/Media/Fox_Now"
|
||||
interval: 86400
|
||||
Fox+:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Fox%2B.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Fox%2B.yaml
|
||||
path: "./Rules/Media/Fox+"
|
||||
interval: 86400
|
||||
HBO Go:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/HBO%20Go.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/HBO%20Go.yaml
|
||||
path: "./Rules/Media/HBO_Go"
|
||||
interval: 86400
|
||||
HBO Max:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/HBO%20Max.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/HBO%20Max.yaml
|
||||
path: "./Rules/Media/HBO_Max"
|
||||
interval: 86400
|
||||
Hulu Japan:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Hulu%20Japan.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Hulu%20Japan.yaml
|
||||
path: "./Rules/Media/Hulu_Japan"
|
||||
interval: 86400
|
||||
Hulu:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Hulu.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Hulu.yaml
|
||||
path: "./Rules/Media/Hulu"
|
||||
interval: 86400
|
||||
Japonx:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Japonx.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Japonx.yaml
|
||||
path: "./Rules/Media/Japonx"
|
||||
interval: 86400
|
||||
JOOX:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/JOOX.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/JOOX.yaml
|
||||
path: "./Rules/Media/JOOX"
|
||||
interval: 86400
|
||||
KKBOX:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/KKBOX.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/KKBOX.yaml
|
||||
path: "./Rules/Media/KKBOX"
|
||||
interval: 86400
|
||||
KKTV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/KKTV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/KKTV.yaml
|
||||
path: "./Rules/Media/KKTV"
|
||||
interval: 86400
|
||||
Line TV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Line%20TV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Line%20TV.yaml
|
||||
path: "./Rules/Media/Line_TV"
|
||||
interval: 86400
|
||||
myTV SUPER:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/myTV%20SUPER.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/myTV%20SUPER.yaml
|
||||
path: "./Rules/Media/myTV_SUPER"
|
||||
interval: 86400
|
||||
Niconico:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Niconico.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Niconico.yaml
|
||||
path: "./Rules/Media/Niconico"
|
||||
interval: 86400
|
||||
Pandora:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Pandora.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Pandora.yaml
|
||||
path: "./Rules/Media/Pandora"
|
||||
interval: 86400
|
||||
PBS:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/PBS.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/PBS.yaml
|
||||
path: "./Rules/Media/PBS"
|
||||
interval: 86400
|
||||
Pornhub:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Pornhub.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Pornhub.yaml
|
||||
path: "./Rules/Media/Pornhub"
|
||||
interval: 86400
|
||||
Soundcloud:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Soundcloud.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/Soundcloud.yaml
|
||||
path: "./Rules/Media/Soundcloud"
|
||||
interval: 86400
|
||||
ViuTV:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/ViuTV.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Media/ViuTV.yaml
|
||||
path: "./Rules/Media/ViuTV"
|
||||
interval: 86400
|
||||
Telegram:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Telegram.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Telegram.yaml
|
||||
path: "./Rules/Telegram"
|
||||
interval: 86400
|
||||
Crypto:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Crypto.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Crypto.yaml
|
||||
path: "./Rules/Crypto"
|
||||
interval: 86400
|
||||
Discord:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Discord.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Discord.yaml
|
||||
path: "./Rules/Discord"
|
||||
interval: 86400
|
||||
Steam:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Steam.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Steam.yaml
|
||||
path: "./Rules/Steam"
|
||||
interval: 86400
|
||||
Speedtest:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Speedtest.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Speedtest.yaml
|
||||
path: "./Rules/Speedtest"
|
||||
interval: 86400
|
||||
PayPal:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/PayPal.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/PayPal.yaml
|
||||
path: "./Rules/PayPal"
|
||||
interval: 86400
|
||||
Microsoft:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Microsoft.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Microsoft.yaml
|
||||
path: "./Rules/Microsoft"
|
||||
interval: 86400
|
||||
OpenAI:
|
||||
AI Suite:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/OpenAI.yaml
|
||||
path: "./Rules/OpenAI"
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/AI%20Suite.yaml
|
||||
path: "./Rules/AI Suite"
|
||||
interval: 86400
|
||||
Apple:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Apple.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Apple.yaml
|
||||
path: "./Rules/Apple"
|
||||
interval: 86400
|
||||
Google FCM:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Google%20FCM.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Google%20FCM.yaml
|
||||
path: "./Rules/Google FCM"
|
||||
interval: 86400
|
||||
Scholar:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Scholar.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Scholar.yaml
|
||||
path: "./Rules/Scholar"
|
||||
interval: 86400
|
||||
miHoYo:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/miHoYo.yaml
|
||||
url: https://testingcf.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/miHoYo.yaml
|
||||
path: "./Rules/miHoYo"
|
||||
interval: 86400
|
||||
|
@ -1,6 +1,6 @@
|
||||
放行规则-lhie1(建议置顶并直连),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Special.yaml
|
||||
放行规则-ACL4SSR(建议置顶并直连),ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/,UnBan.yaml
|
||||
国内IP白名单(By lhie1),lhie1,ipcidr,dler-io/Rules/master/Clash/Provider/,Domestic IPs.yaml
|
||||
国内IP白名单(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Domestic IPs.yaml
|
||||
国内域名白名单(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Domestic.yaml
|
||||
国外常用网站合集(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Proxy.yaml
|
||||
广告规则(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/,Reject.yaml
|
||||
|
@ -96,7 +96,18 @@ local Value RUBY_YAML_PARSE
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
return
|
||||
fi
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); Value$2=Value$2.insert($3,'$4').uniq; File.open('$1','w') {|f| YAML.dump(Value, f)}}.join"
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); if not Value.key?($2) or Value$2.nil? then Value$2 = []; end; Value$2=Value$2.insert($3,'$4').uniq; File.open('$1','w') {|f| YAML.dump(Value, f)}}.join"
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "$RUBY_YAML_PARSE" 2>/dev/null
|
||||
}
|
||||
|
||||
#数组指定位置前增加数组
|
||||
ruby_arr_insert_arr()
|
||||
{
|
||||
local Value RUBY_YAML_PARSE
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
return
|
||||
fi
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); if not Value.key?($2) or Value$2.nil? then Value$2 = []; end; ${4}.reverse.each{|x| Value$2=Value$2.insert($3,x).uniq}; File.open('$1','w') {|f| YAML.dump(Value, f)}}.join"
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "$RUBY_YAML_PARSE" 2>/dev/null
|
||||
}
|
||||
|
||||
@ -108,4 +119,14 @@ if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
fi
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); Value$2.each do |i| puts i$3 end}.join"
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "$RUBY_YAML_PARSE" 2>/dev/null
|
||||
}
|
||||
}
|
||||
|
||||
ruby_delete()
|
||||
{
|
||||
local Value RUBY_YAML_PARSE
|
||||
if [ -z "$1" ] || [ -z "$3" ]; then
|
||||
return
|
||||
fi
|
||||
RUBY_YAML_PARSE="Thread.new{Value = YAML.load_file('$1'); Value$2.delete('$3')}.join"
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "$RUBY_YAML_PARSE" 2>/dev/null
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
||||
import{N as o}from"./index-DACeLBg-.js";/**
|
||||
* @license @tabler/icons-solidjs v3.19.0 - MIT
|
||||
*
|
||||
* This source code is licensed under the MIT license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var e=o("outline","reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"}],["path",{d:"M20 4v5h-5"}]]);export{e as I};
|
@ -1 +0,0 @@
|
||||
import{u as B,f as e,ah as J,i as t,ai as I,aj as K,F as x,ak as Q,al as U,am as d,an as Y,ao as ee,g as C,ap as V,aq as R,ar as H,P as te,t as v,A as L,r as j,w as ae,C as re,b as le,y as se,R as ne,$ as k,D as oe,a2 as ie,a3 as ce,B as A,a5 as ue,a1 as G,a6 as de,a9 as ge,aa as he,a0 as q,ae as ve,ag as fe,l as me}from"./index-DWMGWNy8.js";import{c as be,g as pe,a as $e,e as _e,f as N,r as Se}from"./index-6_sXLHMR.js";var xe=v('<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">'),M=v("<option>");const Ce=u=>{const[r]=B();return e(te,{ref:s=>{var n;return(n=u.ref)==null?void 0:n.call(u,s)},get icon(){return e(J,{size:24})},get title(){return r("logsSettings")},get children(){var s=xe(),n=s.firstChild,i=n.firstChild,$=n.nextSibling,m=$.firstChild,w=$.nextSibling,b=w.firstChild;return t(n,e(I,{withDivider:!0,get children(){return r("tableSize")}}),i),i.addEventListener("change",a=>K(a.target.value)),t(i,e(x,{get each(){return Object.values(Q)},children:a=>(()=>{var o=M();return o.value=a,t(o,()=>r(a)),o})()})),t($,e(I,{withDivider:!0,get children(){return r("logLevel")}}),m),m.addEventListener("change",a=>U(a.target.value)),t(m,e(x,{get each(){return[d.Info,d.Error,d.Warning,d.Debug,d.Silent]},children:a=>(()=>{var o=M();return o.value=a,t(o,()=>r(a)),o})()})),t(w,e(I,{withDivider:!0,get children(){return r("logMaxRows")}}),b),b.addEventListener("change",a=>Y(parseInt(a.target.value))),t(b,e(x,{each:ee,children:a=>(()=>{var o=M();return o.value=a,t(o,a),o})()})),C(()=>i.value=V()),C(()=>m.value=R()),C(()=>b.value=H()),s}})};let W=1;const[we,ye]=L([]),[X,Le]=L(!1);j(ae(R,(u,r)=>{if(u===r)return;const s=re("logs",{level:R()});j(()=>{const n=s();!n||X()||(ye(i=>[{...n,seq:W},...i].slice(0,H())),W++)})}));const Fe=()=>({logs:we,paused:X,setPaused:Le});var Ie=v("<span>"),ke=v('<div class="flex h-full flex-col gap-2"><div class="join w-full"><input type=search class="input input-sm join-item input-primary flex-1 flex-shrink-0"></div><div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300"><table><thead class="sticky top-0 z-10"></thead><tbody>'),Me=v("<tr>"),Re=v('<th class=bg-base-200><div class="flex items-center"><div>'),Ee=v('<tr class="hover:!bg-primary hover:text-primary-content">'),De=v("<td class=py-2>");const O=(u,r,s,n)=>{const i=Se(u.getValue(r),s);return n({itemRank:i}),i.passed},Pe=()=>{const u=le();if(!se())return u("/setup",{replace:!0}),null;let r;const[s]=B(),[n,i]=L(""),{logs:$,paused:m,setPaused:w}=Fe(),[b,a]=ne(L([]),{name:"logsTableSorting",storage:localStorage}),o=[{header:s("sequence"),accessorFn:c=>c.seq},{header:s("type"),accessorFn:c=>c.type,cell:({row:c})=>{const p=c.original.type;let g="";switch(p){case d.Error:g="text-error";break;case d.Warning:g="text-warning";break;case d.Info:g="text-info";break;case d.Debug:g="text-success";break}return(()=>{var _=Ie();return k(_,g),t(_,()=>`[${c.original.type}]`),_})()}},{header:s("payload"),accessorFn:c=>c.payload}],E=be({filterFns:{fuzzy:O},state:{get globalFilter(){return n()},get sorting(){return b()}},get data(){return $()},sortDescFirst:!0,columns:o,onGlobalFilterChange:i,onSortingChange:a,globalFilterFn:O,getFilteredRowModel:pe(),getSortedRowModel:$e(),getCoreRowModel:_e()});return(()=>{var c=ke(),p=c.firstChild,g=p.firstChild,_=p.nextSibling,D=_.firstChild,z=D.firstChild,Z=z.nextSibling;return g.$$input=l=>i(l.target.value),t(p,e(A,{class:"btn-primary join-item btn-sm",onClick:()=>w(l=>!l),get icon(){return oe(()=>!!m())()?e(ie,{}):e(ce,{})}}),null),t(p,e(A,{class:"btn-primary join-item btn-sm",onClick:()=>r==null?void 0:r.showModal(),get icon(){return e(ue,{})}}),null),t(z,e(G,{get each(){return E.getHeaderGroups()},children:l=>{const f=l();return(()=>{var h=Me();return t(h,e(G,{get each(){return f.headers},children:y=>{const S=y();return(()=>{var T=Re(),P=T.firstChild,F=P.firstChild;return de(F,"click",S.column.getToggleSortingHandler(),!0),t(F,()=>N(S.column.columnDef.header,S.getContext())),t(P,()=>({asc:e(ge,{}),desc:e(he,{})})[S.column.getIsSorted()]??null,null),C(()=>k(F,q(S.column.getCanSort()&&"cursor-pointer select-none","flex-1"))),T})()}})),h})()}})),t(Z,e(x,{get each(){return E.getRowModel().rows},children:l=>(()=>{var f=Ee();return t(f,e(x,{get each(){return l.getVisibleCells()},children:h=>(()=>{var y=De();return t(y,()=>N(h.column.columnDef.cell,h.getContext())),y})()})),f})()})),t(c,e(Ce,{ref:l=>r=l}),null),C(l=>{var f=s("search"),h=q(ve(V()),"table relative rounded-none");return f!==l.e&&fe(g,"placeholder",l.e=f),h!==l.t&&k(D,l.t=h),l},{e:void 0,t:void 0}),c})()};me(["input","click"]);export{Pe as default};
|
@ -0,0 +1 @@
|
||||
import{u as B,f as e,ab as Z,i as t,ac as F,ad as J,F as x,ae as K,af as U,ag as u,ah as Y,ai as ee,g as C,aj as V,ak as R,al as H,Q as te,t as v,A as L,r as P,w as ae,C as re,b as le,y as se,T as ne,$ as k,D as ie,B as A,a3 as oe,a1 as G,a4 as ce,a0 as N,a8 as de,aa as ue,l as ge}from"./index-DACeLBg-.js";import{c as he,g as ve,a as fe,e as me,I as be,f as pe,h as W,i as $e,j as _e,r as Se}from"./index-GtOz1sEE.js";var xe=v('<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">'),M=v("<option>");const Ce=d=>{const[r]=B();return e(te,{ref:s=>{var n;return(n=d.ref)==null?void 0:n.call(d,s)},get icon(){return e(Z,{size:24})},get title(){return r("logsSettings")},get children(){var s=xe(),n=s.firstChild,o=n.firstChild,$=n.nextSibling,m=$.firstChild,w=$.nextSibling,b=w.firstChild;return t(n,e(F,{withDivider:!0,get children(){return r("tableSize")}}),o),o.addEventListener("change",a=>J(a.target.value)),t(o,e(x,{get each(){return Object.values(K)},children:a=>(()=>{var i=M();return i.value=a,t(i,()=>r(a)),i})()})),t($,e(F,{withDivider:!0,get children(){return r("logLevel")}}),m),m.addEventListener("change",a=>U(a.target.value)),t(m,e(x,{get each(){return[u.Info,u.Error,u.Warning,u.Debug,u.Silent]},children:a=>(()=>{var i=M();return i.value=a,t(i,()=>r(a)),i})()})),t(w,e(F,{withDivider:!0,get children(){return r("logMaxRows")}}),b),b.addEventListener("change",a=>Y(parseInt(a.target.value))),t(b,e(x,{each:ee,children:a=>(()=>{var i=M();return i.value=a,t(i,a),i})()})),C(()=>o.value=V()),C(()=>m.value=R()),C(()=>b.value=H()),s}})};let q=1;const[we,ye]=L([]),[Q,Le]=L(!1);P(ae(R,(d,r)=>{if(d===r)return;const s=re("logs",{level:R()});P(()=>{const n=s();!n||Q()||(ye(o=>[{...n,seq:q},...o].slice(0,H())),q++)})}));const Ie=()=>({logs:we,paused:Q,setPaused:Le});var Fe=v("<span>"),ke=v('<div class="flex h-full flex-col gap-2"><div class="join w-full"><input type=search class="input input-sm join-item input-primary flex-1 flex-shrink-0"></div><div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300"><table><thead class="sticky top-0 z-10"></thead><tbody>'),Me=v("<tr>"),Re=v('<th class=bg-base-200><div class="flex items-center"><div>'),Ee=v('<tr class="hover:!bg-primary hover:text-primary-content">'),De=v("<td class=py-2>");const O=(d,r,s,n)=>{const o=Se(d.getValue(r),s);return n({itemRank:o}),o.passed},je=()=>{const d=le();if(!se())return d("/setup",{replace:!0}),null;let r;const[s]=B(),[n,o]=L(""),{logs:$,paused:m,setPaused:w}=Ie(),[b,a]=ne(L([]),{name:"logsTableSorting",storage:localStorage}),i=[{header:s("sequence"),accessorFn:c=>c.seq},{header:s("type"),accessorFn:c=>c.type,cell:({row:c})=>{const p=c.original.type;let g="";switch(p){case u.Error:g="text-error";break;case u.Warning:g="text-warning";break;case u.Info:g="text-info";break;case u.Debug:g="text-success";break}return(()=>{var _=Fe();return k(_,g),t(_,()=>`[${c.original.type}]`),_})()}},{header:s("payload"),accessorFn:c=>c.payload}],E=he({filterFns:{fuzzy:O},state:{get globalFilter(){return n()},get sorting(){return b()}},get data(){return $()},sortDescFirst:!0,columns:i,onGlobalFilterChange:o,onSortingChange:a,globalFilterFn:O,getFilteredRowModel:ve(),getSortedRowModel:fe(),getCoreRowModel:me()});return(()=>{var c=ke(),p=c.firstChild,g=p.firstChild,_=p.nextSibling,D=_.firstChild,z=D.firstChild,X=z.nextSibling;return g.$$input=l=>o(l.target.value),t(p,e(A,{class:"btn-primary join-item btn-sm",onClick:()=>w(l=>!l),get icon(){return ie(()=>!!m())()?e(be,{}):e(pe,{})}}),null),t(p,e(A,{class:"btn-primary join-item btn-sm",onClick:()=>r==null?void 0:r.showModal(),get icon(){return e(oe,{})}}),null),t(z,e(G,{get each(){return E.getHeaderGroups()},children:l=>{const f=l();return(()=>{var h=Me();return t(h,e(G,{get each(){return f.headers},children:y=>{const S=y();return(()=>{var T=Re(),j=T.firstChild,I=j.firstChild;return ce(I,"click",S.column.getToggleSortingHandler(),!0),t(I,()=>W(S.column.columnDef.header,S.getContext())),t(j,()=>({asc:e($e,{}),desc:e(_e,{})})[S.column.getIsSorted()]??null,null),C(()=>k(I,N(S.column.getCanSort()&&"cursor-pointer select-none","flex-1"))),T})()}})),h})()}})),t(X,e(x,{get each(){return E.getRowModel().rows},children:l=>(()=>{var f=Ee();return t(f,e(x,{get each(){return l.getVisibleCells()},children:h=>(()=>{var y=De();return t(y,()=>W(h.column.columnDef.cell,h.getContext())),y})()})),f})()})),t(c,e(Ce,{ref:l=>r=l}),null),C(l=>{var f=s("search"),h=N(de(V()),"table relative rounded-none");return f!==l.e&&ue(g,"placeholder",l.e=f),h!==l.t&&k(D,l.t=h),l},{e:void 0,t:void 0}),c})()};ge(["input","click"]);export{je as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{u as q,a as H,b as M,c as N,v as T,o as X,e as p,d as G,i as o,f as h,g as J,S as K,B as C,I as O,F as Q,t as $,z as b,s as w,h as E,j as W,k as R,l as Y,m as Z,n as tt}from"./index-DWMGWNy8.js";var a=[];for(var y=0;y<256;++y)a.push((y+256).toString(16).slice(1));function et(t,n=0){return(a[t[n+0]]+a[t[n+1]]+a[t[n+2]]+a[t[n+3]]+"-"+a[t[n+4]]+a[t[n+5]]+"-"+a[t[n+6]]+a[t[n+7]]+"-"+a[t[n+8]]+a[t[n+9]]+"-"+a[t[n+10]]+a[t[n+11]]+a[t[n+12]]+a[t[n+13]]+a[t[n+14]]+a[t[n+15]]).toLowerCase()}var m,nt=new Uint8Array(16);function st(){if(!m&&(m=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m(nt)}var at=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const L={randomUUID:at};function rt(t,n,x){if(L.randomUUID&&!n&&!t)return L.randomUUID();t=t||{};var l=t.random||(t.rng||st)();return l[6]=l[6]&15|64,l[8]=l[8]&63|128,et(l)}var lt=$("<option>"),it=$('<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(s)://{hostname}:{port} 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">'),ot=$('<div class="badge badge-info flex w-full cursor-pointer items-center justify-between gap-4 py-4"><span class=truncate>');const ct=b.object({url:b.string().min(1),secret:b.string()}),ut=()=>{const[t]=q(),n=H(),x=M(),l=s=>{R(s),x("/overview")},_=(s,e)=>Z.get(s,{headers:e?{Authorization:`Bearer ${e}`}:{}}).then(({ok:r})=>r).catch(r=>{const{message:i}=r;E.error(i)}),I=async s=>{const e=p().find(r=>r.id===s);e&&await _(e.url,e.secret)&&l(s)},v=async({url:s,secret:e})=>{const r=tt(s);if(!await _(r,e))return;const i=rt(),c=p().slice(),d=c.find(f=>f.url===r);if(!d){w([{id:i,url:r,secret:e},...c]),l(i);return}d.secret=e,d.id=i,w(c),l(i)},k=s=>{const{message:e}=s;E.error(e)},{form:S}=N({extend:T({schema:ct}),onSubmit:v,onError:k}),D=s=>{W()===s&&R(""),w(p().filter(e=>e.id!==s))};return X(()=>{let s=n.search||window.location.search;if(s){const r=n.hash.match(/\?.*$/);Array.isArray(r)&&r[0]&&(s=r[0].replace("?",""))}const e=new URLSearchParams(s);e.has("hostname")?v({url:`${e.get("http")?"http:":e.get("https")?"https:":window.location.protocol}//${e.get("hostname")}${e.get("port")?`:${e.get("port")}`:""}`,secret:e.get("secret")??""}):p().length===0&&v({url:"http://127.0.0.1:9090",secret:""})}),(()=>{var s=it(),e=s.firstChild,r=e.firstChild,i=r.firstChild,c=i.firstChild,d=c.firstChild,f=c.nextSibling,U=f.nextSibling;U.firstChild;var j=i.nextSibling,A=j.firstChild,V=A.firstChild,B=e.nextSibling;return G(S,e,()=>S),o(d,()=>t("endpointURL")),o(U,h(K,{get when(){return window.location.origin!=="http://127.0.0.1:9090"},get children(){var u=lt();return J(()=>u.value=window.location.origin),u}}),null),o(V,()=>t("secret")),o(r,h(C,{type:"submit",class:"btn-primary uppercase",get children(){return t("add")}}),null),o(B,h(Q,{get each(){return p()},children:({id:u,url:F})=>(()=>{var g=ot(),z=g.firstChild;return g.$$click=()=>I(u),o(z,F),o(g,h(C,{class:"btn-circle btn-ghost btn-xs text-white",onClick:P=>{P.stopPropagation(),D(u)},get children(){return h(O,{})}}),null),g})()})),s})()};Y(["click"]);export{ut as default};
|
||||
import{u as q,a as H,b as M,c as N,v as T,o as X,e as p,d as G,i as o,f as h,g as J,S as K,B as C,I as O,F as Q,t as $,z as b,s as w,h as E,j as W,k as R,l as Y,m as Z,n as tt}from"./index-DACeLBg-.js";var a=[];for(var y=0;y<256;++y)a.push((y+256).toString(16).slice(1));function et(t,n=0){return(a[t[n+0]]+a[t[n+1]]+a[t[n+2]]+a[t[n+3]]+"-"+a[t[n+4]]+a[t[n+5]]+"-"+a[t[n+6]]+a[t[n+7]]+"-"+a[t[n+8]]+a[t[n+9]]+"-"+a[t[n+10]]+a[t[n+11]]+a[t[n+12]]+a[t[n+13]]+a[t[n+14]]+a[t[n+15]]).toLowerCase()}var m,nt=new Uint8Array(16);function st(){if(!m&&(m=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m(nt)}var at=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const L={randomUUID:at};function rt(t,n,x){if(L.randomUUID&&!n&&!t)return L.randomUUID();t=t||{};var l=t.random||(t.rng||st)();return l[6]=l[6]&15|64,l[8]=l[8]&63|128,et(l)}var lt=$("<option>"),it=$('<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(s)://{hostname}:{port} 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">'),ot=$('<div class="badge badge-info flex w-full cursor-pointer items-center justify-between gap-4 py-4"><span class=truncate>');const ct=b.object({url:b.string().min(1),secret:b.string()}),ut=()=>{const[t]=q(),n=H(),x=M(),l=s=>{R(s),x("/overview")},_=(s,e)=>Z.get(s,{headers:e?{Authorization:`Bearer ${e}`}:{}}).then(({ok:r})=>r).catch(r=>{const{message:i}=r;E.error(i)}),I=async s=>{const e=p().find(r=>r.id===s);e&&await _(e.url,e.secret)&&l(s)},v=async({url:s,secret:e})=>{const r=tt(s);if(!await _(r,e))return;const i=rt(),c=p().slice(),d=c.find(f=>f.url===r);if(!d){w([{id:i,url:r,secret:e},...c]),l(i);return}d.secret=e,d.id=i,w(c),l(i)},k=s=>{const{message:e}=s;E.error(e)},{form:S}=N({extend:T({schema:ct}),onSubmit:v,onError:k}),D=s=>{W()===s&&R(""),w(p().filter(e=>e.id!==s))};return X(()=>{let s=n.search||window.location.search;if(s){const r=n.hash.match(/\?.*$/);Array.isArray(r)&&r[0]&&(s=r[0].replace("?",""))}const e=new URLSearchParams(s);e.has("hostname")?v({url:`${e.get("http")?"http:":e.get("https")?"https:":window.location.protocol}//${e.get("hostname")}${e.get("port")?`:${e.get("port")}`:""}`,secret:e.get("secret")??""}):p().length===0&&v({url:"http://127.0.0.1:9090",secret:""})}),(()=>{var s=it(),e=s.firstChild,r=e.firstChild,i=r.firstChild,c=i.firstChild,d=c.firstChild,f=c.nextSibling,U=f.nextSibling;U.firstChild;var j=i.nextSibling,A=j.firstChild,V=A.firstChild,B=e.nextSibling;return G(S,e,()=>S),o(d,()=>t("endpointURL")),o(U,h(K,{get when(){return window.location.origin!=="http://127.0.0.1:9090"},get children(){var u=lt();return J(()=>u.value=window.location.origin),u}}),null),o(V,()=>t("secret")),o(r,h(C,{type:"submit",class:"btn-primary uppercase",get children(){return t("add")}}),null),o(B,h(Q,{get each(){return p()},children:({id:u,url:F})=>(()=>{var g=ot(),z=g.firstChild;return g.$$click=()=>I(u),o(z,F),o(g,h(C,{class:"btn-circle btn-ghost btn-xs text-white",onClick:P=>{P.stopPropagation(),D(u)},get children(){return h(O,{})}}),null),g})()})),s})()};Y(["click"]);export{ut as default};
|
@ -1 +0,0 @@
|
||||
import{W as a,b2 as m}from"./index-DWMGWNy8.js";const s=o=>a(o).locale(m()).fromNow();export{s as f};
|
@ -0,0 +1 @@
|
||||
import{W as a,a$ as m}from"./index-DACeLBg-.js";const s=o=>a(o).locale(m()).fromNow();export{s as f};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -11,8 +11,8 @@
|
||||
<link rel="apple-touch-icon" href="./pwa-192x192.png" />
|
||||
|
||||
<title>metacubexd</title>
|
||||
<script type="module" crossorigin src="./assets/index-DWMGWNy8.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-BVqcsp-M.css">
|
||||
<script type="module" crossorigin src="./assets/index-DACeLBg-.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-D_QrDGkm.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>
|
||||
|
@ -1 +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,r)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(e[l])return;let o={};const t=s=>i(s,l),u={module:{uri:l},exports:o,require:t};e[l]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(r(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-mfHMd71S.js",revision:null},{url:"assets/Connections-C4lDijqW.js",revision:null},{url:"assets/global-BCvoRSag.js",revision:null},{url:"assets/index-6_sXLHMR.js",revision:null},{url:"assets/index-BVqcsp-M.css",revision:null},{url:"assets/Logs-KOUcZ2qF.js",revision:null},{url:"assets/Overview-De_zu9wR.js",revision:null},{url:"assets/Proxies-DgzLrzio.js",revision:null},{url:"assets/Rules-DrUtyF7O.js",revision:null},{url:"assets/Setup-CqaOhgQf.js",revision:null},{url:"index.html",revision:"134ff89e7844395ff8b6e409d3260e26"},{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")))}));
|
||||
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,r)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(e[l])return;let o={};const t=s=>i(s,l),u={module:{uri:l},exports:o,require:t};e[l]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(r(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-CcYWVyqe.js",revision:null},{url:"assets/Connections-CVJiJJwm.js",revision:null},{url:"assets/global-Cq-x4U7Q.js",revision:null},{url:"assets/IconReload-C5Iuvpd-.js",revision:null},{url:"assets/index-D_QrDGkm.css",revision:null},{url:"assets/index-DACeLBg-.js",revision:null},{url:"assets/index-GtOz1sEE.js",revision:null},{url:"assets/Logs-LisT8FTz.js",revision:null},{url:"assets/Overview-DiEjGL5X.js",revision:null},{url:"assets/Proxies-A8q5R6Aj.js",revision:null},{url:"assets/Rules-BskxbInP.js",revision:null},{url:"assets/Setup-e28eI3Pt.js",revision:null},{url:"index.html",revision:"4b5142ca4adf9805cc0d4cecaf0ff1cc"},{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")))}));
|
||||
|
@ -1 +1 @@
|
||||
yacd.haishan.me
|
||||
yacd.metacubex.one
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 47 KiB |
@ -0,0 +1 @@
|
||||
import{r as y,R as p,p as s,c as f,m as v,b as h,M as m,s as O}from"./index-fda592a8.js";function l(){return l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},l.apply(this,arguments)}function g(e,n){if(e==null)return{};var r=b(e,n),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],!(n.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function b(e,n){if(e==null)return{};var r={},t=Object.keys(e),o,a;for(a=0;a<t.length;a++)o=t[a],!(n.indexOf(o)>=0)&&(r[o]=e[o]);return r}var c=y.forwardRef(function(e,n){var r=e.color,t=r===void 0?"currentColor":r,o=e.size,a=o===void 0?24:o,u=g(e,["color","size"]);return p.createElement("svg",l({ref:n,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),p.createElement("polyline",{points:"6 9 12 15 18 9"}))});c.propTypes={color:s.string,size:s.oneOfType([s.string,s.number])};c.displayName="ChevronDown";const k=c,w="_overlay_ukhe7_1",d="_cnt_ukhe7_5",_="_afterOpen_ukhe7_15",i={overlay:w,cnt:d,afterOpen:_},{useMemo:j}=O;function C({isOpen:e,onRequestClose:n,children:r}){const t=j(()=>({base:f(v.content,i.cnt),afterOpen:i.afterOpen,beforeClose:""}),[]);return h(m,{isOpen:e,onRequestClose:n,className:t,overlayClassName:f(v.overlay,i.overlay),children:r})}export{C as B,k as C};
|
@ -0,0 +1 @@
|
||||
._overlay_ukhe7_1{background-color:#0009}._cnt_ukhe7_5{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;box-shadow:#0000001f 0 4px 4px,#0000003d 0 16px 32px}._afterOpen_ukhe7_15{opacity:1}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
._root_1vck5_4,._section_1vck5_5{display:grid;grid-template-columns:repeat(auto-fill,minmax(49%,1fr));max-width:900px;grid-gap:5px;gap:5px}@media screen and (min-width: 30em){._root_1vck5_4,._section_1vck5_5{gap:15px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}}._root_1vck5_4,._section_1vck5_5{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_1vck5_4,._section_1vck5_5{padding:10px 40px 15px}}._wrapSwitch_1vck5_30{height:40px;display:flex;align-items:center}._sep_1vck5_36{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_1vck5_36{padding:0 40px}}._sep_1vck5_36>div{border-top:1px dashed #373737}._label_1vck5_49{padding:15px 0;font-size:small}._fieldset_1hnn2_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap;flex-direction:row}._input_1hnn2_10+._cnt_1hnn2_10{border:1px solid transparent;border-radius:4px;cursor:pointer;margin-bottom:5px}._input_1hnn2_10:focus+._cnt_1hnn2_10{border-color:var(--color-focus-blue)}._input_1hnn2_10:checked+._cnt_1hnn2_10{border-color:var(--color-focus-blue)}
|
@ -1 +0,0 @@
|
||||
._root_1s1gc_1,._section_1s1gc_2{display:grid;grid-template-columns:repeat(auto-fill,minmax(345px,1fr));max-width:900px;gap:5px}@media screen and (min-width: 30em){._root_1s1gc_1,._section_1s1gc_2{gap:15px}}._root_1s1gc_1 ._item_1s1gc_14,._section_1s1gc_2 ._item_1s1gc_14{margin-top:11px}._root_1s1gc_1 ._item_1s1gc_14 label,._section_1s1gc_2 ._item_1s1gc_14 label{padding-left:12px}._root_1s1gc_1,._section_1s1gc_2{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_1s1gc_1,._section_1s1gc_2{padding:10px 40px 15px}}._sep_1s1gc_34{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_1s1gc_34{padding:0 40px}}._sep_1s1gc_34>div{border-top:1px dashed #373737}._label_1s1gc_47{padding:11px 0}._fieldset_1ghjp_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap}._input_1ghjp_9+._cnt_1ghjp_9{border:1px solid transparent;border-radius:8px;cursor:pointer;margin-right:5px;margin-bottom:5px}._input_1ghjp_9:focus+._cnt_1ghjp_9{border-color:#387cec}._input_1ghjp_9:checked+._cnt_1ghjp_9{border-color:#387cec}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
@charset "UTF-8";.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:var(--color-focus-blue);outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._btn_lzu00_1{margin-right:10px}._placeHolder_1vhnb_1{margin-top:20%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}@media (max-width: 768px){._placeHolder_1vhnb_1{margin-top:35%}}._connQty_1vhnb_16{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._header_1vhnb_28{display:grid;grid-template-columns:1fr minmax(auto,290px);align-items:center;padding-right:15px}@media (--breakpoint-not-small){._header_1vhnb_28{padding-right:25px}}._inputWrapper_1vhnb_44{margin:0;width:100%;max-width:350px;justify-self:flex-end}@media (--breakpoint-not-small){._inputWrapper_1vhnb_44{margin:0 25px}}._input_1vhnb_44{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:var(--color-text-secondary);display:inline-block;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.connections-table td.ctrl{min-width:4em;text-align:center;display:flex;justify-content:center;align-items:center}.connections-table td.ctrl svg{height:16px}.connections-table td.type,.connections-table td.start,.connections-table td.downloadSpeedCurr,.connections-table td.uploadSpeedCurr,.connections-table td.download,.connections-table td.upload{min-width:7em;text-align:center}._th_12ddc_6{height:50px;background:var(--color-background);top:0;font-size:1em;-webkit-user-select:none;-ms-user-select:none;user-select:none;text-align:center}._th_12ddc_6:hover{color:var(--color-text-highlight)}._btnSection_12ddc_18 button{margin-right:15px}._break_12ddc_22{word-wrap:break-word;word-break:break-all;align-items:center;text-align:left}._td_12ddc_29{padding:10px 5px;font-size:.9em;min-width:9em;cursor:default;text-align:left;vertical-align:middle;white-space:nowrap;font-family:var(--font-normal)}._td_12ddc_29:hover{color:var(--color-text-highlight)}._overlay_12ddc_44{background:#444}._modal_12ddc_48{background-color:var(--bg-modal)}._table_12ddc_52{border-collapse:collapse}._td_12ddc_29._odd_12ddc_56{background:var(--color-row-odd)}._center_12ddc_61{min-width:7em;text-align:center}._sortIconContainer_12ddc_66{float:right;width:1em;height:1em}._rotate180_12ddc_72{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._overlay_1cbjw_1{background-color:#0009}._cnt_1cbjw_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;-webkit-transform:scale(1.2);transform:scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_1cbjw_15{opacity:1;-webkit-transform:scale(1);transform:scale(1)}._btngrp_1cbjw_20{display:flex;align-items:center;justify-content:center;margin-top:30px}._columnManagerRow_e56pa_1{width:200px;display:flex;margin:5px 0;align-items:center}._columnManagerRow_e56pa_1 ._columnManageLabel_e56pa_7{flex:1;margin-left:10px}._columnManagerRow_e56pa_1 ._columnManageSwitch_e56pa_11{-webkit-transform:scale(.7);transform:scale(.7);height:20px;display:flex;align-items:center}._sourceipTable_2lem6_1 input{width:120px}._iptableTipContainer_2lem6_5{width:300px}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._placeHolder_1mf9d_1{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}._connQty_1mf9d_10{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._inputWrapper_1mf9d_22{margin:0 30px;width:100%;max-width:350px;justify-self:flex-end}._input_1mf9d_22{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._tr_ludqf_1{display:grid;grid-template-columns:repeat(var(--col-count, 11),minmax(-webkit-max-content,auto));grid-template-columns:repeat(var(--col-count, 11),minmax(max-content,auto))}._pointer_ludqf_6{cursor:pointer}._table_ludqf_10{border:none;border-collapse:collapse}._table_ludqf_10 thead tr{position:-webkit-sticky;position:sticky;top:0;background:var(--color-background)}._table_ludqf_10 th{padding:8px 13px;height:50px;font-weight:initial;font-size:.8em;text-align:left;white-space:nowrap}._table_ludqf_10 td{border:none;white-space:nowrap;padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._table_ludqf_10>tbody>tr:nth-of-type(odd)>*{background:var(--color-row-odd)}._thWrap_ludqf_38{-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:space-between}._thWrap_ludqf_38:hover{color:var(--color-text-highlight)}._sortIconContainer_ludqf_48{display:inline-flex;margin-left:10px;width:16px;height:16px}._rotate180_ludqf_55{transform:rotate(180deg)}._overlay_148w6_1{background-color:#0009}._cnt_148w6_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;transform:translate(-50%,-50%) scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_148w6_15{opacity:1;transform:translate(-50%,-50%) scale(1)}._btngrp_148w6_20{display:flex;align-items:center;justify-content:center;margin-top:30px}
|
@ -0,0 +1 @@
|
||||
import{b as e,j as b,s as y,r as l}from"./index-fda592a8.js";const E="_spining_4i8sg_1",F="_spining_keyframes_4i8sg_1",M={spining:E,spining_keyframes:F},{useState:j}=y;function B({children:s}){return e("span",{className:M.spining,children:s})}const H={right:10,bottom:10},L=({children:s,...n})=>e("button",{type:"button",...n,className:"rtf--ab",children:s}),v=({children:s,...n})=>e("button",{type:"button",className:"rtf--mb",...n,children:s}),O={bottom:24,right:24},R=({event:s="hover",style:n=O,alwaysShowTitle:o=!1,children:f,icon:g,mainButtonStyles:h,onClick:p,text:d,..._})=>{const[a,r]=j(!1),c=o||!a,u=()=>r(!0),m=()=>r(!1),k=()=>s==="hover"&&u(),x=()=>s==="hover"&&m(),N=t=>p?p(t):(t.persist(),s==="click"?a?m():u():null),$=(t,i)=>{t.persist(),r(!1),setTimeout(()=>{i(t)},1)},C=()=>l.Children.map(f,(t,i)=>l.isValidElement(t)?b("li",{className:`rtf--ab__c ${"top"in n?"top":""}`,children:[l.cloneElement(t,{"data-testid":`action-button-${i}`,"aria-label":t.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...t.props,onClick:I=>{t.props.onClick&&$(I,t.props.onClick)}}),t.props.text&&e("span",{className:`${"right"in n?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:t.props.text})]}):null);return e("ul",{onMouseEnter:k,onMouseLeave:x,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:n,..._,children:b("li",{className:"rtf--mb__c",children:[e(v,{onClick:N,style:h,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:g}),d&&e("span",{className:`${"right"in n?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:d}),e("ul",{children:C()})]})})};export{L as A,R as F,B as I,H as p};
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
import{j as t,k as C,r as l}from"./index-8cf47a1c.js";const E="_spining_4i8sg_1",I="_spining_keyframes_4i8sg_1",y={spining:E,spining_keyframes:I},{useState:F}=C;function A({children:n}){return t.jsx("span",{className:y.spining,children:n})}const B={right:10,bottom:10},R=({children:n,...e})=>t.jsx("button",{type:"button",...e,className:"rtf--ab",children:n}),M=({children:n,...e})=>t.jsx("button",{type:"button",className:"rtf--mb",...e,children:n}),v={bottom:24,right:24},H=({event:n="hover",style:e=v,alwaysShowTitle:o=!1,children:b,icon:f,mainButtonStyles:g,onClick:p,text:u,...x})=>{const[a,r]=F(!1),c=o||!a,d=()=>r(!0),m=()=>r(!1),h=()=>n==="hover"&&d(),_=()=>n==="hover"&&m(),j=s=>p?p(s):(s.persist(),n==="click"?a?m():d():null),k=(s,i)=>{s.persist(),r(!1),setTimeout(()=>{i(s)},1)},N=()=>l.Children.map(b,(s,i)=>l.isValidElement(s)?t.jsxs("li",{className:`rtf--ab__c ${"top"in e?"top":""}`,children:[l.cloneElement(s,{"data-testid":`action-button-${i}`,"aria-label":s.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...s.props,onClick:$=>{s.props.onClick&&k($,s.props.onClick)}}),s.props.text&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:s.props.text})]}):null);return t.jsx("ul",{onMouseEnter:h,onMouseLeave:_,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:e,...x,children:t.jsxs("li",{className:"rtf--mb__c",children:[t.jsx(M,{onClick:j,style:g,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:f}),u&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:u}),t.jsx("ul",{children:N()})]})})};export{R as A,H as F,A as I,B as p};
|
@ -1 +0,0 @@
|
||||
.rtf{box-sizing:border-box;margin:25px;position:fixed;white-space:nowrap;z-index:9998;padding-left:0;list-style:none}.rtf.open .rtf--mb{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.rtf.open .rtf--mb>ul{list-style:none;margin:0;padding:0}.rtf.open .rtf--ab__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c:nth-child(1){transform:translateY(-60px) scale(1);transition-delay:.03s}.rtf.open .rtf--ab__c:nth-child(1).top{transform:translateY(60px) scale(1)}.rtf.open .rtf--ab__c:nth-child(2){transform:translateY(-120px) scale(1);transition-delay:.09s}.rtf.open .rtf--ab__c:nth-child(2).top{transform:translateY(120px) scale(1)}.rtf.open .rtf--ab__c:nth-child(3){transform:translateY(-180px) scale(1);transition-delay:.12s}.rtf.open .rtf--ab__c:nth-child(3).top{transform:translateY(180px) scale(1)}.rtf.open .rtf--ab__c:nth-child(4){transform:translateY(-240px) scale(1);transition-delay:.15s}.rtf.open .rtf--ab__c:nth-child(4).top{transform:translateY(240px) scale(1)}.rtf.open .rtf--ab__c:nth-child(5){transform:translateY(-300px) scale(1);transition-delay:.18s}.rtf.open .rtf--ab__c:nth-child(5).top{transform:translateY(300px) scale(1)}.rtf.open .rtf--ab__c:nth-child(6){transform:translateY(-360px) scale(1);transition-delay:.21s}.rtf.open .rtf--ab__c:nth-child(6).top{transform:translateY(360px) scale(1)}.rtf--mb__c{padding:25px;margin:-25px}.rtf--mb__c *:last-child{margin-bottom:0}.rtf--mb__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;transform:translateY(-50%);margin-right:6px;margin-left:4px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--mb__c>span.right{right:100%}.rtf--mb{width:48px;height:48px;background:var(--btn-bg);z-index:9999;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:18px}.rtf--mb>*{transition:ease-in-out transform .2s}.rtf--ab__c{display:block;position:absolute;top:0;right:1px;padding:10px 0;margin:-10px 0;transition:ease-in-out transform .2s}.rtf--ab__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;transform:translateY(-50%);margin-right:6px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--ab__c>span.right{right:100%}.rtf--ab__c:nth-child(1){transform:translateY(-60px) scale(0);transition-delay:.21s}.rtf--ab__c:nth-child(1).top{transform:translateY(60px) scale(0)}.rtf--ab__c:nth-child(2){transform:translateY(-120px) scale(0);transition-delay:.18s}.rtf--ab__c:nth-child(2).top{transform:translateY(120px) scale(0)}.rtf--ab__c:nth-child(3){transform:translateY(-180px) scale(0);transition-delay:.15s}.rtf--ab__c:nth-child(3).top{transform:translateY(180px) scale(0)}.rtf--ab__c:nth-child(4){transform:translateY(-240px) scale(0);transition-delay:.12s}.rtf--ab__c:nth-child(4).top{transform:translateY(240px) scale(0)}.rtf--ab__c:nth-child(5){transform:translateY(-300px) scale(0);transition-delay:.09s}.rtf--ab__c:nth-child(5).top{transform:translateY(300px) scale(0)}.rtf--ab__c:nth-child(6){transform:translateY(-360px) scale(0);transition-delay:.03s}.rtf--ab__c:nth-child(6).top{transform:translateY(360px) scale(0)}.rtf--ab{height:40px;width:40px;margin-right:4px;background-color:#aaa;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:16px;z-index:10000}.rtf--ab:hover{background:#387cec;border:1px solid #387cec;color:#fff}.rtf--ab:focus{border-color:var(--color-focus-blue)}._spining_4i8sg_1{position:relative;border-radius:50%;background:linear-gradient(60deg,#e66465,#9198e5);width:48px;height:48px;display:flex;justify-content:center;align-items:center}._spining_4i8sg_1:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;border:2px solid transparent;border-top-color:currentColor;border-radius:50%;animation:_spining_keyframes_4i8sg_1 1s linear infinite}@keyframes _spining_keyframes_4i8sg_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
@ -0,0 +1 @@
|
||||
import{b as s,t as a,R as f}from"./index-fda592a8.js";const{useState:i,useRef:l,useEffect:p,useCallback:m}=f;function C(t){return s("input",{className:a.input,...t})}function R({value:t,...r}){const[u,n]=i(t),e=l(t);p(()=>{e.current!==t&&n(t),e.current=t},[t]);const c=m(o=>n(o.target.value),[n]);return s("input",{className:a.input,value:u,onChange:c,...r})}export{C as I,R as S};
|
@ -1 +0,0 @@
|
||||
._input_1hkb4_1{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:4px;border:1px solid var(--color-input-border);box-sizing:border-box;color:inherit;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;width:100%}._input_1hkb4_1:focus{box-shadow:#4299e199 0 0 0 3px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
|
@ -1 +0,0 @@
|
||||
import{j as s,k as i}from"./index-8cf47a1c.js";const p="_input_1hkb4_1",u={input:p},{useState:f,useRef:l,useEffect:m,useCallback:x}=i;function I(t){return s.jsx("input",{className:u.input,...t})}function k({value:t,...r}){const[a,n]=f(t),e=l(t);m(()=>{e.current!==t&&n(t),e.current=t},[t]);const c=x(o=>n(o.target.value),[n]);return s.jsx("input",{className:u.input,value:a,onChange:c,...r})}export{I,k as S};
|
@ -0,0 +1 @@
|
||||
._RuleSearch_ue4xf_1{padding:0 40px 5px}@media (max-width: 768px){._RuleSearch_ue4xf_1{padding:0 25px 5px}}._RuleSearchContainer_ue4xf_10{position:relative;height:40px}@media (max-width: 768px){._RuleSearchContainer_ue4xf_10{height:30px}}._inputWrapper_ue4xf_20{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;width:100%}._input_ue4xf_20{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:var(--color-text-secondary);display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px 0 35px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._iconWrapper_ue4xf_45{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:10px;line-height:0}._logMeta_pycfb_1{font-size:.8em;margin-bottom:5px;display:block;line-height:1.55em}._logType_pycfb_8{flex-shrink:0;text-align:center;width:66px;border-radius:100px;padding:3px 5px;margin:0 8px}._logTime_pycfb_17{flex-shrink:0;color:#fb923c}._logText_pycfb_22{flex-shrink:0;color:#888;align-items:center;line-height:1.35em;width:100%}@media (max-width: 768px){._logText_pycfb_22{display:inline-block}}._logsWrapper_pycfb_37{margin:45px;padding:10px;background-color:var(--bg-log-info-card);border-radius:4px;color:var(--color-text);overflow-y:auto}@media (max-width: 768px){._logsWrapper_pycfb_37{margin:25px}}._logsWrapper_pycfb_37 .log{margin-bottom:10px}._logPlaceholder_pycfb_54{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}._logPlaceholder_pycfb_54 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._logPlaceholderIcon_pycfb_67{opacity:.3}
|
@ -1 +0,0 @@
|
||||
._RuleSearch_bd30s_1{padding:0 40px 5px}._RuleSearchContainer_bd30s_5{position:relative;height:40px}._inputWrapper_bd30s_10{position:absolute;top:50%;transform:translateY(-50%);left:0;width:100%}._input_bd30s_10{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px 0 35px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._iconWrapper_bd30s_36{position:absolute;top:50%;transform:translateY(-50%);left:10px;display:flex;justify-content:center;align-items:center}._logMeta_7a1x3_1{display:flex;align-items:center;flex-wrap:wrap;font-size:.9em}._logType_7a1x3_8{color:#eee;flex-shrink:0;text-align:center;width:66px;border-radius:100px;padding:3px 5px;margin:0 8px}._logTime_7a1x3_18{flex-shrink:0;color:#999;font-size:14px}._logText_7a1x3_24{flex-shrink:0;display:flex;font-family:Roboto Mono,Menlo,monospace;align-items:center;padding:8px 0;width:100%;white-space:pre;overflow:auto}._logsWrapper_7a1x3_37{margin:0;padding:0;color:var(--color-text)}._logsWrapper_7a1x3_37 .log{padding:10px 40px;background:var(--color-background)}._logsWrapper_7a1x3_37 .log.even{background:var(--color-background)}._logPlaceholder_7a1x3_51{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}._logPlaceholder_7a1x3_51 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._logPlaceholderIcon_7a1x3_64{opacity:.3}._search_7a1x3_68{max-width:1000px}
|
@ -1 +0,0 @@
|
||||
import{r as u,R as m,P as d,j as t,w as y,x as R,y as T,l as C,n as w,u as L,z as N,d as W,C as O,S as k,A as z,k as I,c as E,D as M}from"./index-8cf47a1c.js";import{a as $,F}from"./index.esm-eb217302.js";import{r as A,s as D,f as B}from"./logs-281e0071.js";import{d as H}from"./debounce-c1ba2006.js";import{u as q}from"./useRemainingViewPortHeight-b3800ff0.js";import{F as K,p as V}from"./Fab-6279b0bb.js";import{P as Y,a as G}from"./play-85de9511.js";function f(){return f=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},f.apply(this,arguments)}function J(e,a){if(e==null)return{};var r=Q(e,a),s,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)s=n[o],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function Q(e,a){if(e==null)return{};var r={},s=Object.keys(e),o,n;for(n=0;n<s.length;n++)o=s[n],!(a.indexOf(o)>=0)&&(r[o]=e[o]);return r}var _=u.forwardRef(function(e,a){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,n=o===void 0?24:o,c=J(e,["color","size"]);return m.createElement("svg",f({ref:a,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),m.createElement("circle",{cx:"11",cy:"11",r:"8"}),m.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});_.propTypes={color:d.string,size:d.oneOfType([d.string,d.number])};_.displayName="Search";const U=_,X="_RuleSearch_bd30s_1",Z="_RuleSearchContainer_bd30s_5",ee="_inputWrapper_bd30s_10",te="_input_bd30s_10",se="_iconWrapper_bd30s_36",g={RuleSearch:X,RuleSearchContainer:Z,inputWrapper:ee,input:te,iconWrapper:se};function oe({dispatch:e,searchText:a,updateSearchText:r}){const[s,o]=u.useState(a),n=u.useCallback(l=>{e(r(l))},[e,r]),c=u.useMemo(()=>H(n,300),[n]),h=l=>{o(l.target.value),c(l.target.value)};return t.jsx("div",{className:g.RuleSearch,children:t.jsxs("div",{className:g.RuleSearchContainer,children:[t.jsx("div",{className:g.inputWrapper,children:t.jsx("input",{type:"text",value:s,onChange:h,className:g.input})}),t.jsx("div",{className:g.iconWrapper,children:t.jsx(U,{size:20})})]})})}const ae=e=>({searchText:R(e),updateSearchText:T}),re=y(ae)(oe),ne="_logMeta_7a1x3_1",ce="_logType_7a1x3_8",ie="_logTime_7a1x3_18",le="_logText_7a1x3_24",ge="_logsWrapper_7a1x3_37",pe="_logPlaceholder_7a1x3_51",de="_logPlaceholderIcon_7a1x3_64",ue="_search_7a1x3_68",i={logMeta:ne,logType:ce,logTime:ie,logText:le,logsWrapper:ge,logPlaceholder:pe,logPlaceholderIcon:de,search:ue},{useCallback:j,memo:he,useEffect:me}=I,x=30,xe={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function fe({time:e,even:a,payload:r,type:s}){const o=E({even:a},"log");return t.jsx("div",{className:o,children:t.jsxs("div",{className:i.logMeta,children:[t.jsx("div",{className:i.logTime,children:e}),t.jsx("div",{className:i.logType,style:{backgroundColor:xe[s]},children:s}),t.jsx("div",{className:i.logText,children:r})]})})}function _e(e,a){return a[e].id}const S=he(({index:e,style:a,data:r})=>{const s=r[e];return t.jsx("div",{style:a,children:t.jsx(fe,{...s})})},$);S.displayName="MemoRow";function ve({dispatch:e,logs:a}){const{data:r}=C(),s=r["log-level"],[o,n]=w(M),c=L(),h=j(()=>{o?A({...c,logLevel:s}):D(),n(!o)},[c,s,o,n]),l=j(P=>e(N(P)),[e]);me(()=>{B({...c,logLevel:s},l)},[c,s,l]);const[b,v]=q(),{t:p}=W();return t.jsxs("div",{children:[t.jsx(O,{title:p("Logs")}),t.jsx("div",{className:i.search,children:t.jsx(re,{})}),t.jsx("div",{ref:b,style:{paddingBottom:x},children:a.length===0?t.jsxs("div",{className:i.logPlaceholder,style:{height:v-x},children:[t.jsx("div",{className:i.logPlaceholderIcon,children:t.jsx(k,{width:200,height:200})}),t.jsx("div",{children:p("no_logs")})]}):t.jsxs("div",{className:i.logsWrapper,children:[t.jsx(F,{height:v-x,width:"100%",itemCount:a.length,itemSize:80,itemData:a,itemKey:_e,children:S}),t.jsx(K,{icon:o?t.jsx(Y,{size:16}):t.jsx(G,{size:16}),mainButtonStyles:o?{background:"#e74c3c"}:{},style:V,text:p(o?"Resume Refresh":"Pause Refresh"),onClick:h})]})})]})}const je=e=>({logs:z(e)}),we=y(je)(ve);export{we as default};
|
@ -0,0 +1 @@
|
||||
import{r as f,R as y,p as d,u as S,b as a,j as p,d as T,X as R,Y as w,F as L,Z as W,C as N,q as C,$ as j,a0 as O,g as I,a1 as k,s as z}from"./index-fda592a8.js";import{r as E,s as $,f as M}from"./logs-bfc558fc.js";import{d as F}from"./debounce-c1ba2006.js";import{u as A}from"./useRemainingViewPortHeight-d1c9b30b.js";import{F as H,p as B}from"./Fab-440522cc.js";import{P as D,a as Y}from"./play-6087f197.js";function v(){return v=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},v.apply(this,arguments)}function q(e,o){if(e==null)return{};var t=V(e,o),n,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],!(o.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function V(e,o){if(e==null)return{};var t={},n=Object.keys(e),r,s;for(s=0;s<n.length;s++)r=n[s],!(o.indexOf(r)>=0)&&(t[r]=e[r]);return t}var b=f.forwardRef(function(e,o){var t=e.color,n=t===void 0?"currentColor":t,r=e.size,s=r===void 0?24:r,i=q(e,["color","size"]);return y.createElement("svg",v({ref:o,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),y.createElement("circle",{cx:"11",cy:"11",r:"8"}),y.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});b.propTypes={color:d.string,size:d.oneOfType([d.string,d.number])};b.displayName="Search";const X=b,Z="_RuleSearch_ue4xf_1",G="_RuleSearchContainer_ue4xf_10",J="_inputWrapper_ue4xf_20",K="_input_ue4xf_20",Q="_iconWrapper_ue4xf_45",g={RuleSearch:Z,RuleSearchContainer:G,inputWrapper:J,input:K,iconWrapper:Q};function U({dispatch:e,searchText:o,updateSearchText:t}){const{t:n}=S(),[r,s]=f.useState(o),i=f.useCallback(c=>{e(t(c))},[e,t]),u=f.useMemo(()=>F(i,300),[i]),m=c=>{s(c.target.value),u(c.target.value)};return a("div",{className:g.RuleSearch,children:p("div",{className:g.RuleSearchContainer,children:[a("div",{className:g.inputWrapper,children:a("input",{type:"text",value:r,onChange:m,className:g.input,placeholder:n("Search")})}),a("div",{className:g.iconWrapper,children:a(X,{size:20})})]})})}const ee=e=>({searchText:R(e),updateSearchText:w}),te=T(ee)(U),re="_logMeta_pycfb_1",oe="_logType_pycfb_8",ne="_logTime_pycfb_17",ae="_logText_pycfb_22",se="_logsWrapper_pycfb_37",ce="_logPlaceholder_pycfb_54",le="_logPlaceholderIcon_pycfb_67",l={logMeta:re,logType:oe,logTime:ne,logText:ae,logsWrapper:se,logPlaceholder:ce,logPlaceholderIcon:le},{useCallback:x,useEffect:ie}=z,pe={debug:"#389d3d",info:"#58c3f2",warning:"#cc5abb",error:"#c11c1c"},ge={debug:"debug",info:"info",warning:"warn",error:"error"};function ue({time:e,payload:o,type:t}){return p("div",{className:l.logMeta,children:[a("span",{className:l.logTime,children:e}),p("span",{className:l.logType,style:{color:pe[t]},children:["[ ",ge[t]," ]"]}),a("span",{className:l.logText,children:o})]})}function he({dispatch:e,logLevel:o,apiConfig:t,logs:n,logStreamingPaused:r}){const s=L(),i=x(()=>{r?E({...t,logLevel:o}):$(),s.app.updateAppConfig("logStreamingPaused",!r)},[t,o,r,s.app]),u=x(_=>e(W(_)),[e]);ie(()=>{M({...t,logLevel:o},u)},[t,o,u]);const[m,c]=A(),{t:h}=S();return p("div",{children:[a(N,{title:h("Logs")}),a(te,{}),a("div",{ref:m,children:n.length===0?p("div",{className:l.logPlaceholder,style:{height:c*.9},children:[a("div",{className:l.logPlaceholderIcon,children:a(C,{width:200,height:200})}),a("div",{children:h("no_logs")})]}):p("div",{className:l.logsWrapper,style:{height:c*.85},children:[n.map((_,P)=>a("div",{className:"",children:a(ue,{..._})},P)),a(H,{icon:r?a(D,{size:16}):a(Y,{size:16}),mainButtonStyles:r?{background:"#e74c3c"}:{},style:B,text:h(r?"Resume Refresh":"Pause Refresh"),onClick:i})]})})]})}const de=e=>({logs:j(e),logLevel:O(e),apiConfig:I(e),logStreamingPaused:k(e)}),xe=T(de)(he);export{xe as default};
|
@ -1 +0,0 @@
|
||||
._overlay_1i06e_1{position:fixed;top:0;right:0;left:0;bottom:0;background:#444}._content_1i06e_10{outline:none;position:relative;color:var(--color-text);background:#444;top:50%;left:50%;transform:translate(-50%,-50%);padding:20px;border-radius:10px}
|
@ -1 +0,0 @@
|
||||
import{r as f,R as c,P as a}from"./index-8cf47a1c.js";function s(){return s=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},s.apply(this,arguments)}function v(e,o){if(e==null)return{};var r=u(e,o),t,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],!(o.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function u(e,o){if(e==null)return{};var r={},t=Object.keys(e),n,i;for(i=0;i<t.length;i++)n=t[i],!(o.indexOf(n)>=0)&&(r[n]=e[n]);return r}var l=f.forwardRef(function(e,o){var r=e.color,t=r===void 0?"currentColor":r,n=e.size,i=n===void 0?24:n,p=v(e,["color","size"]);return c.createElement("svg",s({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),c.createElement("polyline",{points:"6 9 12 15 18 9"}))});l.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};l.displayName="ChevronDown";const m=l,y="_overlay_1i06e_1",g="_content_1i06e_10",w={overlay:y,content:g};export{m as C,w as m};
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
._FlexCenter_1380a_1{display:flex;justify-content:center;align-items:center}._header_1y9js_1{display:flex;align-items:center}._header_1y9js_1:focus{outline:none}._header_1y9js_1 ._arrow_1y9js_8{display:inline-flex;transform:rotate(0);transition:transform .3s}._header_1y9js_1 ._arrow_1y9js_8._isOpen_1y9js_13{transform:rotate(180deg)}._header_1y9js_1 ._arrow_1y9js_8:focus{outline:var(--color-focus-blue) solid 1px}._btn_1y9js_20{margin-left:5px}._qty_1y9js_25{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._header_5pmv2_1{margin-bottom:12px}._groupHead_5pmv2_5{display:flex;flex-wrap:wrap;align-items:center}._action_5pmv2_11{margin:0 5px}._proxy_5mgcm_1{margin:3px;padding:5px;position:relative;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;outline:none;border:1px solid transparent;max-width:200px;background-color:var(--color-bg-proxy)}._proxy_5mgcm_1:focus{border:1px solid var(--color-focus-blue)}@media screen and (min-width: 30em){._proxy_5mgcm_1{min-width:200px;border-radius:10px;padding:10px}}._proxy_5mgcm_1._now_5mgcm_25{background-color:var(--color-focus-blue);color:#ddd}._proxy_5mgcm_1._error_5mgcm_29{opacity:.5}._proxy_5mgcm_1._selectable_5mgcm_32{transition:transform .2s ease-in-out;cursor:pointer}._proxy_5mgcm_1._selectable_5mgcm_32:hover{border-color:hsl(0deg,0%,var(--card-hover-border-lightness))}._proxyType_5mgcm_40{font-family:var(--font-mono);font-size:.6em;margin-right:3px}@media screen and (min-width: 30em){._proxyType_5mgcm_40{font-size:.85em}}._row_5mgcm_51{display:flex;align-items:center;justify-content:space-between}._proxyName_5mgcm_57{width:100%;margin-bottom:5px;font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._proxySmall_5mgcm_66{--size: 13px;width:var(--size);height:var(--size);border-radius:50%;position:relative}._proxySmall_5mgcm_66._now_5mgcm_25{--size: 15px}._proxySmall_5mgcm_66._now_5mgcm_25:before{--size-dot: 7px;content:"";position:absolute;width:var(--size-dot);height:var(--size-dot);background-color:#fff;border:1px solid var(--color-proxy-dot-selected-ind-bo);border-radius:4px;top:50%;left:50%;transform:translate(-50%,-50%)}._proxySmall_5mgcm_66._selectable_5mgcm_32{transition:transform .1s ease-in-out;cursor:pointer}._proxySmall_5mgcm_66._selectable_5mgcm_32:hover{transform:scale(1.2)}._proxyLatency_pw0sa_1{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width: 30em){._proxyLatency_pw0sa_1{font-size:.85em}}._list_1oy7w_1{display:flex;flex-wrap:wrap;margin:8px 0 8px -3px}._listSummaryView_1oy7w_8{margin:14px 0;display:grid;grid-template-columns:repeat(auto-fill,13px);grid-gap:10px;place-items:center;max-width:900px}._updatedAt_919yi_1{margin-bottom:12px}._updatedAt_919yi_1 small{color:#777}._main_919yi_8{padding:10px 15px}@media screen and (min-width: 30em){._main_919yi_8{padding:10px 40px}}._head_919yi_17{display:flex;align-items:center;flex-wrap:wrap}._action_919yi_23{margin:0 5px;display:grid;grid-template-columns:auto auto;gap:10px;place-items:center}._refresh_919yi_31{display:flex;justify-content:center;align-items:center;cursor:pointer}._labeledInput_cmki0_1{max-width:85vw;width:400px;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:13px 0}hr{height:1px;background-color:var(--color-separator);border:none;outline:none;margin:1rem 0px}._overlay_uuk3b_1{background-color:#0009}._cnt_uuk3b_5{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;transform:translate(-50%,-50%) scale(1.2);box-shadow:#0000001f 0 4px 4px,#0000003d 0 16px 32px}._afterOpen_uuk3b_16{opacity:1;transform:translate(-50%,-50%) scale(1)}._topBar_16fpp_1{position:-webkit-sticky;position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;z-index:1;background-color:var(--color-background2);-webkit-backdrop-filter:blur(36px);backdrop-filter:blur(36px)}._topBarRight_16fpp_13{display:flex;align-items:center;flex-wrap:wrap;flex:1;justify-content:flex-end;margin-right:20px}._textFilterContainer_16fpp_22{max-width:350px;min-width:150px;flex:1;margin-right:8px}._group_16fpp_29{padding:10px 15px}@media screen and (min-width: 30em){._group_16fpp_29{padding:10px 40px}}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
._RuleProviderItem_ly9yn_1{display:grid;grid-template-columns:40px 1fr 46px;height:100%}._left_ly9yn_7{display:inline-flex;align-items:center;color:var(--color-text-secondary);opacity:.4}._middle_ly9yn_14{display:grid;grid-template-rows:1fr auto auto;align-items:center}._gray_ly9yn_20{color:#777}._refreshButtonWrapper_ly9yn_24{display:grid;align-items:center;justify-items:center;place-items:center;opacity:0;transition:opacity .2s}._RuleProviderItem_ly9yn_1:hover ._refreshButtonWrapper_ly9yn_24{opacity:1}._rule_1e5p9_4{display:flex;align-items:center;padding:6px 15px}@media screen and (min-width: 30em){._rule_1e5p9_4{padding:10px 40px}}._left_1e5p9_15{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}._a_1e5p9_22{display:flex;align-items:center;font-size:1em;opacity:.8}._b_1e5p9_29{flex-grow:1;padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:1em}@media screen and (min-width: 30em){._b_1e5p9_29{font-size:1em}}._type_1e5p9_41{width:110px;color:#3b5f76}._size_1e5p9_46{width:110px}._payloadAndSize_1e5p9_50{display:flex;align-items:center}._header_10x16_4{display:grid;grid-template-columns:1fr minmax(auto,290px);align-items:center;padding-right:15px}._RuleProviderItemWrapper_10x16_11{padding:6px 15px}@media screen and (min-width: 30em){._RuleProviderItemWrapper_10x16_11{padding:10px 40px}}
|
@ -1 +0,0 @@
|
||||
._RuleProviderItem_12aid_1{display:grid;grid-template-columns:40px 1fr 46px;height:100%}._left_12aid_7{display:inline-flex;align-items:center;color:var(--color-text-secondary);opacity:.4}._middle_12aid_14{display:grid;gap:6px;grid-template-rows:1fr auto auto;align-items:center}._gray_12aid_21{color:#777}._action_12aid_25{display:grid;gap:4px;grid-template-columns:auto 1fr;align-items:center}._refreshBtn_12aid_32{padding:5px}._rule_1kxgd_1{display:flex;align-items:center;padding:6px 15px}@media screen and (min-width: 30em){._rule_1kxgd_1{padding:10px 40px}}._left_1kxgd_12{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}._a_1kxgd_19{display:flex;align-items:center;font-size:12px;opacity:.8}._b_1kxgd_26{padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:16px}@media screen and (min-width: 30em){._b_1kxgd_26{font-size:19px}}._type_1kxgd_37{width:110px}._header_n1m95_1{display:grid;grid-template-columns:1fr minmax(auto,330px);align-items:center;padding-right:15px}@media screen and (min-width: 30em){._header_n1m95_1{padding-right:40px}}._RuleProviderItemWrapper_n1m95_17{padding:6px 15px}@media screen and (min-width: 30em){._RuleProviderItemWrapper_n1m95_17{padding:10px 40px}}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
._select_gfkcv_1{height:35px;line-height:1.5;width:100%;font-size:small;padding-left:15px;-webkit-appearance:none;appearance:none;background-color:var(--color-input-bg);color:var(--color-text);padding-right:20px;border-radius:4px;border:1px solid var(--color-input-border);background-image:url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23999999%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23999999%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);background-position:right 8px center;background-repeat:no-repeat}._select_gfkcv_1:hover,._select_gfkcv_1:focus{outline:none!important}._select_gfkcv_1:hover,._select_gfkcv_1:focus{border-color:#343434;color:var(--color-text-highlight);background-image:var(--select-bg-hover)}._select_gfkcv_1:focus{box-shadow:#4299e199 0 0 0 3px}._select_gfkcv_1 option{background-color:var(--color-background)}
|
@ -0,0 +1 @@
|
||||
import{b as c}from"./index-fda592a8.js";const r="_select_gfkcv_1",a={select:r};function m({options:s,selected:t,onChange:l,...n}){return c("select",{className:a.select,value:t,onChange:l,...n,children:s.map(([e,o])=>c("option",{value:e,children:o},e))})}export{m as S};
|
@ -1 +0,0 @@
|
||||
._select_13zm8_1{height:40px;line-height:1.5;width:100%;padding-left:8px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-input-bg);color:var(--color-text);padding-right:20px;border-radius:4px;border:1px solid var(--color-input-border);background-image:url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23999999%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23999999%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);background-position:right 8px center;background-repeat:no-repeat}._select_13zm8_1:hover,._select_13zm8_1:focus{border-color:#343434;outline:none!important;color:var(--color-text-highlight);background-image:var(--select-bg-hover)}._select_13zm8_1:focus{box-shadow:#4299e199 0 0 0 3px}._select_13zm8_1 option{background-color:var(--color-background)}
|
@ -1 +0,0 @@
|
||||
import{j as s}from"./index-8cf47a1c.js";const o="_select_13zm8_1",r={select:o};function m({options:t,selected:c,onChange:l}){return s.jsx("select",{className:r.select,value:c,onChange:l,children:t.map(([e,n])=>s.jsx("option",{value:e,children:n},e))})}export{m as S};
|
@ -1 +0,0 @@
|
||||
._ToggleSwitch_10mtp_1{-webkit-user-select:none;user-select:none;border-radius:4px;border:1px solid #525252;color:var(--color-text);background:var(--color-toggle-bg);display:flex;position:relative;outline:none}._ToggleSwitch_10mtp_1:focus{border-color:var(--color-focus-blue)}._ToggleSwitch_10mtp_1 input{position:absolute;left:0;opacity:0}._ToggleSwitch_10mtp_1 label{z-index:2;display:flex;align-items:center;justify-content:center;padding:10px 0;cursor:pointer}._slider_10mtp_28{z-index:1;position:absolute;display:block;left:0;height:100%;transition:left .2s ease-out;background:var(--color-toggle-selected)}
|
@ -1 +0,0 @@
|
||||
import{R as p,r as c,j as e,ak as f,B as i,al as b}from"./index-8cf47a1c.js";import{T}from"./Toggle-cc905705.js";import{I as y}from"./Input-6985be35.js";import{Z as v,a as h}from"./ZapAnimated-d32c4141.js";const S="_ToggleSwitch_10mtp_1",w="_slider_10mtp_28",j={ToggleSwitch:S,slider:w};function L({options:t,value:n,name:x,onChange:u}){const d=c.useMemo(()=>t.map(s=>s.value).indexOf(n),[t,n]),r=c.useCallback(s=>{const a=Math.floor(100/t.length);if(s===t.length-1)return 100-t.length*a+a;if(s>-1)return a},[t]),g=c.useMemo(()=>({width:r(d)+"%",left:d*r(0)+"%"}),[d,r]);return e.jsxs("div",{className:j.ToggleSwitch,children:[e.jsx("div",{className:j.slider,style:g}),t.map((s,a)=>{const o=`${x}-${s.label}`,m=a===0?"":"border-left";return e.jsxs("label",{htmlFor:o,className:m,style:{width:r(a)+"%"},children:[e.jsx("input",{id:o,name:x,type:"radio",value:s.value,checked:n===s.value,onChange:u}),e.jsx("div",{children:s.label})]},o)})]})}const R=p.memo(L),_=()=>{},P={padding:"20px 0"},k=[{label:"Global",value:"Global"},{label:"Rule",value:"Rule"},{label:"Direct",value:"Direct"}],l=({children:t,style:n})=>e.jsx("div",{style:{...P,...n},children:t});class G extends c.PureComponent{render(){return e.jsxs("div",{children:[e.jsx(l,{children:e.jsx(f,{})}),e.jsxs(l,{children:[e.jsx(T,{id:"t0"}),e.jsx("label",{htmlFor:"t0",style:{paddingLeft:12},children:"Toggle Me"})]}),e.jsx(l,{children:e.jsx("input",{})}),e.jsx(l,{children:e.jsx(v,{})}),e.jsx(l,{children:e.jsx(y,{})}),e.jsx(l,{children:e.jsx(R,{name:"test",options:k,value:"Rule",onChange:_})}),e.jsxs(l,{children:[e.jsx(i,{text:"Test Lxatency",start:e.jsx(h,{size:16})}),e.jsx(i,{text:"Test Lxatency",start:e.jsx(h,{size:16}),isLoading:!0}),e.jsx(i,{label:"Test Lxatency"}),e.jsx(i,{label:"Button Plain",kind:"minimal"})]}),e.jsx(l,{style:{paddingLeft:20},children:e.jsx(b,{})})]})}}export{G as default};
|
@ -1 +0,0 @@
|
||||
._rotate_1dspl_1{display:inline-flex}._isRotating_1dspl_5{animation:_rotating_1dspl_1 3s infinite linear;animation-fill-mode:forwards}@keyframes _rotating_1dspl_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._input_16a1f_1{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;outline:none;padding:8px 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._input_16a1f_1:focus{border:1px solid var(--color-focus-blue)}
|
@ -1 +0,0 @@
|
||||
import{r as g,R as c,P as i,c as m,j as l,n as x,k as d}from"./index-8cf47a1c.js";import{d as h}from"./debounce-c1ba2006.js";function u(){return u=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},u.apply(this,arguments)}function v(t,n){if(t==null)return{};var e=b(t,n),o,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)o=s[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function b(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,s;for(s=0;s<o.length;s++)r=o[s],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var p=g.forwardRef(function(t,n){var e=t.color,o=e===void 0?"currentColor":e,r=t.size,s=r===void 0?24:r,a=v(t,["color","size"]);return c.createElement("svg",u({ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),c.createElement("polyline",{points:"23 4 23 10 17 10"}),c.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))});p.propTypes={color:i.string,size:i.oneOfType([i.string,i.number])};p.displayName="RotateCw";const y=p,R="_rotate_1dspl_1",_="_isRotating_1dspl_5",j="_rotating_1dspl_1",f={rotate:R,isRotating:_,rotating:j};function $(t){const n=t.size||16,e=m(f.rotate,{[f.isRotating]:t.isRotating});return l.jsx("span",{className:e,children:l.jsx(y,{size:n})})}const{useCallback:w,useState:O,useMemo:T}=d;function C(t){const[,n]=x(t),[e,o]=O(""),r=T(()=>h(n,300),[n]);return[w(a=>{o(a.target.value),r(a.target.value)},[r]),e]}const k="_input_16a1f_1",z={input:k};function L(t){const[n,e]=C(t.textAtom);return l.jsx("input",{className:z.input,type:"text",value:e,onChange:n,placeholder:t.placeholder})}export{$ as R,L as T,y as a};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user