update 2022-09-10 23:44:13

This commit is contained in:
github-actions[bot] 2022-09-10 23:44:13 +08:00
parent 8de61e0602
commit ad9a0f5190
81 changed files with 1832 additions and 856 deletions

View File

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hysteria
PKG_VERSION:=1.2.0
PKG_VERSION:=1.2.1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/HyNetwork/hysteria/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=aeff737d81860e736cf2ce239bf8391aea0f50957315eb0b20ea40fd07f29460
PKG_HASH:=cdac1f149651ca5eaa77ea69ee913d0f1391a07da681ad4908a60a6603307543
PKG_LICENSE:=MIT
PKG_LICENSE_FILE:=LICENSE
@ -20,7 +20,7 @@ PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/tobyxdd/hysteria
GO_PKG:=github.com/HyNetwork/hysteria
GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd
GO_PKG_LDFLAGS_X:=main.appVersion=$(PKG_VERSION)

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.45.51
PKG_VERSION:=0.45.59
PKG_RELEASE:=beta
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
@ -12,6 +12,18 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)/config
config PACKAGE_kmod-inet-diag
default y if PACKAGE_$(PKG_NAME)
config PACKAGE_kmod-nft-tproxy
default y if PACKAGE_firewall4
config PACKAGE_kmod-ipt-nat
default y if ! PACKAGE_firewall4
config PACKAGE_iptables-mod-tproxy
default y if ! PACKAGE_firewall4
config PACKAGE_iptables-mod-extra
default y if ! PACKAGE_firewall4
endef
define Package/$(PKG_NAME)
@ -19,8 +31,8 @@ define Package/$(PKG_NAME)
SUBMENU:=3. Applications
TITLE:=LuCI support for clash
PKGARCH:=all
DEPENDS:=+iptables +dnsmasq-full +coreutils +coreutils-nohup +bash +curl +ca-bundle +ipset +ip-full \
+iptables-mod-tproxy +iptables-mod-extra +libcap +libcap-bin +libcap-bin +ruby +ruby-yaml +kmod-tun +unzip
DEPENDS:=+dnsmasq-full +coreutils +coreutils-nohup +bash +curl +ca-bundle +ipset +ip-full \
+libcap +libcap-bin +libcap-bin +ruby +ruby-yaml +kmod-tun +unzip
MAINTAINER:=vernesong
endef

View File

@ -700,6 +700,7 @@ function action_get_run_mode()
luci.http.prepare_content("application/json")
luci.http.write_json({
clash = is_running(),
watchdog = is_watchdog(),
mode = mode();
})
else

View File

@ -76,6 +76,7 @@ o.default = "false"
o.rmempty = false
o = s:option(Value, "test_url", translate("Test URL"))
o:value("http://cp.cloudflare.com/generate_204")
o:value("http://www.gstatic.com/generate_204")
o:value("https://cp.cloudflare.com/generate_204")
o.rmempty = false

View File

@ -134,17 +134,6 @@ end
o:value("DIRECT")
o:value("REJECT")
o = s:option(ListValue, "Douyin", translate("Douyin"))
o:depends("rule_name", "lhie1")
o.rmempty = true
for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
if groupname ~= nil and groupname ~= "" then
o:value(groupname)
end
end
o:value("DIRECT")
o:value("REJECT")
o = s:option(ListValue, "Bahamut", translate("Bahamut"))
o:depends("rule_name", "lhie1")
o.rmempty = true
@ -332,6 +321,17 @@ end
o:value("DIRECT")
o:value("REJECT")
o = s:option(ListValue, "Discord", translate("Discord"))
o:depends("rule_name", "lhie1")
o.rmempty = true
for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
if groupname ~= nil and groupname ~= "" then
o:value(groupname)
end
end
o:value("DIRECT")
o:value("REJECT")
o = s:option(ListValue, "PayPal", translate("PayPal"))
o:depends("rule_name", "lhie1")
o.rmempty = true

View File

@ -97,6 +97,7 @@ o:value("true", translate("Enable"))
o.default = true
o = s:option(Value, "health_check_url", translate("Health Check URL"))
o:value("http://cp.cloudflare.com/generate_204")
o:value("http://www.gstatic.com/generate_204")
o:value("https://cp.cloudflare.com/generate_204")
o.rmempty = false

View File

@ -66,7 +66,7 @@ o.default = "fake-ip"
end
o = s:taboption("op_mode", Flag, "enable_udp_proxy", font_red..bold_on..translate("Proxy UDP Traffics")..bold_off..font_off)
o.description = translate("The Servers Must Support UDP forwarding")..", "..font_red..bold_on..translate("If Docker is Installed, UDP May Not Forward Normally")..bold_off..font_off
o.description = translate("The Servers Must Support UDP forwarding").."<br>"..font_red..bold_on.."1."..translate("If Docker is Installed, UDP May Not Forward Normally").."<br>2."..translate("In Fake-ip Mode, Even If This Option is Turned Off, Domain Type Connections Still Pass Through The Core For The Availability")..bold_off..font_off
o:depends("en_mode", "redir-host")
o:depends("en_mode", "fake-ip")
o.default = 1
@ -597,7 +597,7 @@ o.description = translate("In The Fake-IP Mode, Only Pure IP Requests Are Suppor
o = s:taboption("lan_ac", DynamicList, "lan_ac_black_ports", translate("Lan Bypassed Port List"))
o.datatype = "port"
o:value("5000", translate("5000(NAS)"))
o.description = translate("The Traffic From The Local Specified Port Will Not Pass The Core, Try To Set When The Bypass Gateway Forwarding Fails")
o.description = "1."..translate("The Traffic From The Local Specified Port Will Not Pass The Core, Try To Set When The Bypass Gateway Forwarding Fails").."<br>".."2."..translate("In The Fake-IP Mode, Only Pure IP Requests Are Supported")
o = s:taboption("lan_ac", Value, "local_network_pass", translate("Local IPv4 Network Bypassed List"))
o.template = "cbi/tvalue"
@ -1207,6 +1207,28 @@ o.template = "openclash/other_stream_option"
o.value = "Bilibili"
o:depends("stream_auto_select_bilibili", "1")
--Google not cn
o = s:taboption("stream_enhance", Flag, "stream_auto_select_google_not_cn", font_red..translate("Google Not CN")..font_off)
o.default = 0
o:depends("stream_auto_select", "1")
o = s:taboption("stream_enhance", Value, "stream_auto_select_group_key_google_not_cn", translate("Group Filter"))
o.default = "Google"
o.placeholder = "Google"
o.description = translate("It Will Be Searched According To The Regex When Auto Search Group Fails")
o:depends("stream_auto_select_google_not_cn", "1")
o = s:taboption("stream_enhance", Value, "stream_auto_select_node_key_google_not_cn", translate("Unlock Nodes Filter"))
o.default = ""
o.description = translate("It Will Be Selected Nodes According To The Regex")
o:depends("stream_auto_select_google_not_cn", "1")
o = s:taboption("stream_enhance", DummyValue, "Google", translate("Manual Test"))
o.rawhtml = true
o.template = "openclash/other_stream_option"
o.value = "Google"
o:depends("stream_auto_select_google_not_cn", "1")
---- update Settings
o = s:taboption("rules_update", Flag, "other_rule_auto_update", translate("Auto Update"))
o.description = font_red..bold_on..translate("Auto Update Other Rules")..bold_off..font_off

View File

@ -131,6 +131,7 @@
text-overflow: ellipsis;
line-height: 25px;
height: 25px;
text-align: left;
}
.card .general .dler-result {

View File

@ -284,7 +284,7 @@
luci_protocol = (window.location.protocol == "http:" ? "ws://" : "wss://") + status.daip + ":" + status.cn_port;
};
if (status.clash) {
if (status.clash && status.watchdog) {
radio_mode.style.display = "inline-block";
radio_de.style.display = "none";
}
@ -294,7 +294,7 @@
radio_de.innerHTML = "<b style=color:red><%:Not Running%></b>";
};
if (status.clash) {
if (status.clash && status.watchdog) {
radio_ru_mode.style.display = "inline-block";
}
else {
@ -451,8 +451,8 @@
}
for (i=0; i<radio.length; i++) {
if (radio[i].value == status.mode && ! radio[i].checked) {
radio[i].checked = true;
break
radio[i].checked = true;
break
}
}
}
@ -480,13 +480,13 @@
if (x && x.status == 200 && status.mode) {
if (status.mode == "fake-ip" || status.mode == "fake-ip-tun" || status.mode == "fake-ip-mix")
{
mode.innerHTML = status.clash ? "<b style=color:green><%:Fake-IP%></b>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;" : '<b style=color:red><%:Not Running%></b>';
radio_run_normal.innerHTML = "<%:Enhance%>"
mode.innerHTML = status.clash && status.watchdog ? "<b style=color:green><%:Fake-IP%></b>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;" : '<b style=color:red><%:Not Running%></b>';
radio_run_normal.innerHTML = "<%:Enhance%>"
}
else if (status.mode == "redir-host" || status.mode == "redir-host-tun" || status.mode == "redir-host-mix")
{
mode.innerHTML = status.clash ? "<b style=color:green><%:Redir-Host%></b>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;" : '<b style=color:red><%:Not Running%></b>';
radio_run_normal.innerHTML = "<%:Compatible%>"
mode.innerHTML = status.clash && status.watchdog ? "<b style=color:green><%:Redir-Host%></b>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;" : '<b style=color:red><%:Not Running%></b>';
radio_run_normal.innerHTML = "<%:Compatible%>"
};
for (i=0; i<radio_ru.length; i++) {
if (radio_ru[i].value == (status["mode"].split("-")[2] == undefined ? "" : ("-" + status["mode"].split("-")[2])) && ! radio_ru[i].checked) {

View File

@ -1945,6 +1945,9 @@ msgstr "提示: 检测到内核文件不存在,准备开始下载..."
msgid "Tip: Detected that the Chnroute Cidr List is not Installed, Ready to Download..."
msgstr "提示: 检测到大陆白名单列表不存在,准备开始下载..."
msgid "Tip: Detected that the Chnroute Cidr List Format is wrong, Ready to Reformat..."
msgstr "提示: 检测到大陆白名单列表格式错误,准备重新格式化..."
msgid "Error: Could Not Load The Capsh Library, Please Verify The Capsh Shell Library Work Well..."
msgstr "错误Capsh 异常请尝试重新安装依赖【libcap】和相应的Capsh库终止启动..."
@ -2572,6 +2575,9 @@ msgstr "提示开始自动选择检测Discovery Plus 解锁节点..."
msgid "Tip: Start Auto Select Proxy For Bilibili Unlock..."
msgstr "提示开始自动选择检测Bilibili 解锁节点..."
msgid "Tip: Start Auto Select Proxy For Google Not CN Unlock..."
msgstr "提示开始自动选择检测Google 非送中节点..."
msgid "Netflix Group:"
msgstr "Netflix 策略组:"
@ -2608,6 +2614,9 @@ msgstr "Discovery Plus 策略组:"
msgid "Bilibili Group:"
msgstr "Bilibili 策略组:"
msgid "Google Group:"
msgstr "Google 策略组:"
msgid "full support."
msgstr "完整解锁。"
@ -3122,4 +3131,13 @@ msgid "Urltest"
msgstr "低延迟优先"
msgid "Random"
msgstr "随机选择"
msgstr "随机选择"
msgid "Tip: You have seted the authentication of SOCKS5/HTTP(S) proxy with"
msgstr "提示:您为 SOCKS5/HTTP(S) 代理设置的账户密码为"
msgid "Google Not CN"
msgstr "Google 非送中"
msgid "In Fake-ip Mode, Even If This Option is Turned Off, Domain Type Connections Still Pass Through The Core For The Availability"
msgstr "在 Fake-IP 模式时,即使关闭此选项,域名类型的连接仍将通过核心以保证可用性"

File diff suppressed because it is too large Load Diff

View File

@ -128,4 +128,7 @@ ff.dorado.sdo.com
shark007.net
#Mijia
Mijia Cloud
+.dns.google
+.dns.google
#招商银行
+.cmbchina.com
+.cmbimg.com

View File

@ -9,7 +9,7 @@ uci -q delete firewall.openclash
uci -q set firewall.openclash=include
uci -q set firewall.openclash.type=script
uci -q set firewall.openclash.path=/var/etc/openclash.include
uci -q set firewall.openclash.reload=1
[ -n "$(command -v fw4)" ] || uci -q set firewall.openclash.reload=1
uci -q commit firewall
mkdir -p /etc/openclash/config

View File

@ -24,6 +24,7 @@ dns_port=$(uci -q get openclash.config.dns_port)
enable_redirect_dns=$(uci -q get openclash.config.enable_redirect_dns)
disable_masq_cache=$(uci -q get openclash.config.disable_masq_cache)
default_resolvfile=$(uci -q get openclash.config.default_resolvfile)
FW4="$(command -v fw4)"
if_restart=0
only_download=0
set_lock
@ -237,10 +238,28 @@ change_dns()
uci commit dhcp
/etc/init.d/dnsmasq restart >/dev/null 2>&1
fi
iptables -t nat -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t nat -I OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -I OUTPUT -j openclash_output >/dev/null 2>&1
if [ -n "$FW4" ]; then
for nft in "nat_output" "mangle_output"; do
local handles=$(nft -a list chain inet fw4 ${nft} |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$2}')
for handle in $handles; do
nft delete rule inet fw4 ${nft} handle ${handle}
done
done >/dev/null 2>&1
echo "$nat_output_rules" |while read line
do >/dev/null 2>&1
nft add rule inet fw4 nat_output ${line}
done
echo "$mangle_output_rules" |while read line
do
nft add rule inet fw4 mangle_output ${line}
done >/dev/null 2>&1
else
iptables -t nat -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t nat -A OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -A OUTPUT -j openclash_output >/dev/null 2>&1
fi
[ "$(unify_ps_status "openclash_watchdog.sh")" -eq 0 ] && [ "$(unify_ps_prevent)" -eq 0 ] && nohup /usr/share/openclash/openclash_watchdog.sh &
fi
}
@ -304,8 +323,19 @@ EOF
uci commit dhcp
/etc/init.d/dnsmasq restart >/dev/null 2>&1
fi
iptables -t nat -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
if [ -n "$FW4" ]; then
nat_output_rules=$(nft -a list chain inet fw4 nat_output |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$1}' |sed 's/^[ \t]*//g')
mangle_output_rules=$(nft -a list chain inet fw4 mangle_output |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$1}' |sed 's/^[ \t]*//g')
for nft in "nat_output" "mangle_output"; do
local handles=$(nft -a list chain inet fw4 ${nft} |grep -E "openclash|OpenClash" |awk -F '# handle ' '{print$2}')
for handle in $handles; do
nft delete rule inet fw4 ${nft} handle ${handle}
done
done >/dev/null 2>&1
else
iptables -t nat -D OUTPUT -j openclash_output >/dev/null 2>&1
iptables -t mangle -D OUTPUT -j openclash_output >/dev/null 2>&1
fi
sleep 3
config_download

View File

@ -2,6 +2,8 @@
. /usr/share/openclash/openclash_ps.sh
. /usr/share/openclash/log.sh
FW4="$(command -v fw4)"
set_lock() {
exec 879>"/tmp/lock/openclash_chn.lock" 2>/dev/null
flock -x 879 2>/dev/null
@ -44,8 +46,16 @@
if [ "$?" -eq "0" ] && [ -s "/tmp/china_ip_route.txt" ]; then
LOG_OUT "Chnroute Cidr List Download Success, Check Updated..."
#预处理
echo "create china_ip_route hash:net family inet hashsize 1024 maxelem 1000000" >/tmp/china_ip_route.list
awk '!/^$/&&!/^#/{printf("add china_ip_route %s'" "'\n",$0)}' /tmp/china_ip_route.txt >>/tmp/china_ip_route.list
if [ -n "$FW4" ]; then
echo "define china_ip_route = {" >/tmp/china_ip_route.list
awk '!/^$/&&!/^#/{printf(" %s,'" "'\n",$0)}' /tmp/china_ip_route.txt >>/tmp/china_ip_route.list
echo "}" >>/tmp/china_ip_route.list
echo "add set inet fw4 china_ip_route { type ipv4_addr; flags interval; auto-merge; }" >>/tmp/china_ip_route.list
echo 'add element inet fw4 china_ip_route $china_ip_route' >>/tmp/china_ip_route.list
else
echo "create china_ip_route hash:net family inet hashsize 1024 maxelem 1000000" >/tmp/china_ip_route.list
awk '!/^$/&&!/^#/{printf("add china_ip_route %s'" "'\n",$0)}' /tmp/china_ip_route.txt >>/tmp/china_ip_route.list
fi
cmp -s /tmp/china_ip_route.list "$chnr_path"
if [ "$?" -ne "0" ]; then
LOG_OUT "Chnroute Cidr List Has Been Updated, Starting To Replace The Old Version..."
@ -74,8 +84,16 @@
if [ "$?" -eq "0" ] && [ -s "/tmp/china_ip6_route.txt" ]; then
LOG_OUT "Chnroute6 Cidr List Download Success, Check Updated..."
#预处理
echo "create china_ip6_route hash:net family inet6 hashsize 1024 maxelem 1000000" >/tmp/china_ip6_route.list
awk '!/^$/&&!/^#/{printf("add china_ip6_route %s'" "'\n",$0)}' /tmp/china_ip6_route.txt >>/tmp/china_ip6_route.list
if [ -n "$FW4" ]; then
echo "define china_ip6_route = {" >/tmp/china_ip6_route.list
awk '!/^$/&&!/^#/{printf(" %s,'" "'\n",$0)}' /tmp/china_ip6_route.txt >>/tmp/china_ip6_route.list
echo "}" >>/tmp/china_ip6_route.list
echo "add set inet fw4 china_ip6_route { type ipv6_addr; flags interval; auto-merge; }" >>/tmp/china_ip6_route.list
echo 'add element inet fw4 china_ip6_route $china_ip6_route' >>/tmp/china_ip6_route.list
else
echo "create china_ip6_route hash:net family inet6 hashsize 1024 maxelem 1000000" >/tmp/china_ip6_route.list
awk '!/^$/&&!/^#/{printf("add china_ip6_route %s'" "'\n",$0)}' /tmp/china_ip6_route.txt >>/tmp/china_ip6_route.list
fi
cmp -s /tmp/china_ip6_route.list "$chnr6_path"
if [ "$?" -ne "0" ]; then
LOG_OUT "Chnroute6 Cidr List Has Been Updated, Starting To Replace The Old Version..."

View File

@ -109,10 +109,6 @@ curl: $(ts_re "$(opkg status curl 2>/dev/null |grep 'Status' |awk -F ': ' '{prin
ca-certificates: $(ts_re "$(opkg status ca-certificates 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
ipset: $(ts_re "$(opkg status ipset 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
ip-full: $(ts_re "$(opkg status ip-full 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
iptables-mod-tproxy: $(ts_re "$(opkg status iptables-mod-tproxy 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-ipt-tproxy: $(ts_re "$(opkg status kmod-ipt-tproxy 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
iptables-mod-extra: $(ts_re "$(opkg status iptables-mod-extra 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-ipt-extra: $(ts_re "$(opkg status kmod-ipt-extra 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
libcap: $(ts_re "$(opkg status libcap 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
libcap-bin: $(ts_re "$(opkg status libcap-bin 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
ruby: $(ts_re "$(opkg status ruby 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
@ -120,9 +116,24 @@ ruby-yaml: $(ts_re "$(opkg status ruby-yaml 2>/dev/null |grep 'Status' |awk -F '
ruby-psych: $(ts_re "$(opkg status ruby-psych 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
ruby-pstore: $(ts_re "$(opkg status ruby-pstore 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-tun(TUN模式): $(ts_re "$(opkg status kmod-tun 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
luci-compat(Luci-19.07): $(ts_re "$(opkg status luci-compat 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
luci-compat(Luci >= 19.07): $(ts_re "$(opkg status luci-compat 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-inet-diag(PROCESS-NAME): $(ts_re "$(opkg status kmod-inet-diag 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
unzip: $(ts_re "$(opkg status unzip 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
EOF
if [ -n "$(command -v fw4)" ]; then
cat >> "$DEBUG_LOG" <<-EOF
kmod-nft-tproxy: $(ts_re "$(opkg status kmod-nft-tproxy 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
EOF
else
cat >> "$DEBUG_LOG" <<-EOF
iptables-mod-tproxy: $(ts_re "$(opkg status iptables-mod-tproxy 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-ipt-tproxy: $(ts_re "$(opkg status kmod-ipt-tproxy 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
iptables-mod-extra: $(ts_re "$(opkg status iptables-mod-extra 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-ipt-extra: $(ts_re "$(opkg status kmod-ipt-extra 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
kmod-ipt-nat: $(ts_re "$(opkg status kmod-ipt-nat 2>/dev/null |grep 'Status' |awk -F ': ' '{print $2}' 2>/dev/null)")
EOF
fi
EOF
#core
@ -285,7 +296,7 @@ sed -i '/^ \{0,\}secret:/d' "$DEBUG_LOG" 2>/dev/null
#firewall
cat >> "$DEBUG_LOG" <<-EOF
#===================== 防火墙设置 =====================#
#===================== IPTABLES 防火墙设置 =====================#
#IPv4 NAT chain
@ -327,6 +338,17 @@ cat >> "$DEBUG_LOG" <<-EOF
EOF
ip6tables-save -t filter >> "$DEBUG_LOG" 2>/dev/null
if [ -n "$(command -v fw4)" ]; then
cat >> "$DEBUG_LOG" <<-EOF
#===================== NFTABLES 防火墙设置 =====================#
EOF
for nft in "input" "forward" "dstnat" "srcnat" "nat_output" "mangle_prerouting" "mangle_output"; do
nft list chain inet fw4 dstnat >> "$DEBUG_LOG" 2>/dev/null
done >/dev/null 2>&1
fi
cat >> "$DEBUG_LOG" <<-EOF
#===================== IPSET状态 =====================#

View File

@ -111,6 +111,8 @@ function unlock_auto_select()
key_group = uci:get("openclash", "config", "stream_auto_select_group_key_discovery_plus") or "discovery"
elseif type == "Bilibili" then
key_group = uci:get("openclash", "config", "stream_auto_select_group_key_bilibili") or "bilibili"
elseif type == "Google" then
key_group = uci:get("openclash", "config", "stream_auto_select_group_key_google_not_cn") or "google|谷歌"
end
if not key_group then key_group = type end
else
@ -210,10 +212,10 @@ function unlock_auto_select()
value.all = nodes_filter(value.all, info)
if select_logic == "random" then
--sort by random
value.all = table_rand(value.all)
value.all = table_rand(value.all, proxy_default)
else
--sort by urltest
value.all = table_sort_by_urltest(value.all)
value.all = table_sort_by_urltest(value.all, proxy_default)
end
end
if #(value.all) == 0 then
@ -507,7 +509,7 @@ function datamatch(data, regex)
if result == "true" then return true else return false end
end
function table_rand(t)
function table_rand(t, d)
if t == nil then
return
end
@ -516,16 +518,19 @@ function table_rand(t)
while #t ~= 0 do
local n = math.random(0, #t)
if t[n] ~= nil then
table.insert(tab, t[n])
if d ~= nil and table_include(groups, d) and d == t[n] then
table.insert(tab, 1, t[n])
else
table.insert(tab, t[n])
end
table.remove(t, n)
end
end
return tab
end
function table_sort_by_urltest(t)
function table_sort_by_urltest(t, d)
local info, get_delay, group_delay
local count = 1
local tab = {}
local result = {}
@ -577,7 +582,11 @@ function table_sort_by_urltest(t)
end)
for _, value in pairs(tab) do
table.insert(result, value[1])
if d ~= nil and table_include(groups, d) and d == value[1] then
table.insert(result, 1, value[1])
else
table.insert(result, value[1])
end
end
return result
@ -666,6 +675,8 @@ function nodes_filter(t, info)
regex = uci:get("openclash", "config", "stream_auto_select_node_key_discovery_plus") or ""
elseif type == "Bilibili" then
regex = uci:get("openclash", "config", "stream_auto_select_node_key_bilibili") or ""
elseif type == "Google" then
regex = uci:get("openclash", "config", "stream_auto_select_node_key_google_not_cn") or ""
end
if class_type(t) == "table" then
@ -725,6 +736,8 @@ function proxy_unlock_test()
region = discovery_plus_unlock_test()
elseif type == "Bilibili" then
region = bilibili_unlock_test()
elseif type == "Google" then
region = google_not_cn_test()
end
return region
end
@ -756,6 +769,8 @@ function auto_get_policy_group(passwd, ip, port)
luci.sys.call('curl -sL -m 5 --limit-rate 1k -o /dev/null https://www.discoveryplus.com/ &')
elseif type == "Bilibili" then
luci.sys.call('curl -sL -m 5 --limit-rate 1k -o /dev/null https://www.bilibili.com/ &')
elseif type == "Google" then
luci.sys.call('curl -sL -m 5 --limit-rate 1k -o /dev/null https://timeline.google.com &')
end
os.execute("sleep 1")
con = luci.sys.exec(string.format('curl -sL -m 5 --retry 2 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -XGET http://%s:%s/connections', passwd, ip, port))
@ -824,6 +839,11 @@ function auto_get_policy_group(passwd, ip, port)
auto_get_group = con.connections[i].chains[#(con.connections[i].chains)]
break
end
elseif type == "Google" then
if string.match(con.connections[i].metadata.host, "timeline%.google%.com") then
auto_get_group = con.connections[i].chains[#(con.connections[i].chains)]
break
end
end
end
end
@ -1391,4 +1411,21 @@ function bilibili_unlock_test()
end
end
function google_not_cn_test()
status = 0
local url = "https://timeline.google.com"
local region
local httpcode = luci.sys.exec(string.format("curl -sL --connect-timeout 5 -m 10 --speed-time 5 --speed-limit 1 --retry 2 -o /dev/null -w %%{http_code} -H 'Accept-Language: en' -H 'Content-Type: application/json' -H 'User-Agent: %s' '%s'", UA, url))
if httpcode then
if tonumber(httpcode) == 200 then
status = 2
region = "NOT CN"
else
region = "CN"
status = 1
end
return region
end
end
unlock_auto_select()

View File

@ -6,6 +6,7 @@ CLASH_CONFIG="/etc/openclash"
LOG_FILE="/tmp/openclash.log"
PROXY_FWMARK="0x162"
PROXY_ROUTE_TABLE="0x162"
ipv6_enable=$(uci -q get openclash.config.ipv6_enable)
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)
@ -23,6 +24,7 @@ CRASH_NUM=0
CFG_UPDATE_INT=1
STREAM_DOMAINS_PREFETCH=1
STREAM_AUTO_SELECT=1
FW4="$(command -v fw4)"
sleep 60
while :;
@ -46,6 +48,7 @@ do
stream_auto_select_paramount_plus=$(uci -q get openclash.config.stream_auto_select_paramount_plus || echo 0)
stream_auto_select_discovery_plus=$(uci -q get openclash.config.stream_auto_select_discovery_plus || echo 0)
stream_auto_select_bilibili=$(uci -q get openclash.config.stream_auto_select_bilibili || echo 0)
stream_auto_select_google_not_cn=$(uci -q get openclash.config.stream_auto_select_google_not_cn || echo 0)
enable=$(uci -q get openclash.config.enable)
@ -116,7 +119,64 @@ fi
iptables -t nat -A PREROUTING -p tcp -j openclash
LOG_OUT "Watchdog: Setting Firewall For Enabling Redirect..."
fi
## Localnetwork 刷新
lan_ip_cidrs=$(ip route | grep "/" | awk '{print $1}' | grep -vE "^198.18" 2>/dev/null)
lan_ip6_cidrs=$(ip -6 route | grep "/" | awk '{print $1}' | grep -vE "^unreachable" 2>/dev/null)
wan_ip4s=$(ifconfig | grep 'inet addr' | awk '{print $2}' | cut -d: -f2 | grep -vE "(^198.18|^192.168|^127.0)" 2>/dev/null)
if [ -n "$FW4" ]; then
if [ -n "$lan_ip_cidrs" ]; then
for lan_ip_cidr in $lan_ip_cidrs; do
nft add element inet fw4 localnetwork { "$lan_ip_cidr" } 2>/dev/null
done
fi
if [ -n "$wan_ip4s" ]; then
for wan_ip4 in $wan_ip4s; do
nft add element inet fw4 localnetwork { "$wan_ip4" } 2>/dev/null
done
fi
if [ "$ipv6_enable" -eq 1 ]; then
if [ -n "$lan_ip6_cidrs" ]; then
for lan_ip6_cidr in $lan_ip6_cidrs; do
nft add element inet fw4 localnetwork6 { "$lan_ip6_cidr" } 2>/dev/null
done
fi
if [ -n "$wan_ip6s" ]; then
for wan_ip6 in $wan_ip6s; do
nft add element inet fw4 localnetwork6 { "$wan_ip6" } 2>/dev/null
done
fi
fi
else
if [ -n "$lan_ip_cidrs" ]; then
for lan_ip_cidr in $lan_ip_cidrs; do
ipset add localnetwork "$lan_ip_cidr" 2>/dev/null
done
fi
if [ -n "$wan_ip4s" ]; then
for wan_ip4 in $wan_ip4s; do
ipset add localnetwork "$wan_ip4" 2>/dev/null
done
fi
if [ "$ipv6_enable" -eq 1 ]; then
if [ -n "$lan_ip6_cidrs" ]; then
for lan_ip6_cidr in $lan_ip6_cidrs; do
ipset add localnetwork6 "$lan_ip6_cidr" 2>/dev/null
done
fi
if [ -n "$wan_ip6s" ]; then
for wan_ip6 in $wan_ip6s; do
ipset add localnetwork6 "$wan_ip6" 2>/dev/null
done
fi
fi
fi
## DNS转发劫持
if [ "$enable_redirect_dns" -ne 0 ]; then
if [ -z "$(uci -q get dhcp.@dnsmasq[0].server |grep "$dns_port")" ] || [ ! -z "$(uci -q get dhcp.@dnsmasq[0].server |awk -F ' ' '{print $2}')" ]; then
@ -198,6 +258,10 @@ fi
LOG_OUT "Tip: Start Auto Select Proxy For Bilibili Unlock..."
/usr/share/openclash/openclash_streaming_unlock.lua "Bilibili" >> $LOG_FILE
fi
if [ "$stream_auto_select_google_not_cn" -eq 1 ]; then
LOG_OUT "Tip: Start Auto Select Proxy For Google Not CN Unlock..."
/usr/share/openclash/openclash_streaming_unlock.lua "Google" >> $LOG_FILE
fi
fi
fi
STREAM_AUTO_SELECT=$(expr "$STREAM_AUTO_SELECT" + 1)

View File

@ -16,6 +16,7 @@ rules:
- RULE-SET,ABC,Global TV
- RULE-SET,Abema TV,Global TV
- RULE-SET,Amazon,Global TV
- RULE-SET,Apple Music,Global TV
- RULE-SET,Apple News,Global TV
- RULE-SET,Apple TV,Global TV
- RULE-SET,Bahamut,Global TV
@ -43,7 +44,7 @@ rules:
- RULE-SET,ViuTV,Global TV
- RULE-SET,Telegram,Telegram
- RULE-SET,Crypto,Crypto
- RULE-SET,Douyin,Douyin
- RULE-SET,Discord,Discord
- RULE-SET,Steam,Steam
- RULE-SET,Speedtest,Speedtest
- RULE-SET,PayPal,PayPal
@ -77,6 +78,7 @@ script:
"ABC": "Global TV",
"Abema TV": "Global TV",
"Amazon": "Global TV",
"Apple Music": "Global TV",
"Apple News": "Global TV",
"Apple TV": "Global TV",
"Bahamut": "Global TV",
@ -104,7 +106,7 @@ script:
"ViuTV": "Global TV",
"Telegram": "Telegram",
"Crypto": "Crypto",
"Douyin": "Douyin",
"Discord": "Discord",
"Steam": "Steam",
"Speedtest": "Speedtest",
"PayPal": "PayPal",
@ -244,6 +246,12 @@ rule-providers:
url: https://fastly.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
path: "./Rules/Media/Apple_Music"
interval: 86400
Apple News:
type: http
behavior: classical
@ -412,11 +420,11 @@ rule-providers:
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Crypto.yaml
path: "./Rules/Crypto"
interval: 86400
Douyin:
Discord:
type: http
behavior: classical
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Douyin.yaml
path: "./Rules/Douyin"
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Discord.yaml
path: "./Rules/Discord"
interval: 86400
Steam:
type: http

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

View File

@ -1 +0,0 @@
var E=Object.defineProperty,O=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var Y=(t,a,r)=>a in t?E(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r,o=(t,a)=>{for(var r in a||(a={}))w.call(a,r)&&Y(t,r,a[r]);if(c)for(var r of c(a))k.call(a,r)&&Y(t,r,a[r]);return t},i=(t,a)=>O(t,A(a));var f=(t,a)=>{var r={};for(var n in t)w.call(t,n)&&a.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&c)for(var n of c(t))a.indexOf(n)<0&&k.call(t,n)&&(r[n]=t[n]);return r};import{j as e,b as y,r as d,h as B}from"./index.5901d226.js";const H="_spining_4i8sg_1",L="_spining_keyframes_4i8sg_1";var R={spining:H,spining_keyframes:L};const{useState:V}=B;function P({children:t}){return e("span",{className:R.spining,children:t})}const Q={right:10,bottom:10},S=r=>{var n=r,{children:t}=n,a=f(n,["children"]);return e("button",i(o({type:"button"},a),{className:"rtf--ab",children:t}))},q=r=>{var n=r,{children:t}=n,a=f(n,["children"]);return e("button",i(o({type:"button",className:"rtf--mb"},a),{children:t}))},D={bottom:24,right:24},U=G=>{var _=G,{event:t="hover",style:a=D,alwaysShowTitle:r=!1,children:n,icon:v,mainButtonStyles:z,onClick:m,text:h}=_,N=f(_,["event","style","alwaysShowTitle","children","icon","mainButtonStyles","onClick","text"]);const[l,b]=V(!1),x=r||!l,g=()=>b(!0),u=()=>b(!1),$=()=>t==="hover"&&g(),j=()=>t==="hover"&&u(),C=s=>m?m(s):(s.persist(),t==="click"?l?u():g():null),I=(s,p)=>{s.persist(),b(!1),setTimeout(()=>{p(s)},1)},F=()=>d.exports.Children.map(n,(s,p)=>d.exports.isValidElement(s)?y("li",{className:`rtf--ab__c ${"top"in a?"top":""}`,children:[d.exports.cloneElement(s,i(o({"data-testid":`action-button-${p}`,"aria-label":s.props.text||`Menu button ${p+1}`,"aria-hidden":x,tabIndex:l?0:-1},s.props),{onClick:M=>{s.props.onClick&&I(M,s.props.onClick)}})),s.props.text&&e("span",{className:`${"right"in a?"right":""} ${r?"always-show":""}`,"aria-hidden":x,children:s.props.text})]}):null);return e("ul",i(o({onMouseEnter:$,onMouseLeave:j,className:`rtf ${l?"open":"closed"}`,"data-testid":"fab",style:a},N),{children:y("li",{className:"rtf--mb__c",children:[e(q,{onClick:C,style:z,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:v}),h&&e("span",{className:`${"right"in a?"right":""} ${r?"always-show":""}`,"aria-hidden":x,children:h}),e("ul",{children:F()})]})}))};export{S as A,U as F,P as I,Q as p};

View File

@ -0,0 +1 @@
import{j as e,b,h as y,r as l}from"./index.2addc377.js";const F="_spining_4i8sg_1",M="_spining_keyframes_4i8sg_1",j={spining:F,spining_keyframes:M},{useState:v}=y;function B({children:s}){return e("span",{className:j.spining,children:s})}const H={right:10,bottom:10},L=({children:s,...n})=>e("button",{type:"button",...n,className:"rtf--ab",children:s}),E=({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:i=!1,children:f,icon:g,mainButtonStyles:h,onClick:p,text:d,..._})=>{const[a,r]=v(!1),c=i||!a,u=()=>r(!0),m=()=>r(!1),x=()=>s==="hover"&&u(),k=()=>s==="hover"&&m(),N=t=>p?p(t):(t.persist(),s==="click"?a?m():u():null),$=(t,o)=>{t.persist(),r(!1),setTimeout(()=>{o(t)},1)},C=()=>l.exports.Children.map(f,(t,o)=>l.exports.isValidElement(t)?b("li",{className:`rtf--ab__c ${"top"in n?"top":""}`,children:[l.exports.cloneElement(t,{"data-testid":`action-button-${o}`,"aria-label":t.props.text||`Menu button ${o+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":""} ${i?"always-show":""}`,"aria-hidden":c,children:t.props.text})]}):null);return e("ul",{onMouseEnter:x,onMouseLeave:k,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:n,..._,children:b("li",{className:"rtf--mb__c",children:[e(E,{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":""} ${i?"always-show":""}`,"aria-hidden":c,children:d}),e("ul",{children:C()})]})})};export{L as A,R as F,B as I,H as p};

View File

@ -1 +0,0 @@
._RuleSearch_1gcst_1{padding:0 40px 5px}._RuleSearchContainer_1gcst_5{position:relative;height:40px}._inputWrapper_1gcst_10{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;width:100%}._input_1gcst_10{-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_1gcst_35{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:10px}._logMeta_1dg5t_1{display:flex;align-items:center;flex-wrap:wrap;font-size:.9em}._logType_1dg5t_8{color:#eee;flex-shrink:0;text-align:center;width:66px;border-radius:100px;padding:3px 5px;margin:0 8px}._logTime_1dg5t_18{flex-shrink:0;color:#999;font-size:14px}._logText_1dg5t_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_1dg5t_37{margin:0;padding:0;color:var(--color-text)}._logsWrapper_1dg5t_37 .log{padding:10px 40px;background:var(--color-background)}._logsWrapper_1dg5t_37 .log.even{background:var(--color-background)}._logPlaceholder_1dg5t_51{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}._logPlaceholder_1dg5t_51 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._logPlaceholderIcon_1dg5t_64{opacity:.3}

View File

@ -1 +0,0 @@
var R=Object.defineProperty,w=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var T=(e,t,o)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,p=(e,t)=>{for(var o in t||(t={}))N.call(t,o)&&T(e,o,t[o]);if(S)for(var o of S(t))W.call(t,o)&&T(e,o,t[o]);return e},m=(e,t)=>w(e,C(t));import{r as _,b as l,j as a,P as f,d as P,G as k,H as j,w as z,J as I,u as O,C as F,S as M,K as $,L as H,g as A,N as B,h as D,c as E}from"./index.5901d226.js";import{a as K,F as q}from"./index.esm.390d1b7a.js";import{r as G,s as J,f as V}from"./logs.36f1d416.js";import{d as Y}from"./debounce.d080d5e1.js";import{u as Q}from"./useRemainingViewPortHeight.d051faee.js";import{F as U,p as X}from"./Fab.93225453.js";import{P as Z,a as ee}from"./play.56145bca.js";function te(e,t){if(e==null)return{};var o=oe(e,t),n,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function oe(e,t){if(e==null)return{};var o={},n=Object.keys(e),r,s;for(s=0;s<n.length;s++)r=n[s],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var x=_.exports.forwardRef(function(e,t){var o=e.color,n=o===void 0?"currentColor":o,r=e.size,s=r===void 0?24:r,g=te(e,["color","size"]);return l("svg",m(p({ref:t,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"},g),{children:[a("circle",{cx:"11",cy:"11",r:"8"}),a("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}))});x.propTypes={color:f.string,size:f.oneOfType([f.string,f.number])};x.displayName="Search";var re=x;const ae="_RuleSearch_1gcst_1",ne="_RuleSearchContainer_1gcst_5",se="_inputWrapper_1gcst_10",ce="_input_1gcst_10",ie="_iconWrapper_1gcst_35";var d={RuleSearch:ae,RuleSearchContainer:ne,inputWrapper:se,input:ce,iconWrapper:ie};function le({dispatch:e,searchText:t,updateSearchText:o}){const[n,r]=_.exports.useState(t),s=_.exports.useCallback(i=>{e(o(i))},[e,o]),g=_.exports.useMemo(()=>Y(s,300),[s]),h=i=>{r(i.target.value),g(i.target.value)};return a("div",{className:d.RuleSearch,children:l("div",{className:d.RuleSearchContainer,children:[a("div",{className:d.inputWrapper,children:a("input",{type:"text",value:n,onChange:h,className:d.input})}),a("div",{className:d.iconWrapper,children:a(re,{size:20})})]})})}const ge=e=>({searchText:k(e),updateSearchText:j});var pe=P(ge)(le);const de="_logMeta_1dg5t_1",he="_logType_1dg5t_8",ue="_logTime_1dg5t_18",me="_logText_1dg5t_24",fe="_logsWrapper_1dg5t_37",_e="_logPlaceholder_1dg5t_51",ve="_logPlaceholderIcon_1dg5t_64";var c={logMeta:de,logType:he,logTime:ue,logText:me,logsWrapper:fe,logPlaceholder:_e,logPlaceholderIcon:ve};const{useCallback:b,memo:xe,useEffect:ye}=D,v=30,Se={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function Te({time:e,even:t,payload:o,type:n}){const r=E({even:t},"log");return a("div",{className:r,children:l("div",{className:c.logMeta,children:[a("div",{className:c.logTime,children:e}),a("div",{className:c.logType,style:{backgroundColor:Se[n]},children:n}),a("div",{className:c.logText,children:o})]})})}function be(e,t){return t[e].id}const Pe=xe(({index:e,style:t,data:o})=>{const n=o[e];return a("div",{style:t,children:a(Te,p({},n))})},K);function Le({dispatch:e,logLevel:t,apiConfig:o,logs:n,logStreamingPaused:r}){const s=z(),g=b(()=>{r?G(m(p({},o),{logLevel:t})):J(),s.app.updateAppConfig("logStreamingPaused",!r)},[o,t,r,s.app]),h=b(L=>e(I(L)),[e]);ye(()=>{V(m(p({},o),{logLevel:t}),h)},[o,t,h]);const[i,y]=Q(),{t:u}=O();return l("div",{children:[a(F,{title:u("Logs")}),a(pe,{}),a("div",{ref:i,style:{paddingBottom:v},children:n.length===0?l("div",{className:c.logPlaceholder,style:{height:y-v},children:[a("div",{className:c.logPlaceholderIcon,children:a(M,{width:200,height:200})}),a("div",{children:u("no_logs")})]}):l("div",{className:c.logsWrapper,children:[a(q,{height:y-v,width:"100%",itemCount:n.length,itemSize:80,itemData:n,itemKey:be,children:Pe}),a(U,{icon:r?a(Z,{size:16}):a(ee,{size:16}),mainButtonStyles:r?{background:"#e74c3c"}:{},style:X,text:u(r?"Resume Refresh":"Pause Refresh"),onClick:g})]})})]})}const Re=e=>({logs:$(e),logLevel:H(e),apiConfig:A(e),logStreamingPaused:B(e)});var Oe=P(Re)(Le);export{Oe as default};

View File

@ -0,0 +1 @@
import{r as m,b as l,j as t,i as u,d as y,H as T,J as b,x as L,K as P,u as R,C as N,S as z,L as C,N as W,g as w,O as k,h as j,c as I}from"./index.2addc377.js";import{a as O,F}from"./index.esm.d79e6b4f.js";import{r as M,s as $,f as H}from"./logs.e4cdcb93.js";import{d as A}from"./debounce.c2d20996.js";import{u as B}from"./useRemainingViewPortHeight.4e5a0898.js";import{F as D,p as E}from"./Fab.ac4f3b29.js";import{P as K,a as q}from"./play.f2fb5ccc.js";function J(e,n){if(e==null)return{};var r=V(e,n),a,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)a=s[o],!(n.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,a)||(r[a]=e[a]))}return r}function V(e,n){if(e==null)return{};var r={},a=Object.keys(e),o,s;for(s=0;s<a.length;s++)o=a[s],!(n.indexOf(o)>=0)&&(r[o]=e[o]);return r}var f=m.exports.forwardRef(function(e,n){var r=e.color,a=r===void 0?"currentColor":r,o=e.size,s=o===void 0?24:o,p=J(e,["color","size"]);return l("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:a,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...p,children:[t("circle",{cx:"11",cy:"11",r:"8"}),t("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})});f.propTypes={color:u.exports.string,size:u.exports.oneOfType([u.exports.string,u.exports.number])};f.displayName="Search";const Y=f,G="_RuleSearch_1oz2t_1",Q="_RuleSearchContainer_1oz2t_5",U="_inputWrapper_1oz2t_10",X="_input_1oz2t_10",Z="_iconWrapper_1oz2t_35",g={RuleSearch:G,RuleSearchContainer:Q,inputWrapper:U,input:X,iconWrapper:Z};function ee({dispatch:e,searchText:n,updateSearchText:r}){const[a,o]=m.exports.useState(n),s=m.exports.useCallback(i=>{e(r(i))},[e,r]),p=m.exports.useMemo(()=>A(s,300),[s]),h=i=>{o(i.target.value),p(i.target.value)};return t("div",{className:g.RuleSearch,children:l("div",{className:g.RuleSearchContainer,children:[t("div",{className:g.inputWrapper,children:t("input",{type:"text",value:a,onChange:h,className:g.input})}),t("div",{className:g.iconWrapper,children:t(Y,{size:20})})]})})}const te=e=>({searchText:T(e),updateSearchText:b}),oe=y(te)(ee),re="_logMeta_7a1x3_1",ae="_logType_7a1x3_8",ne="_logTime_7a1x3_18",se="_logText_7a1x3_24",ce="_logsWrapper_7a1x3_37",ie="_logPlaceholder_7a1x3_51",le="_logPlaceholderIcon_7a1x3_64",pe="_search_7a1x3_68",c={logMeta:re,logType:ae,logTime:ne,logText:se,logsWrapper:ce,logPlaceholder:ie,logPlaceholderIcon:le,search:pe},{useCallback:v,memo:ge,useEffect:he}=j,_=30,de={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function ue({time:e,even:n,payload:r,type:a}){const o=I({even:n},"log");return t("div",{className:o,children:l("div",{className:c.logMeta,children:[t("div",{className:c.logTime,children:e}),t("div",{className:c.logType,style:{backgroundColor:de[a]},children:a}),t("div",{className:c.logText,children:r})]})})}function me(e,n){return n[e].id}const _e=ge(({index:e,style:n,data:r})=>{const a=r[e];return t("div",{style:n,children:t(ue,{...a})})},O);function fe({dispatch:e,logLevel:n,apiConfig:r,logs:a,logStreamingPaused:o}){const s=L(),p=v(()=>{o?M({...r,logLevel:n}):$(),s.app.updateAppConfig("logStreamingPaused",!o)},[r,n,o,s.app]),h=v(S=>e(P(S)),[e]);he(()=>{H({...r,logLevel:n},h)},[r,n,h]);const[i,x]=B(),{t:d}=R();return l("div",{children:[t(N,{title:d("Logs")}),t("div",{className:c.search,children:t(oe,{})}),t("div",{ref:i,style:{paddingBottom:_},children:a.length===0?l("div",{className:c.logPlaceholder,style:{height:x-_},children:[t("div",{className:c.logPlaceholderIcon,children:t(z,{width:200,height:200})}),t("div",{children:d("no_logs")})]}):l("div",{className:c.logsWrapper,children:[t(F,{height:x-_,width:"100%",itemCount:a.length,itemSize:80,itemData:a,itemKey:me,children:_e}),t(D,{icon:o?t(K,{size:16}):t(q,{size:16}),mainButtonStyles:o?{background:"#e74c3c"}:{},style:E,text:d(o?"Resume Refresh":"Pause Refresh"),onClick:p})]})})]})}const xe=e=>({logs:C(e),logLevel:W(e),apiConfig:w(e),logStreamingPaused:k(e)}),Re=y(xe)(fe);export{Re as default};

View File

@ -0,0 +1 @@
._RuleSearch_1oz2t_1{padding:0 40px 5px}._RuleSearchContainer_1oz2t_5{position:relative;height:40px}._inputWrapper_1oz2t_10{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;width:100%}._input_1oz2t_10{-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_1oz2t_35{position:absolute;top:50%;-webkit-transform:translateY(-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}

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

View File

@ -0,0 +1 @@
import{j as s}from"./index.2addc377.js";const o="_select_13zm8_1",r={select:o};function i({options:t,selected:c,onChange:l}){return s("select",{className:r.select,value:c,onChange:l,children:t.map(([e,n])=>s("option",{value:e,children:n},e))})}export{i as S};

View File

@ -1 +0,0 @@
import{j as s}from"./index.5901d226.js";const n="_select_13zm8_1";var o={select:n};function i({options:t,selected:c,onChange:l}){return s("select",{className:o.select,value:c,onChange:l,children:t.map(([e,r])=>s("option",{value:e,children:r},e))})}export{i as S};

View File

@ -0,0 +1 @@
import{r as u,b as g,j as i,i as c,c as f,V as x,h as d}from"./index.2addc377.js";import{d as h}from"./debounce.c2d20996.js";function v(t,n){if(t==null)return{};var o=_(t,n),r,e;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(e=0;e<s.length;e++)r=s[e],!(n.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(o[r]=t[r]))}return o}function _(t,n){if(t==null)return{};var o={},r=Object.keys(t),e,s;for(s=0;s<r.length;s++)e=r[s],!(n.indexOf(e)>=0)&&(o[e]=t[e]);return o}var l=u.exports.forwardRef(function(t,n){var o=t.color,r=o===void 0?"currentColor":o,e=t.size,s=e===void 0?24:e,a=v(t,["color","size"]);return g("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...a,children:[i("polyline",{points:"23 4 23 10 17 10"}),i("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})});l.propTypes={color:c.exports.string,size:c.exports.oneOfType([c.exports.string,c.exports.number])};l.displayName="RotateCw";const b=l,y="_rotate_1dspl_1",m="_isRotating_1dspl_5",R="_rotating_1dspl_1",p={rotate:y,isRotating:m,rotating:R};function P(t){const n=t.size||16,o=f(p.rotate,{[p.isRotating]:t.isRotating});return i("span",{className:o,children:i(b,{size:n})})}const{useCallback:w,useState:j,useMemo:O}=d;function T(t){const[,n]=x(t),[o,r]=j(""),e=O(()=>h(n,300),[n]);return[w(a=>{r(a.target.value),e(a.target.value)},[e]),o]}const k="_input_16a1f_1",C={input:k};function $(t){const[n,o]=T(t.textAtom);return i("input",{className:C.input,type:"text",value:o,onChange:n,placeholder:t.placeholder})}export{P as R,$ as T,b as a};

View File

@ -1 +0,0 @@
var v=Object.defineProperty,h=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var p=(t,e,o)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,g=(t,e)=>{for(var o in e||(e={}))_.call(e,o)&&p(t,o,e[o]);if(u)for(var o of u(e))b.call(e,o)&&p(t,o,e[o]);return t},f=(t,e)=>h(t,x(e));import{r as y,b as m,j as i,P as c,c as R,V as w,h as j}from"./index.5901d226.js";import{d as O}from"./debounce.d080d5e1.js";function T(t,e){if(t==null)return{};var o=k(t,e),r,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(o[r]=t[r]))}return o}function k(t,e){if(t==null)return{};var o={},r=Object.keys(t),n,a;for(a=0;a<r.length;a++)n=r[a],!(e.indexOf(n)>=0)&&(o[n]=t[n]);return o}var l=y.exports.forwardRef(function(t,e){var o=t.color,r=o===void 0?"currentColor":o,n=t.size,a=n===void 0?24:n,s=T(t,["color","size"]);return m("svg",f(g({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),{children:[i("polyline",{points:"23 4 23 10 17 10"}),i("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}))});l.propTypes={color:c.string,size:c.oneOfType([c.string,c.number])};l.displayName="RotateCw";var C=l;const z="_rotate_1dspl_1",P="_isRotating_1dspl_5",L="_rotating_1dspl_1";var d={rotate:z,isRotating:P,rotating:L};function E(t){const e=t.size||16,o=R(d.rotate,{[d.isRotating]:t.isRotating});return i("span",{className:o,children:i(C,{size:e})})}const{useCallback:$,useState:I,useMemo:N}=j;function W(t){const[,e]=w(t),[o,r]=I(""),n=N(()=>O(e,300),[e]);return[$(s=>{r(s.target.value),n(s.target.value)},[n]),o]}const M="_input_16a1f_1";var S={input:M};function F(t){const[e,o]=W(t.textAtom);return i("input",{className:S.input,type:"text",value:o,onChange:e,placeholder:t.placeholder})}export{E as R,F as T,C as a};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{r as f,j as l,i as s}from"./index.2addc377.js";function c(r,i){if(r==null)return{};var n=v(r,i),o,e;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);for(e=0;e<t.length;e++)o=t[e],!(i.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,o)||(n[o]=r[o]))}return n}function v(r,i){if(r==null)return{};var n={},o=Object.keys(r),e,t;for(t=0;t<o.length;t++)e=o[t],!(i.indexOf(e)>=0)&&(n[e]=r[e]);return n}var p=f.exports.forwardRef(function(r,i){var n=r.color,o=n===void 0?"currentColor":n,e=r.size,t=e===void 0?24:e,a=c(r,["color","size"]);return l("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...a,children:l("polyline",{points:"6 9 12 15 18 9"})})});p.propTypes={color:s.exports.string,size:s.exports.oneOfType([s.exports.string,s.exports.number])};p.displayName="ChevronDown";const u=p;export{u as C};

View File

@ -1 +0,0 @@
var u=Object.defineProperty,y=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var p=(r,e,o)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,f=(r,e)=>{for(var o in e||(e={}))w.call(e,o)&&p(r,o,e[o]);if(l)for(var o of l(e))b.call(e,o)&&p(r,o,e[o]);return r},v=(r,e)=>y(r,g(e));import{r as d,j as c,P as s}from"./index.5901d226.js";function j(r,e){if(r==null)return{};var o=O(r,e),n,t;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(o[n]=r[n]))}return o}function O(r,e){if(r==null)return{};var o={},n=Object.keys(r),t,i;for(i=0;i<n.length;i++)t=n[i],!(e.indexOf(t)>=0)&&(o[t]=r[t]);return o}var a=d.exports.forwardRef(function(r,e){var o=r.color,n=o===void 0?"currentColor":o,t=r.size,i=t===void 0?24:t,h=j(r,["color","size"]);return c("svg",v(f({ref:e,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),{children:c("polyline",{points:"6 9 12 15 18 9"})}))});a.propTypes={color:s.string,size:s.oneOfType([s.string,s.number])};a.displayName="ChevronDown";var x=a;export{x as C};

View File

@ -0,0 +1 @@
function O(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var M=typeof global=="object"&&global&&global.Object===Object&&global;const R=M;var w=typeof self=="object"&&self&&self.Object===Object&&self,B=R||w||Function("return this")();const W=B;var F=function(){return W.Date.now()};const S=F;var G=/\s/;function U(e){for(var n=e.length;n--&&G.test(e.charAt(n)););return n}var _=/^\s+/;function D(e){return e&&e.slice(0,U(e)+1).replace(_,"")}var H=W.Symbol;const y=H;var L=Object.prototype,X=L.hasOwnProperty,q=L.toString,g=y?y.toStringTag:void 0;function z(e){var n=X.call(e,g),i=e[g];try{e[g]=void 0;var o=!0}catch{}var f=q.call(e);return o&&(n?e[g]=i:delete e[g]),f}var J=Object.prototype,K=J.toString;function Q(e){return K.call(e)}var V="[object Null]",Y="[object Undefined]",$=y?y.toStringTag:void 0;function Z(e){return e==null?e===void 0?Y:V:$&&$ in Object(e)?z(e):Q(e)}function ee(e){return e!=null&&typeof e=="object"}var ne="[object Symbol]";function te(e){return typeof e=="symbol"||ee(e)&&Z(e)==ne}var E=0/0,re=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^0o[0-7]+$/i,ae=parseInt;function k(e){if(typeof e=="number")return e;if(te(e))return E;if(O(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=O(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=D(e);var i=ie.test(e);return i||oe.test(e)?ae(e.slice(2),i?2:8):re.test(e)?E:+e}var fe="Expected a function",ce=Math.max,ue=Math.min;function se(e,n,i){var o,f,s,u,r,c,d=0,v=!1,l=!1,T=!0;if(typeof e!="function")throw new TypeError(fe);n=k(n)||0,O(i)&&(v=!!i.leading,l="maxWait"in i,s=l?ce(k(i.maxWait)||0,n):s,T="trailing"in i?!!i.trailing:T);function j(t){var a=o,b=f;return o=f=void 0,d=t,u=e.apply(b,a),u}function N(t){return d=t,r=setTimeout(m,n),v?j(t):u}function P(t){var a=t-c,b=t-d,I=n-a;return l?ue(I,s-b):I}function h(t){var a=t-c,b=t-d;return c===void 0||a>=n||a<0||l&&b>=s}function m(){var t=S();if(h(t))return x(t);r=setTimeout(m,P(t))}function x(t){return r=void 0,T&&o?j(t):(o=f=void 0,u)}function A(){r!==void 0&&clearTimeout(r),d=0,o=c=f=r=void 0}function C(){return r===void 0?u:x(S())}function p(){var t=S(),a=h(t);if(o=arguments,f=this,c=t,a){if(r===void 0)return N(c);if(l)return clearTimeout(r),r=setTimeout(m,n),j(c)}return r===void 0&&(r=setTimeout(m,n)),u}return p.cancel=A,p.flush=C,p}export{se as d};

View File

@ -1 +0,0 @@
function S(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var M=typeof global=="object"&&global&&global.Object===Object&&global,R=M,w=typeof self=="object"&&self&&self.Object===Object&&self,B=R||w||Function("return this")(),W=B,F=function(){return W.Date.now()},p=F,G=/\s/;function U(e){for(var n=e.length;n--&&G.test(e.charAt(n)););return n}var _=/^\s+/;function D(e){return e&&e.slice(0,U(e)+1).replace(_,"")}var H=W.Symbol,y=H,L=Object.prototype,X=L.hasOwnProperty,q=L.toString,g=y?y.toStringTag:void 0;function z(e){var n=X.call(e,g),i=e[g];try{e[g]=void 0;var o=!0}catch{}var f=q.call(e);return o&&(n?e[g]=i:delete e[g]),f}var J=Object.prototype,K=J.toString;function Q(e){return K.call(e)}var V="[object Null]",Y="[object Undefined]",$=y?y.toStringTag:void 0;function Z(e){return e==null?e===void 0?Y:V:$&&$ in Object(e)?z(e):Q(e)}function ee(e){return e!=null&&typeof e=="object"}var ne="[object Symbol]";function te(e){return typeof e=="symbol"||ee(e)&&Z(e)==ne}var E=0/0,re=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^0o[0-7]+$/i,ae=parseInt;function k(e){if(typeof e=="number")return e;if(te(e))return E;if(S(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=S(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=D(e);var i=ie.test(e);return i||oe.test(e)?ae(e.slice(2),i?2:8):re.test(e)?E:+e}var fe="Expected a function",ce=Math.max,ue=Math.min;function se(e,n,i){var o,f,s,u,r,c,d=0,O=!1,l=!1,T=!0;if(typeof e!="function")throw new TypeError(fe);n=k(n)||0,S(i)&&(O=!!i.leading,l="maxWait"in i,s=l?ce(k(i.maxWait)||0,n):s,T="trailing"in i?!!i.trailing:T);function j(t){var a=o,b=f;return o=f=void 0,d=t,u=e.apply(b,a),u}function N(t){return d=t,r=setTimeout(m,n),O?j(t):u}function P(t){var a=t-c,b=t-d,I=n-a;return l?ue(I,s-b):I}function h(t){var a=t-c,b=t-d;return c===void 0||a>=n||a<0||l&&b>=s}function m(){var t=p();if(h(t))return x(t);r=setTimeout(m,P(t))}function x(t){return r=void 0,T&&o?j(t):(o=f=void 0,u)}function A(){r!==void 0&&clearTimeout(r),d=0,o=c=f=r=void 0}function C(){return r===void 0?u:x(p())}function v(){var t=p(),a=h(t);if(o=arguments,f=this,c=t,a){if(r===void 0)return N(c);if(l)return clearTimeout(r),r=setTimeout(m,n),j(c)}return r===void 0&&(r=setTimeout(m,n)),u}return v.cancel=A,v.flush=C,v}export{se as d};

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

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

View File

@ -1,2 +0,0 @@
var $=Object.defineProperty,k=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var S=(e,t,n)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t)=>{for(var n in t||(t={}))E.call(t,n)&&S(e,n,t[n]);if(h)for(var n of h(t))A.call(t,n)&&S(e,n,t[n]);return e},v=(e,t)=>k(e,y(t));import{A as O,D as R,E as u}from"./index.5901d226.js";const L="/logs",x=new TextDecoder("utf-8"),F=()=>Math.floor((1+Math.random())*65536).toString(16);let p=!1,i=!1,f="",s,g;function m(e,t){let n;try{n=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}const r=new Date,l=H(r);n.time=l,n.id=+r-0+F(),n.even=p=!p,t(n)}function H(e){const t=e.getFullYear()%100,n=u(e.getMonth()+1,2),r=u(e.getDate(),2),l=u(e.getHours(),2),o=u(e.getMinutes(),2),c=u(e.getSeconds(),2);return`${t}-${n}-${r} ${l}:${o}:${c}`}function M(e,t){return e.read().then(({done:n,value:r})=>{f+=x.decode(r,{stream:!n});const o=f.split(`
`),c=o[o.length-1];for(let d=0;d<o.length-1;d++)m(o[d],t);if(n){m(c,t),f="",console.log("GET /logs streaming done"),i=!1;return}else f=c;return M(e,t)})}function D(e){const t=Object.keys(e);return t.sort(),t.map(n=>e[n]).join("|")}let w,a;function J(e,t){if(e.logLevel==="uninit"||i||s&&s.readyState===1)return;g=t;const n=O(e,L);s=new WebSocket(n),s.addEventListener("error",()=>{N(e,t)}),s.addEventListener("message",function(r){m(r.data,t)})}function Y(){s.close(),a&&a.abort()}function j(e){!g||!s||(s.close(),i=!1,J(e,g))}function N(e,t){if(a&&D(e)!==w)a.abort();else if(i)return;i=!0,w=D(e),a=new AbortController;const n=a.signal,{url:r,init:l}=R(e);fetch(r+L+"?level="+e.logLevel,v(b({},l),{signal:n})).then(o=>{const c=o.body.getReader();M(c,t)},o=>{i=!1,!n.aborted&&console.log("GET /logs error:",o.message)})}export{J as f,j as r,Y as s};

View File

@ -0,0 +1,2 @@
import{D,E as w,G as u}from"./index.2addc377.js";const v="/logs",L=new TextDecoder("utf-8"),M=()=>Math.floor((1+Math.random())*65536).toString(16);let h=!1,i=!1,f="",s,g;function m(e,n){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}const r=new Date,l=$(r);t.time=l,t.id=+r-0+M(),t.even=h=!h,n(t)}function $(e){const n=e.getFullYear()%100,t=u(e.getMonth()+1,2),r=u(e.getDate(),2),l=u(e.getHours(),2),o=u(e.getMinutes(),2),c=u(e.getSeconds(),2);return`${n}-${t}-${r} ${l}:${o}:${c}`}function p(e,n){return e.read().then(({done:t,value:r})=>{f+=L.decode(r,{stream:!t});const o=f.split(`
`),c=o[o.length-1];for(let d=0;d<o.length-1;d++)m(o[d],n);if(t){m(c,n),f="",console.log("GET /logs streaming done"),i=!1;return}else f=c;return p(e,n)})}function S(e){const n=Object.keys(e);return n.sort(),n.map(t=>e[t]).join("|")}let b,a;function k(e,n){if(e.logLevel==="uninit"||i||s&&s.readyState===1)return;g=n;const t=D(e,v);s=new WebSocket(t),s.addEventListener("error",()=>{y(e,n)}),s.addEventListener("message",function(r){m(r.data,n)})}function O(){s.close(),a&&a.abort()}function R(e){!g||!s||(s.close(),i=!1,k(e,g))}function y(e,n){if(a&&S(e)!==b)a.abort();else if(i)return;i=!0,b=S(e),a=new AbortController;const t=a.signal,{url:r,init:l}=w(e);fetch(r+v+"?level="+e.logLevel,{...l,signal:t}).then(o=>{const c=o.body.getReader();p(c,n)},o=>{i=!1,!t.aborted&&console.log("GET /logs error:",o.message)})}export{k as f,R as r,O as s};

View File

@ -1 +0,0 @@
var h=Object.defineProperty,d=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var v=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&v(e,r,t[r]);if(y)for(var r of y(t))O.call(t,r)&&v(e,r,t[r]);return e},f=(e,t)=>d(e,w(t));import{r as g,b as j,j as a,P as s}from"./index.5901d226.js";function P(e,t){if(e==null)return{};var r=k(e,t),i,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}function k(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,n;for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var c=g.exports.forwardRef(function(e,t){var r=e.color,i=r===void 0?"currentColor":r,o=e.size,n=o===void 0?24:o,l=P(e,["color","size"]);return j("svg",f(p({ref:t,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),{children:[a("rect",{x:"6",y:"4",width:"4",height:"16"}),a("rect",{x:"14",y:"4",width:"4",height:"16"})]}))});c.propTypes={color:s.string,size:s.oneOfType([s.string,s.number])};c.displayName="Pause";var L=c;function x(e,t){if(e==null)return{};var r=m(e,t),i,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}function m(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,n;for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var u=g.exports.forwardRef(function(e,t){var r=e.color,i=r===void 0?"currentColor":r,o=e.size,n=o===void 0?24:o,l=x(e,["color","size"]);return a("svg",f(p({ref:t,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),{children:a("polygon",{points:"5 3 19 12 5 21 5 3"})}))});u.propTypes={color:s.string,size:s.oneOfType([s.string,s.number])};u.displayName="Play";var W=u;export{W as P,L as a};

View File

@ -0,0 +1 @@
import{r as c,b as u,j as p,i as s}from"./index.2addc377.js";function y(e,n){if(e==null)return{};var i=g(e,n),t,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],!(n.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(i[t]=e[t]))}return i}function g(e,n){if(e==null)return{};var i={},t=Object.keys(e),r,o;for(o=0;o<t.length;o++)r=t[o],!(n.indexOf(r)>=0)&&(i[r]=e[r]);return i}var l=c.exports.forwardRef(function(e,n){var i=e.color,t=i===void 0?"currentColor":i,r=e.size,o=r===void 0?24:r,a=y(e,["color","size"]);return u("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...a,children:[p("rect",{x:"6",y:"4",width:"4",height:"16"}),p("rect",{x:"14",y:"4",width:"4",height:"16"})]})});l.propTypes={color:s.exports.string,size:s.exports.oneOfType([s.exports.string,s.exports.number])};l.displayName="Pause";const d=l;function h(e,n){if(e==null)return{};var i=v(e,n),t,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],!(n.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(i[t]=e[t]))}return i}function v(e,n){if(e==null)return{};var i={},t=Object.keys(e),r,o;for(o=0;o<t.length;o++)r=t[o],!(n.indexOf(r)>=0)&&(i[r]=e[r]);return i}var f=c.exports.forwardRef(function(e,n){var i=e.color,t=i===void 0?"currentColor":i,r=e.size,o=r===void 0?24:r,a=h(e,["color","size"]);return p("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...a,children:p("polygon",{points:"5 3 19 12 5 21 5 3"})})});f.propTypes={color:s.exports.string,size:s.exports.oneOfType([s.exports.string,s.exports.number])};f.displayName="Play";const w=f;export{w as P,d as a};

View File

@ -1 +1 @@
import{h as r}from"./index.5901d226.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u};
import{h as r}from"./index.2addc377.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u};

View File

@ -7,14 +7,16 @@
<link rel="icon" type="image/png" sizes="128x128" href="yacd-128.png" />
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png" />
<meta name="apple-mobile-web-app-title" content="yacd">
<meta name="theme-color" content="#eeeeee" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#202020" media="(prefers-color-scheme: dark)" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="application-name" content="yacd" />
<meta name="description" content="Yet Another Clash Dashboard" />
<title>yacd</title>
<script type="module" crossorigin src="./assets/index.5901d226.js"></script>
<link rel="stylesheet" href="./assets/index.0e7e7dfd.css">
<link rel="manifest" href="./manifest.webmanifest"></head>
<script type="module" crossorigin src="./assets/index.2addc377.js"></script>
<link rel="stylesheet" href="./assets/index.487e7aa0.css">
<link rel="manifest" href="./manifest.webmanifest"><script src="./registerSW.js"></script></head>
<body>
<div id="app" data-base-url="http://127.0.0.1:9090"></div>

File diff suppressed because one or more lines are too long

View File

@ -81,6 +81,7 @@ yml_auth_get()
if [ -z "$username" ] || [ -z "$password" ]; then
return
else
LOG_OUT "Tip: You have seted the authentication of SOCKS5/HTTP(S) proxy with【$username:$password"
echo " - $username:$password" >>/tmp/yaml_openclash_auth
fi
}

View File

@ -971,7 +971,7 @@ EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
url: https://cp.cloudflare.com/generate_204
url: http://cp.cloudflare.com/generate_204
interval: "600"
tolerance: "150"
- name: Proxy
@ -1069,7 +1069,7 @@ EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
url: https://cp.cloudflare.com/generate_204
url: http://cp.cloudflare.com/generate_204
interval: "600"
tolerance: "150"
- name: Proxy
@ -1159,20 +1159,6 @@ cat >> "$SERVER_FILE" <<-EOF
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
- name: Douyin
type: select
proxies:
- DIRECT
- Asian TV
EOF
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
cat >> "$SERVER_FILE" <<-EOF
use:
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
- name: Bahamut
type: select
@ -1404,6 +1390,20 @@ cat >> "$SERVER_FILE" <<-EOF
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
- name: Discord
type: select
proxies:
- Proxy
- DIRECT
EOF
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
if [ -f "/tmp/Proxy_Provider" ]; then
cat >> "$SERVER_FILE" <<-EOF
use:
EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
- name: PayPal
type: select
@ -1431,7 +1431,6 @@ ${uci_set}AsianTV="Asian TV"
${uci_set}Proxy="Proxy"
${uci_set}Youtube="Youtube"
${uci_set}Bilibili="Bilibili"
${uci_set}Douyin="Douyin"
${uci_set}Bahamut="Bahamut"
${uci_set}HBOMax="HBO Max"
${uci_set}HBOGo="HBO Go"
@ -1450,6 +1449,7 @@ ${uci_set}AdBlock="AdBlock"
${uci_set}Speedtest="Speedtest"
${uci_set}Telegram="Telegram"
${uci_set}Crypto="Crypto"
${uci_set}Discord="Discord"
${uci_set}PayPal="PayPal"
${uci_set}Domestic="Domestic"
${uci_set}Others="Others"
@ -1461,7 +1461,6 @@ ${uci_set}Others="Others"
${UCI_DEL_LIST}="Proxy" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Proxy" >/dev/null 2>&1
${UCI_DEL_LIST}="Youtube" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Youtube" >/dev/null 2>&1
${UCI_DEL_LIST}="Bilibili" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Bilibili" >/dev/null 2>&1
${UCI_DEL_LIST}="Douyin" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Douyin" >/dev/null 2>&1
${UCI_DEL_LIST}="Bahamut" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Bahamut" >/dev/null 2>&1
${UCI_DEL_LIST}="HBO Max" >/dev/null 2>&1 && ${UCI_ADD_LIST}="HBO Max" >/dev/null 2>&1
${UCI_DEL_LIST}="HBO Go" >/dev/null 2>&1 && ${UCI_ADD_LIST}="HBO Go" >/dev/null 2>&1
@ -1479,6 +1478,7 @@ ${uci_set}Others="Others"
${UCI_DEL_LIST}="Steam" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Steam" >/dev/null 2>&1
${UCI_DEL_LIST}="Telegram" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Telegram" >/dev/null 2>&1
${UCI_DEL_LIST}="Crypto" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Crypto" >/dev/null 2>&1
${UCI_DEL_LIST}="Discord" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Discord" >/dev/null 2>&1
${UCI_DEL_LIST}="PayPal" >/dev/null 2>&1 && ${UCI_ADD_LIST}="PayPal" >/dev/null 2>&1
${UCI_DEL_LIST}="Speedtest" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Speedtest" >/dev/null 2>&1
}
@ -1502,7 +1502,7 @@ EOF
fi
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
cat >> "$SERVER_FILE" <<-EOF
url: https://cp.cloudflare.com/generate_204
url: http://cp.cloudflare.com/generate_204
interval: "600"
tolerance: "150"
- name: Proxy

View File

@ -549,7 +549,7 @@ yml_other_set()
if defined? Value_2 then
Value_2.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
next
end;
@ -583,7 +583,7 @@ yml_other_set()
end;
Value_4.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
next
end;
@ -602,7 +602,7 @@ yml_other_set()
if not Value_1['rules'].to_a.empty? and Value_1['rules'].class.to_s == 'Array' then
Value_1.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
Value_1.delete(x);
end;
@ -614,7 +614,7 @@ yml_other_set()
elsif Value_1.class.to_s == 'Array' then
Value_1.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
Value_1.delete(x);
end;
@ -633,7 +633,7 @@ yml_other_set()
if not Value_2['rules'].to_a.empty? and Value_2['rules'].class.to_s == 'Array' then
Value_2.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
Value_2.delete(x);
end;
@ -645,7 +645,7 @@ yml_other_set()
elsif Value_2.class.to_s == 'Array' then
Value_2.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
Value_2.delete(x);
end;
@ -675,7 +675,7 @@ yml_other_set()
end
Value_3.each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
next
end;
@ -688,6 +688,54 @@ yml_other_set()
end;
end;
end;
#SUB-RULE
if ${10} == 1 then
if Value.has_key?('sub-rules') and not Value['sub-rules'].to_a.empty? then
if File::exist?('/etc/openclash/custom/openclash_custom_rules.list') then
Value_1 = YAML.load_file('/etc/openclash/custom/openclash_custom_rules.list');
if Value_1 != false then
if Value_1.class.to_s == 'Hash' then
if not Value_1['sub-rules'].to_a.empty? and Value_1['sub-rules'].class.to_s == 'Hash' then
Value['sub-rules'] = Value['sub-rules'].merge!(Value_1['sub-rules']);
end;
end;
end;
end;
if File::exist?('/etc/openclash/custom/openclash_custom_rules_2.list') then
Value_2 = YAML.load_file('/etc/openclash/custom/openclash_custom_rules_2.list');
if Value_2 != false then
if Value_2.class.to_s == 'Hash' then
if not Value_2['sub-rules'].to_a.empty? and Value_2['sub-rules'].class.to_s == 'Hash' then
Value['sub-rules'] = Value['sub-rules'].merge!(Value_2['sub-rules']);
end;
end;
end;
end;
else
if File::exist?('/etc/openclash/custom/openclash_custom_rules.list') then
Value_1 = YAML.load_file('/etc/openclash/custom/openclash_custom_rules.list');
if Value_1 != false then
if Value_1.class.to_s == 'Hash' then
if not Value_1['sub-rules'].to_a.empty? and Value_1['sub-rules'].class.to_s == 'Hash' then
Value['sub-rules'] = Value_1['sub-rules'];
end;
end;
end;
end;
if File::exist?('/etc/openclash/custom/openclash_custom_rules_2.list') then
Value_2 = YAML.load_file('/etc/openclash/custom/openclash_custom_rules_2.list');
if Value_2 != false then
if Value_2.class.to_s == 'Hash' then
if not Value_2['sub-rules'].to_a.empty? and Value_2['sub-rules'].class.to_s == 'Hash' then
Value['sub-rules'] = Value_2['sub-rules'];
end;
end;
end;
end;
end;
else
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【sub-rules】'
end;
end;
}.join;
rescue Exception => e
@ -795,6 +843,7 @@ yml_other_rules_get()
config_get "Speedtest" "$section" "Speedtest" ""
config_get "Telegram" "$section" "Telegram" ""
config_get "Crypto" "$section" "Crypto" "$Proxy"
config_get "Discord" "$section" "Discord" "$Proxy"
config_get "Microsoft" "$section" "Microsoft" ""
config_get "PayPal" "$section" "PayPal" ""
config_get "Domestic" "$section" "Domestic" ""
@ -802,7 +851,6 @@ yml_other_rules_get()
config_get "GoogleFCM" "$section" "GoogleFCM" "DIRECT"
config_get "Discovery" "$section" "Discovery" "$GlobalTV"
config_get "DAZN" "$section" "DAZN" "$GlobalTV"
config_get "Douyin" "$section" "Douyin" "$AsianTV"
}
if [ "$1" != "0" ]; then
@ -856,7 +904,7 @@ if [ "$1" != "0" ]; then
|| [ -z "$(grep -F "$Speedtest" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Telegram" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Crypto" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Douyin" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Discord" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Microsoft" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$PayPal" /tmp/Proxy_Group)" ]\
|| [ -z "$(grep -F "$Others" /tmp/Proxy_Group)" ]\
@ -909,12 +957,12 @@ if [ "$1" != "0" ]; then
.gsub(/,Netflix$/, ',$Netflix#d')
.gsub(/,Disney$/, ',$Disney#d')
.gsub(/,Spotify$/, ',$Spotify#d')
.gsub(/,Douyin$/, ',$Douyin#d')
.gsub(/,Steam$/, ',$Steam#d')
.gsub(/,AdBlock$/, ',$AdBlock#d')
.gsub(/,Speedtest$/, ',$Speedtest#d')
.gsub(/,Telegram$/, ',$Telegram#d')
.gsub(/,Crypto$/, ',$Crypto#d')
.gsub(/,Discord$/, ',$Discord#d')
.gsub(/,Microsoft$/, ',$Microsoft#d')
.to_s.gsub(/,PayPal$/, ',$PayPal#d')
.gsub(/,Domestic$/, ',$Domestic#d')
@ -938,12 +986,12 @@ if [ "$1" != "0" ]; then
.gsub!(/: \"Netflix\"/,': \"$Netflix#d\"')
.gsub!(/: \"Disney\"/,': \"$Disney#d\"')
.gsub!(/: \"Spotify\"/,': \"$Spotify#d\"')
.gsub!(/: \"Douyin\"/,': \"$Douyin#d\"')
.gsub!(/: \"Steam\"/,': \"$Steam#d\"')
.gsub!(/: \"AdBlock\"/,': \"$AdBlock#d\"')
.gsub!(/: \"Speedtest\"/,': \"$Speedtest#d\"')
.gsub!(/: \"Telegram\"/,': \"$Telegram#d\"')
.gsub!(/: \"Crypto\"/,': \"$Crypto#d\"')
.gsub!(/: \"Discord\"/,': \"$Discord#d\"')
.gsub!(/: \"Microsoft\"/,': \"$Microsoft#d\"')
.gsub!(/: \"PayPal\"/,': \"$PayPal#d\"')
.gsub!(/: \"Domestic\"/,': \"$Domestic#d\"')

View File

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

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -136,13 +136,13 @@ define Build/Compile
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libcronet
$(CP) \
$(PKG_BUILD_DIR)/src/components/grpc_support/include/bidirectional_stream_c.h \
$(PKG_BUILD_DIR)/src/components/cronet/native/generated/cronet.idl_c.h \
$(PKG_BUILD_DIR)/src/components/cronet/native/include/cronet_c.h \
$(PKG_BUILD_DIR)/src/components/cronet/native/include/cronet_export.h \
$(1)/usr/include/
$(1)/usr/include//libcronet/
endef
define Package/naiveproxy/install