OpenClash: bump to 0.40.13-beta
This commit is contained in:
parent
48f91ca7e1
commit
9f8038c0b0
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-openclash
|
||||
PKG_VERSION:=0.40.10
|
||||
PKG_VERSION:=0.40.13
|
||||
PKG_RELEASE:=beta
|
||||
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
|
||||
|
||||
|
||||
@ -134,9 +134,13 @@ o:value("silent", translate("Silent Mode"))
|
||||
o.default = "silent"
|
||||
|
||||
o = s:taboption("settings", ListValue, "intranet_allowed", translate("Only intranet allowed"))
|
||||
o.description = translate("When enabled, the control panel and the connection broker port will not be accessible from the public network")
|
||||
o.description = translate("When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network, TUN Not Support Yet")
|
||||
o:value("0", translate("Disable"))
|
||||
o:value("1", translate("Enable"))
|
||||
o:depends("en_mode", "redir-host")
|
||||
o:depends("en_mode", "fake-ip")
|
||||
o:depends("en_mode", "redir-host-vpn")
|
||||
o:depends("en_mode", "fake-ip-vpn")
|
||||
o.default = 0
|
||||
|
||||
o = s:taboption("settings", Value, "proxy_port")
|
||||
|
||||
@ -188,8 +188,8 @@ msgstr "选择内核日志的默认输出模式"
|
||||
msgid "Only intranet allowed"
|
||||
msgstr "仅允许内网"
|
||||
|
||||
msgid "When enabled, the control panel and the connection broker port will not be accessible from the public network"
|
||||
msgstr "启用后将禁止从公网访问控制面板和连接代理端口"
|
||||
msgid "When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network, TUN Not Support Yet"
|
||||
msgstr "启用后将禁止从公网访问控制面板和连接代理端口,TUN模式下启用此项不会生效"
|
||||
|
||||
msgid "Redirect Local DNS Setting"
|
||||
msgstr "*本地DNS劫持"
|
||||
|
||||
@ -77,7 +77,7 @@ change_dns() {
|
||||
uci commit dhcp
|
||||
uci commit openclash
|
||||
|
||||
/usr/share/openclash/openclash_custom_domain_dns.sh
|
||||
/usr/share/openclash/openclash_custom_domain_dns.sh >/dev/null 2>&1
|
||||
}
|
||||
|
||||
revert_dns() {
|
||||
@ -628,7 +628,7 @@ yml_rule_group_get()
|
||||
return
|
||||
fi
|
||||
|
||||
/usr/share/openclash/yml_groups_set.sh "$group"
|
||||
/usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 "$group"
|
||||
}
|
||||
|
||||
yml_game_custom()
|
||||
@ -1024,7 +1024,7 @@ do_run_file()
|
||||
core_start_log="检测到配置了【Tun】内核专属功能,调用【Tun】内核启动..."
|
||||
fi
|
||||
|
||||
if [ -n "$(grep "^ \{0,\}rule-providers:" "$CONFIG_FILE" 2>/dev/null)" ] && [ -n "$(grep "^ \{0,\}behavior" "$CONFIG_FILE" 2>/dev/null |grep -v "^ \{0,\}#")" ]; then
|
||||
if [ -n "$(grep "^ \{0,\}- RULE-SET," "$CONFIG_FILE" 2>/dev/null)" ]; then
|
||||
ln -s "$tun_core_path" /etc/openclash/clash 2>/dev/null
|
||||
core_type="Tun"
|
||||
core_start_log="检测到配置了【Tun】内核专属功能,调用【Tun】内核启动..."
|
||||
@ -1088,16 +1088,23 @@ do_run_file()
|
||||
start_run_core()
|
||||
{
|
||||
echo "$core_start_log" >$START_LOG
|
||||
sleep 1
|
||||
sleep 2
|
||||
ulimit -SHn 65535 2>/dev/null
|
||||
ulimit -v unlimited 2>/dev/null
|
||||
modprobe tun >/dev/null 2>&1
|
||||
config_reload=$(uci get openclash.config.config_reload 2>/dev/null)
|
||||
if [ -n "$(pidof clash)" ] && [ "$core_type" != "Tun" ] && [ "$config_reload" != "0" ]; then
|
||||
curl -s --connect-timeout 5 -m 5 -H 'Content-Type: application/json' -H "Authorization: Bearer ${da_password}" -XPUT http://"$lan_ip":"$cn_port"/configs -d "{\"path\": \"$CONFIG_FILE\"}" 2>/dev/null
|
||||
else
|
||||
kill_clash
|
||||
#防止赋权失败
|
||||
chmod o+w /etc/openclash/proxy_provider/* 2>/dev/null
|
||||
chmod o+w /etc/openclash/rule_provider/* 2>/dev/null
|
||||
chmod o+w /tmp/openclash.log 2>/dev/null
|
||||
chown nobody:nogroup /etc/openclash/core/* 2>/dev/null
|
||||
#使用nobody启动内核方便代理路由自身流量
|
||||
capabilties="cap_sys_resource,cap_dac_override,cap_net_raw,cap_net_bind_service,cap_net_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
|
||||
capsh --caps="${capabilties}+eip" -- -c "capsh --user=nobody --addamb='${capabilties}' -- -c 'nohup $CLASH -d $CLASH_CONFIG -f \"$CONFIG_FILE\" >> $LOG_FILE 2>&1 &'"
|
||||
fi
|
||||
uci set openclash.config.config_reload=1 2>/dev/null
|
||||
uci commit openclash
|
||||
@ -1241,6 +1248,55 @@ ac_add()
|
||||
ipset add "$2" "$1" 2>/dev/null
|
||||
}
|
||||
|
||||
firewall_rule_exclude()
|
||||
{
|
||||
local section="$1"
|
||||
local name src src_port dest dest_port proto target enabled
|
||||
|
||||
config_get "name" "$section" "name" ""
|
||||
config_get "src" "$section" "src" ""
|
||||
config_get "src_port" "$section" "src_port" ""
|
||||
config_get "dest" "$section" "dest" ""
|
||||
config_get "dest_port" "$section" "dest_port" ""
|
||||
config_get "proto" "$section" "proto" ""
|
||||
config_get "target" "$section" "target" ""
|
||||
config_get "enabled" "$section" "enabled" ""
|
||||
|
||||
if [ a"$target" != aACCEPT ] || [ a"$enabled" == a0 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local e_udp=false
|
||||
local e_tcp=false
|
||||
for p in $proto; do
|
||||
if [ $p == tcp ]; then e_tcp=true; fi
|
||||
if [ $p == udp ]; then e_udp=true; fi
|
||||
done
|
||||
|
||||
if ! $e_udp && ! $e_tcp ; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 3 ]; then
|
||||
if $e_tcp ; then
|
||||
iptables -t nat -I openclash_output -p tcp --sport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
fi
|
||||
if $e_udp ; then
|
||||
iptables -t mangle -I openclash_output -p udp --sport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
iptables -t mangle -I openclash -p udp --dport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
fi
|
||||
elif [ "$en_mode_tun" -ne 3 ]; then
|
||||
if $e_tcp ; then
|
||||
iptables -t mangle -I openclash_output -p tcp --sport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
iptables -t mangle -I openclash -p tcp --dport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
fi
|
||||
if $e_udp ; then
|
||||
iptables -t mangle -I openclash_output -p udp --sport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
iptables -t mangle -I openclash -p udp --dport "$dest_port" -j RETURN >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
firewall_redirect_exclude()
|
||||
{
|
||||
local section="$1"
|
||||
@ -1293,13 +1349,13 @@ if [ "$(uci get firewall.@defaults[0].forward)" != "ACCEPT" ]; then
|
||||
uci commit firewall >/dev/null 2>&1
|
||||
/etc/init.d/firewall reload >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
||||
mkdir -p /var/etc
|
||||
cat > "/var/etc/openclash.include" <<-EOF
|
||||
/etc/init.d/openclash reload >/dev/null 2>&1
|
||||
EOF
|
||||
|
||||
if [ "$china_ip_route" -eq 1 ]; then
|
||||
if [ "$china_ip_route" = "1" ]; then
|
||||
if [ ! -f "/usr/share/openclash/res/china_ip_route.ipset" ]; then
|
||||
cp /etc/openclash/rule_provider/ChinaIP.yaml /tmp/china_ip_route.list 2>/dev/null
|
||||
sed -i "s/'//g" /tmp/china_ip_route.list 2>/dev/null
|
||||
@ -1412,7 +1468,10 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 3 ]; then
|
||||
iptables -t nat -F openclash_output
|
||||
iptables -t nat -A openclash_output -m set --match-set localnetwork dst -j RETURN
|
||||
#iptables -t nat -A openclash_output -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
|
||||
iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -j REDIRECT --to-ports "$proxy_port"
|
||||
iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -m multiport --dport 80,443 -j REDIRECT --to-ports "$proxy_port"
|
||||
if [ "$en_mode" = "fake-ip" ]; then
|
||||
iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
|
||||
fi
|
||||
iptables -t nat -I OUTPUT -j openclash_output
|
||||
#fi
|
||||
|
||||
@ -1461,15 +1520,24 @@ if [ -n "$en_mode_tun" ]; then
|
||||
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
|
||||
|
||||
#设置防火墙
|
||||
iptables -t mangle -N openclash_output
|
||||
iptables -t mangle -F openclash_output
|
||||
iptables -t mangle -A openclash_output -m set --match-set localnetwork dst -j RETURN
|
||||
if [ "$en_mode_tun" -ne 3 ]; then
|
||||
iptables -t mangle -A openclash_output -m owner ! --uid-owner 65534 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
else
|
||||
iptables -t mangle -A openclash_output -m owner ! --uid-owner 65534 -p udp -j MARK --set-mark "$PROXY_FWMARK"
|
||||
if [ "$en_mode" = "fake-ip" ]; then
|
||||
iptables -t mangle -N openclash_output
|
||||
iptables -t mangle -F openclash_output
|
||||
iptables -t mangle -A openclash_output -m set --match-set localnetwork dst -j RETURN
|
||||
if [ "$en_mode_tun" -ne 3 ]; then
|
||||
iptables -t mangle -A openclash_output -m owner ! --uid-owner 65534 -p tcp -m multiport --dport 80,443 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
iptables -t mangle -A openclash_output -m owner ! --uid-owner 65534 -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
else
|
||||
iptables -t mangle -A openclash_output -m owner ! --uid-owner 65534 -p udp -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
fi
|
||||
iptables -t mangle -I OUTPUT -j openclash_output
|
||||
elif [ "$en_mode" = "redir-host" ] && [ "$en_mode_tun" -ne 3 ]; then
|
||||
iptables -t mangle -N openclash_output
|
||||
iptables -t mangle -F openclash_output
|
||||
iptables -t mangle -A openclash_output -m set --match-set localnetwork dst -j RETURN
|
||||
iptables -t mangle -A openclash_output -m owner ! --uid-owner 65534 -p tcp -m multiport --dport 80,443 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
iptables -t mangle -I OUTPUT -j openclash_output
|
||||
fi
|
||||
iptables -t mangle -I OUTPUT -j openclash_output
|
||||
|
||||
iptables -t mangle -N openclash
|
||||
iptables -t mangle -F openclash
|
||||
@ -1508,6 +1576,7 @@ fi
|
||||
#端口转发
|
||||
config_load "firewall"
|
||||
config_foreach firewall_redirect_exclude "redirect"
|
||||
config_foreach firewall_rule_exclude "rule"
|
||||
}
|
||||
|
||||
revert_firewall()
|
||||
@ -1650,28 +1719,29 @@ start()
|
||||
config_foreach yml_auth_get "authentication"
|
||||
yml_auth_custom "$CHANGE_FILE"
|
||||
yml_dns_custom "$enable_custom_dns" "$DNS_FILE" "$FALLBACK_FILTER_FILE"
|
||||
/usr/share/openclash/yml_change.sh >/dev/null 2>&1 "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" "$stack_type" "$dns_port" &
|
||||
/usr/share/openclash/yml_change.sh >/dev/null 2>&1 "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" "$stack_type" "$dns_port" "$core_type" &
|
||||
/usr/share/openclash/yml_rules_change.sh >/dev/null 2>&1 "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$RULE_FILE" "$set_rule_file" "$en_mode" "$enable_rule_proxy" "$BACKUP_FILE" "$RULE_PROVIDER_FILE" &
|
||||
wait
|
||||
|
||||
yml_provider_path "$PROXY_PROVIDER_FILE" "proxy_provider"
|
||||
yml_provider_path "$RULE_PROVIDER_FILE" "rule_provider"
|
||||
yml_custom_rule_provider
|
||||
yml_game_custom
|
||||
|
||||
|
||||
echo "第四步: 合并配置文件修改..." >$START_LOG
|
||||
yml_merge
|
||||
|
||||
echo "第五步: 启动主程序..." >$START_LOG
|
||||
sleep 1
|
||||
start_run_core
|
||||
|
||||
|
||||
echo "第六步: 检查内核启动状态..." >$START_LOG
|
||||
check_core_status
|
||||
|
||||
#检测proxy_provider配置文件状态
|
||||
echo "第六步: 等待主程序下载外部文件..." >$START_LOG
|
||||
echo "第七步: 等待主程序下载外部文件..." >$START_LOG
|
||||
yml_provider_check "$PROXY_PROVIDER_FILE" "proxy_provider"
|
||||
yml_provider_check "$RULE_PROVIDER_FILE" "rule_provider"
|
||||
|
||||
echo "第七步: 检查内核启动状态..." >$START_LOG
|
||||
check_core_status
|
||||
|
||||
try_restore_start
|
||||
|
||||
echo "第八步: 设置控制面板..." >$START_LOG
|
||||
|
||||
@ -25,8 +25,11 @@
|
||||
##- SRC-IP-CIDR,192.168.1.208/28,DIRECT
|
||||
##- SRC-IP-CIDR,192.168.1.224/27,DIRECT
|
||||
|
||||
##此时IP为192.168.1.1和192.168.1.201的客户端流量走代理(策略),其余客户端不走代理
|
||||
##因为Fake-IP模式下,IP地址为192.168.1.1的路由器自身流量可走代理(策略),所以需要排除
|
||||
|
||||
##仅设置路由器自身直连:
|
||||
##- SRC-IP-CIDR,192.168.1.1/32,DIRECT
|
||||
##- SRC-IP-CIDR,198.18.0.1/32,DIRECT
|
||||
|
||||
##此时IP为192.168.1.1和192.168.1.201的客户端流量走代理(策略),其余客户端不走代理
|
||||
##因为Fake-IP模式下,IP地址为192.168.1.1、198.18.0.1的路由器自身流量可走代理(策略),所以需要排除
|
||||
##在线IP段转CIDR地址:http://ip2cidr.com
|
||||
@ -103,6 +103,12 @@ config_su_check()
|
||||
{
|
||||
echo "配置文件下载成功,检查是否有更新..." >$START_LOG
|
||||
sed -i 's/!<str> //g' "$CFG_FILE" >/dev/null 2>&1
|
||||
#关键字还原
|
||||
if [ -z "$(grep "^Proxy:#d" "$CFG_FILE")" ]; then
|
||||
sed -i "s/^Proxy:/proxies:/g" "$CFG_FILE" 2>/dev/null
|
||||
else
|
||||
sed -i "s/^Proxy:#d/proxies:/g" "$CFG_FILE" 2>/dev/null
|
||||
fi
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
cmp -s "$BACKPACK_FILE" "$CFG_FILE"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
|
||||
@ -96,17 +96,15 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
rm -rf /tmp/clash_tun.gz >/dev/null 2>&1
|
||||
rm -rf "$tun_core_path" >/dev/null 2>&1
|
||||
chmod 4755 /tmp/clash_tun >/dev/null 2>&1
|
||||
chown root:root /tmp/clash_tun >/dev/null 2>&1
|
||||
}
|
||||
;;
|
||||
"Game")
|
||||
[ -s "/tmp/clash_game.tar.gz" ] && {
|
||||
tar zxvf /tmp/clash_game.tar.gz -C /tmp >/dev/null 2>&1
|
||||
mv /tmp/clash /tmp/clash_game >/dev/null 2>&1
|
||||
rm -rf /tmp/clash_game.tar.gz >/dev/null 2>&1
|
||||
rm -rf /tmp/clash_game.tar.gz >/dev/null 2>&1
|
||||
rm -rf "$game_core_path" >/dev/null 2>&1
|
||||
chmod 4755 /tmp/clash_game >/dev/null 2>&1
|
||||
chown root:root /tmp/clash_game >/dev/null 2>&1
|
||||
}
|
||||
;;
|
||||
*)
|
||||
@ -119,7 +117,6 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
fi
|
||||
rm -rf /tmp/clash.tar.gz >/dev/null 2>&1
|
||||
chmod 4755 "$dev_core_path" >/dev/null 2>&1
|
||||
chown root:root "$dev_core_path" >/dev/null 2>&1
|
||||
}
|
||||
esac
|
||||
|
||||
|
||||
@ -113,6 +113,9 @@ EOF
|
||||
if pidof clash >/dev/null; then
|
||||
cat >> "$DEBUG_LOG" <<-EOF
|
||||
运行状态: 运行中
|
||||
进程pid: $(pidof clash)
|
||||
运行权限: `getpcaps $(pidof clash)`
|
||||
运行用户: $(ps |grep "/etc/openclash/clash" |grep -v grep |awk '{print $2}' 2>/dev/null)
|
||||
EOF
|
||||
else
|
||||
cat >> "$DEBUG_LOG" <<-EOF
|
||||
@ -272,16 +275,21 @@ if [ -n "$(grep OpenClash-General-Settings "$CONFIG_FILE")" ]; then
|
||||
else
|
||||
/usr/share/openclash/yml_field_name_ch.sh "$CONFIG_FILE" 2>/dev/null
|
||||
#取出general部分
|
||||
/usr/share/openclash/yml_field_cut.sh "general" "$CHANGE_FILE" "$CONFIG_FILE"
|
||||
/usr/share/openclash/yml_field_cut.sh "general" "$CHANGE_FILE" "$CONFIG_FILE" 2>/dev/null
|
||||
|
||||
#取出dns部分
|
||||
nameserver_len=$(sed -n '/^ \{0,\}nameserver:/=' "$CONFIG_FILE" 2>/dev/null)
|
||||
if [ -n "$nameserver_len" ]; then
|
||||
/usr/share/openclash/yml_field_cut.sh "$nameserver_len" "$DNS_FILE" "$CONFIG_FILE"
|
||||
/usr/share/openclash/yml_field_cut.sh "$nameserver_len" "$DNS_FILE" "$CONFIG_FILE" 2>/dev/null
|
||||
else
|
||||
fallback_len=$(sed -n '/^ \{0,\}fallback:/=' "$CONFIG_FILE" 2>/dev/null)
|
||||
if [ -n "$fallback_len" ]; then
|
||||
/usr/share/openclash/yml_field_cut.sh "$fallback_len" "$DNS_FILE" "$CONFIG_FILE" 2>/dev/null
|
||||
fi
|
||||
fi 2>/dev/null
|
||||
|
||||
rm -rf /tmp/yaml_general 2>/dev/null
|
||||
cat "$CHANGE_FILE" "$DNS_FILE" >> "$DEBUG_LOG"
|
||||
cat "$CHANGE_FILE" "$DNS_FILE" >> "$DEBUG_LOG" 2>/dev/null
|
||||
fi
|
||||
sed -i '/^ \{0,\}secret:/d' "$DEBUG_LOG" 2>/dev/null
|
||||
|
||||
@ -293,16 +301,14 @@ cat >> "$DEBUG_LOG" <<-EOF
|
||||
#NAT chain
|
||||
|
||||
EOF
|
||||
iptables -t nat -nL PREROUTING --line-number >> "$DEBUG_LOG"
|
||||
iptables -t nat -nL OUTPUT --line-number >> "$DEBUG_LOG"
|
||||
iptables-save -t nat >> "$DEBUG_LOG" 2>/dev/null
|
||||
|
||||
cat >> "$DEBUG_LOG" <<-EOF
|
||||
|
||||
#Mangle chain
|
||||
|
||||
EOF
|
||||
iptables -t mangle -nL PREROUTING --line-number >> "$DEBUG_LOG"
|
||||
iptables -t mangle -nL OUTPUT --line-number >> "$DEBUG_LOG"
|
||||
iptables-save -t mangle >> "$DEBUG_LOG" 2>/dev/null
|
||||
|
||||
cat >> "$DEBUG_LOG" <<-EOF
|
||||
|
||||
@ -363,14 +369,9 @@ cat >> "$DEBUG_LOG" <<-EOF
|
||||
EOF
|
||||
VERSION_URL="https://raw.githubusercontent.com/vernesong/OpenClash/master/version"
|
||||
if pidof clash >/dev/null; then
|
||||
HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null)
|
||||
PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)
|
||||
if [ -s "/tmp/openclash.auth" ]; then
|
||||
PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null)
|
||||
fi
|
||||
curl -IL -m 3 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" "$VERSION_URL" >> "$DEBUG_LOG"
|
||||
curl -IL -m 3 --retry 2 "$VERSION_URL" >> "$DEBUG_LOG" 2>/dev/null
|
||||
else
|
||||
curl -IL -m 3 --retry 2 "$VERSION_URL" >> "$DEBUG_LOG"
|
||||
curl -IL -m 3 --retry 2 "$VERSION_URL" >> "$DEBUG_LOG" 2>/dev/null
|
||||
fi
|
||||
|
||||
cat >> "$DEBUG_LOG" <<-EOF
|
||||
|
||||
@ -17,7 +17,7 @@ if [ -s "$CUSTOM_FILE" ]; then
|
||||
else
|
||||
continue
|
||||
fi
|
||||
done
|
||||
done 2>/dev/null
|
||||
if [ -s "$FAKE_FILTER_FILE" ]; then
|
||||
sed -i '1i\##Custom fake-ip-filter##' "$FAKE_FILTER_FILE"
|
||||
echo "##Custom fake-ip-filter END##" >> "$FAKE_FILTER_FILE"
|
||||
@ -31,7 +31,7 @@ cfg_server_address()
|
||||
local section="$1"
|
||||
config_get "server" "$section" "server" ""
|
||||
|
||||
IFIP=$(echo $server |grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$")
|
||||
IFIP=$(echo $server |grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" 2>/dev/null)
|
||||
if [ -z "$IFIP" ] && [ ! -z "$server" ] && [ -z "$(grep "/$server/" "$SER_FAKE_FILTER_FILE" 2>/dev/null)" ]; then
|
||||
echo "server=/$server/$custom_domain_dns_server" >> "$SER_FAKE_FILTER_FILE"
|
||||
else
|
||||
|
||||
@ -11,7 +11,7 @@ SECRET=$(uci get openclash.config.dashboard_password 2>/dev/null)
|
||||
LAN_IP=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)
|
||||
PORT=$(uci get openclash.config.cn_port 2>/dev/null)
|
||||
|
||||
if pidof clash >/dev/null; then
|
||||
if [ -n "$(pidof clash)" ] && [ -f "$CONFIG_FILE" ]; then
|
||||
curl -m 5 --retry 2 -w %{http_code}"\n" -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X GET http://"$LAN_IP":"$PORT"/proxies > "$CURL_CACHE" 2>/dev/null
|
||||
if [ "$(sed -n '$p' "$CURL_CACHE" 2>/dev/null)" = "200" ]; then
|
||||
mkdir -p /etc/openclash/history 2>/dev/null
|
||||
|
||||
@ -24,14 +24,23 @@ OP_CV=$(sed -n 1p /usr/share/openclash/res/openclash_version 2>/dev/null |awk -F
|
||||
OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}' |awk -F '.' '{print $2$3}' 2>/dev/null)
|
||||
|
||||
if [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ] && [ -f "$LAST_OPVER" ]; then
|
||||
echo "开始下载 OpenClash-$LAST_VER ..." >$START_LOG
|
||||
echo "开始下载 OpenClash-v$LAST_VER ..." >$START_LOG
|
||||
if pidof clash >/dev/null; then
|
||||
curl -sL -m 30 --retry 5 https://github.com/vernesong/OpenClash/releases/download/v"$LAST_VER"/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk >/dev/null 2>&1
|
||||
else
|
||||
curl -sL -m 30 --retry 5 https://cdn.jsdelivr.net/gh/vernesong/OpenClash@master/luci-app-openclash_"$LAST_VER"_all.ipk -o /tmp/openclash.ipk >/dev/null 2>&1
|
||||
fi
|
||||
if [ "$?" -eq "0" ] && [ -s "/tmp/openclash.ipk" ]; then
|
||||
echo "OpenClash-$LAST_VER 下载成功,开始更新,更新过程请不要刷新页面和进行其他操作..." >$START_LOG
|
||||
echo "OpenClash-$LAST_VER 下载成功,开始进行更新前测试 ..." >$START_LOG
|
||||
opkg install /tmp/openclash.ipk --noaction >>$LOG_FILE
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "OpenClash-v$LAST_VER 更新前测试失败,文件保存在/tmp/openclash.ipk,请尝试手动更新!" >$START_LOG
|
||||
echo "${LOGTIME} OpenClash-v$LAST_VER Update Test Fail" >>$LOG_FILE
|
||||
sleep 10
|
||||
echo "" >$START_LOG
|
||||
exit 0
|
||||
fi
|
||||
echo "OpenClash-$LAST_VER 更新前测试通过,准备开始更新,更新过程请不要刷新页面和进行其他操作 ..." >$START_LOG
|
||||
cat > /tmp/openclash_update.sh <<"EOF"
|
||||
#!/bin/sh
|
||||
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
@ -40,7 +49,7 @@ LOG_FILE="/tmp/openclash.log"
|
||||
echo "正在卸载旧版本,更新过程请不要刷新页面和进行其他操作 ..." >$START_LOG
|
||||
uci set openclash.config.enable=0
|
||||
uci commit openclash
|
||||
opkg remove luci-app-openclash
|
||||
opkg remove --force-depends --force-remove luci-app-openclash
|
||||
echo "正在安装新版本,更新过程请不要刷新页面和进行其他操作 ..." >$START_LOG
|
||||
opkg install /tmp/openclash.ipk
|
||||
if [ "$?" -eq "0" ]; then
|
||||
@ -63,9 +72,9 @@ EOF
|
||||
wait
|
||||
rm -rf /tmp/openclash_update.sh
|
||||
else
|
||||
echo "OpenClash-$LAST_VER 下载失败,请检查网络或稍后再试!" >$START_LOG
|
||||
echo "OpenClash-v$LAST_VER 下载失败,请检查网络或稍后再试!" >$START_LOG
|
||||
rm -rf /tmp/openclash.ipk >/dev/null 2>&1
|
||||
echo "${LOGTIME} OpenClash Update Error" >>$LOG_FILE
|
||||
echo "${LOGTIME} OpenClash-v$LAST_VER Update Error" >>$LOG_FILE
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
if [ "$(uci get openclash.config.config_reload 2>/dev/null)" -eq 0 ]; then
|
||||
|
||||
@ -39,12 +39,16 @@ if [ "$enable" -eq 1 ]; then
|
||||
sleep 1
|
||||
fi 2>/dev/null
|
||||
if ! pidof clash >/dev/null; then
|
||||
CRASH_NUM=$(expr "$CRASH_NUM" + 1)
|
||||
if [ "$CRASH_NUM" -le 3 ]; then
|
||||
CRASH_NUM=$(expr "$CRASH_NUM" + 1)
|
||||
if [ "$CRASH_NUM" -le 3 ]; then
|
||||
CONFIG_FILE=$(uci get openclash.config.config_path 2>/dev/null)
|
||||
echo "${LOGTIME} Watchdog: Clash Core Problem, Restart." >> $LOG_FILE
|
||||
capabilties="cap_sys_resource,cap_dac_override,cap_net_raw,cap_net_bind_service,cap_net_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
|
||||
chmod o+w /etc/openclash/proxy_provider/* 2>/dev/null
|
||||
chmod o+w /etc/openclash/rule_provider/* 2>/dev/null
|
||||
chmod o+w /tmp/openclash.log 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"
|
||||
capsh --caps="${capabilties}+eip" -- -c "capsh --user=nobody --addamb='${capabilties}' -- -c 'nohup $CLASH -d $CLASH_CONFIG -f \"$CONFIG_FILE\" >> $LOG_FILE 2>&1 &'"
|
||||
sleep 3
|
||||
if [ "$core_type" = "Tun" ]; then
|
||||
ip route replace default dev utun table "$PROXY_ROUTE_TABLE" 2>/dev/null
|
||||
|
||||
@ -67,7 +67,7 @@ authentication:
|
||||
- "user2:pass2"
|
||||
|
||||
# Outbound interface name
|
||||
interface-name: en0
|
||||
interface-name: br-lan
|
||||
|
||||
# tun option
|
||||
# 此项将被接管
|
||||
|
||||
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,14 +1,13 @@
|
||||
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}
|
||||
/*! modern-normalize v0.7.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}legend{padding:0}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}
|
||||
@font-face{font-family:Roboto Mono;font-style:normal;font-display:swap;font-weight:400;src:local("Roboto Mono Regular "),local("Roboto Mono-Regular"),url(roboto-mono-latin-400.woff2) format("woff2")}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:400;src:local("Open Sans Regular "),local("Open Sans-Regular"),url(open-sans-latin-400.woff2) format("woff2")}@font-face{font-family:Open Sans;font-style:normal;font-display:swap;font-weight:700;src:local("Open Sans Bold "),local("Open Sans-Bold"),url(open-sans-latin-700.woff2) format("woff2")}.border-bottom,.border-left,.border-top,.relative{position:relative}.border-top:before{top:0}.border-bottom:after,.border-top:before{position:absolute;content:"";height:1px;width:100%;transform:scaleY(.5) translateZ(0);left:0;right:0;background:#555}.border-bottom:after{bottom:0}.border-left:before{position:absolute;content:"";height:100%;width:1px;transform:scaleX(.5) translateZ(0);top:0;bottom:0;background:#555;left:0}*,:after,:before{box-sizing:border-box}:root{--font-mono:"Roboto Mono",Menlo,monospace;--font-normal:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,"PingFang SC","Microsoft YaHei","微软雅黑",Arial,sans-serif;--color-focus-blue:#1a73e8}body{font-family:Open Sans,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,PingFang SC,Microsoft YaHei,微软雅黑;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;margin:0;padding:0}body,body.dark{--color-background:#202020;--color-text:#ddd;--color-text-secondary:#ccc;--color-text-highlight:#fff;--color-bg-sidebar:#2d2d30;--color-sb-active-row-bg:#494b4e;--color-input-bg:#2d2d30;--color-input-border:#3f3f3f;--color-toggle-bg:#353535;--color-toggle-selected:#181818;--color-icon:#c7c7c7;--color-separator:#333;--color-btn-bg:#232323;--color-btn-fg:#bebebe;--color-bg-proxy:#303030;--color-row-odd:#282828;--bg-modal:#1f1f20;--bg-near-transparent:hsla(0,0%,100%,0.1);--select-border-color:#040404;--select-bg-hover:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23fff'/%3E%3C/svg%3E")}body.light{--color-background:#fbfbfb;--color-text:#222;--color-text-secondary:#646464;--color-text-highlight:#040404;--color-bg-sidebar:#e7e7e7;--color-sb-active-row-bg:#d0d0d0;--color-input-bg:#fff;--color-input-border:silver;--color-toggle-bg:#fff;--color-toggle-selected:#d7d7d7;--color-icon:#5b5b5b;--color-separator:#ccc;--color-btn-bg:#f4f4f4;--color-btn-fg:#101010;--color-bg-proxy:#e7e7e7;--color-row-odd:#f5f5f5;--bg-modal:#fbfbfb;--bg-near-transparent:rgba(0,0,0,0.1);--select-border-color:#999;--select-bg-hover:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23222'/%3E%3C/svg%3E")}.flexCenter{display:flex;align-items:center;justify-content:center}.fabgrp{position:fixed;z-index:3;right:20px;bottom:20px}
|
||||
._24ddJm1Q5s{height:76px;display:flex;align-items:center}.B4QNkMu-0t{padding:0 15px;font-size:1.7em;text-align:left;margin:0}@media screen and (min-width:30em){.B4QNkMu-0t{padding:0 40px;font-size:2em}}
|
||||
.cHbZy_rAHf{padding:6px 15px}@media screen and (min-width:30em){.cHbZy_rAHf{padding:10px 40px}}._2SNe_x81Ib{font-family:var(--font-mono)}.LUI6m76ply{color:var(--color-text-secondary);display:inline-flex}.LUI6m76ply:hover{color:var(--color-text-highlight)}
|
||||
._1MP9tbO2C9{margin:0;padding:0;list-style:none;line-height:1.8;--width-max-content:230px}._39O4-s-qNw,._1MP9tbO2C9{position:relative}._39O4-s-qNw{margin:5px 0;padding:10px 0;border-radius:10px;display:grid;place-content:center;grid-template-columns:40px 1fr 40px;grid-template-rows:30px;grid-template-areas:"close url .";-webkit-column-gap:10px;column-gap:10px}._39O4-s-qNw:hover{background-color:var(--bg-near-transparent)}._3U13UgV7Z1{opacity:0;grid-area:close;place-self:center}._3U13UgV7Z1:focus,.ipx6os2H89:focus,._39O4-s-qNw:hover ._3U13UgV7Z1,._39O4-s-qNw:hover .ipx6os2H89{opacity:1}._3GP8CDySTd{grid-template-rows:repeat(2,30px);grid-template-areas:"close url ." "close secret eye"}.PK8GjRW5ZI{grid-area:url}._2-iwpHoCB6{grid-area:secret}.ipx6os2H89{grid-area:eye;opacity:0;place-self:center;cursor:pointer}._2-iwpHoCB6,.PK8GjRW5ZI{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.S1-PNvCcRP{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid transparent;background-color:initial;color:inherit;display:flex;align-items:center;padding:5px;border-radius:100px}.S1-PNvCcRP:focus{border-color:var(--color-focus-blue)}.S1-PNvCcRP:hover:enabled{background-color:var(--color-focus-blue)}.S1-PNvCcRP:active:enabled{transform:scale(.97)}.S1-PNvCcRP:disabled{color:var(--color-text-secondary)}.PK8GjRW5ZI{cursor:pointer}.PK8GjRW5ZI:hover{color:var(--color-text-highlight)}
|
||||
._2-70itbuF1:focus{outline:none}.JKE-0c5hxF{display:flex;justify-content:center;align-items:center}.JKE-0c5hxF .o2VhY_cs6Z{color:#2d2d30;opacity:.4;transition:opacity .4s}.JKE-0c5hxF .o2VhY_cs6Z:hover{opacity:.7}._3QDGxJ_pWs{padding:15px 0 0}.tTZzzcEsTA{display:flex}.tTZzzcEsTA div{flex:1 1 auto}.tTZzzcEsTA div:nth-child(2){flex-grow:0;flex-basis:120px;margin-left:10px}._2cCgtjpQZP{height:20px;font-size:.8em;color:#ff8b8b}._3OT00Mqmrw{padding:5px 0 10px;display:flex;justify-content:flex-end;align-items:center}
|
||||
._2-70itbuF1:focus{outline:none}.JKE-0c5hxF{display:flex;justify-content:center;align-items:center}.JKE-0c5hxF .o2VhY_cs6Z{color:#2d2d30;opacity:.4;transition:opacity .4s}.JKE-0c5hxF .o2VhY_cs6Z:hover{opacity:.7}._3QDGxJ_pWs{padding:30px 0 10px}.tTZzzcEsTA{display:flex}.tTZzzcEsTA div{flex:1 1 auto}.tTZzzcEsTA div:nth-child(2){flex-grow:0;flex-basis:120px;margin-left:10px}._3OT00Mqmrw{padding:30px 0 10px;display:flex;justify-content:flex-end;align-items:center}
|
||||
._796AqwOFs_{-webkit-appearance:none;outline:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px}._796AqwOFs_:focus{border-color:var(--color-focus-blue)}._796AqwOFs_:hover{background:#387cec;border:1px solid #387cec;color:#fff}._796AqwOFs_:active{transform:scale(.97)}._796AqwOFs_{font-size:.85em;padding:4px 7px}@media screen and (min-width:30em){._796AqwOFs_{font-size:1em;padding:6px 12px}}._796AqwOFs_._1bLZvI40oA{border-color:transparent;background:none}._796AqwOFs_._1bLZvI40oA:focus{border-color:var(--color-focus-blue)}._796AqwOFs_._1bLZvI40oA:hover{color:#fff;background:#387cec;border:1px solid #387cec}._796AqwOFs_:disabled{opacity:.5}._1SrCTG7yDt{margin-right:5px;display:inline-flex;align-items:center;justify-content:center}._39VuJRXAmL{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:inline-flex}
|
||||
h2.Q-CsP5Y3FT{margin:0;font-size:1.3em}@media screen and (min-width:30em){h2.Q-CsP5Y3FT{font-size:1.5em}}h2.Q-CsP5Y3FT span:nth-child(2){font-size:12px;color:#777;font-weight:400;margin:0 .3em}body.light{--loading-dot-1-1:rgba(0,0,0,0.1);--loading-dot-1-2:rgba(0,0,0,0.5);--loading-dot-1-3:rgba(0,0,0,0.3);--loading-dot-2-1:rgba(0,0,0,0.3);--loading-dot-2-2:rgba(0,0,0,0.1);--loading-dot-2-3:rgba(0,0,0,0.5);--loading-dot-3-1:rgba(0,0,0,0.5);--loading-dot-3-2:rgba(0,0,0,0.3);--loading-dot-3-3:rgba(0,0,0,0.1)}body.dark{--loading-dot-1-1:hsla(0,0%,100%,0.5);--loading-dot-1-2:hsla(0,0%,100%,0.1);--loading-dot-1-3:hsla(0,0%,100%,0.3);--loading-dot-2-1:hsla(0,0%,100%,0.3);--loading-dot-2-2:hsla(0,0%,100%,0.5);--loading-dot-2-3:hsla(0,0%,100%,0.1);--loading-dot-3-1:hsla(0,0%,100%,0.1);--loading-dot-3-2:hsla(0,0%,100%,0.3);--loading-dot-3-3:hsla(0,0%,100%,0.5)}._3GL3LmFL_E,._3GL3LmFL_E:after,._3GL3LmFL_E:before{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;font-size:0}._3GL3LmFL_E{position:relative;background-color:var(--loading-dot-2-1);animation:uZWMZR9nBW 1s step-start infinite}._3GL3LmFL_E:before{content:"";position:absolute;left:-12px;background-color:var(--loading-dot-1-1);animation:saNygeIhRC 1s step-start infinite}._3GL3LmFL_E:after{content:"";position:absolute;right:-12px;background-color:var(--loading-dot-3-1);animation:_3RtxWfV4g4 1s step-start infinite}@keyframes saNygeIhRC{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@keyframes uZWMZR9nBW{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@keyframes _3RtxWfV4g4{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}
|
||||
._2uN43zExEi{position:relative;padding:10px 0}._2uN43zExEi input{-webkit-appearance:none;background-color:initial;background-image:none;border:none;border-radius:0;border-bottom:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 4px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._2uN43zExEi input:focus{border-color:var(--color-focus-blue)}._2uN43zExEi label{position:absolute;left:5px;bottom:22px;transition:transform .15s ease-in-out;transform-origin:0 0;font-size:.9em}._2uN43zExEi input:focus+label,._2uN43zExEi label._2gQ0j5OHC8{transform:scale(.75) translateY(-25px)}._2uN43zExEi input:focus+label{color:var(--color-focus-blue)}
|
||||
._2uN43zExEi{position:relative;padding:10px 0}._2uN43zExEi input{-webkit-appearance:none;background-color:initial;background-image:none;border:none;border-radius:0;border-bottom:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._2uN43zExEi input:focus{border-color:var(--color-focus-blue)}._2uN43zExEi label{position:absolute;left:8px;bottom:22px;transition:transform .15s ease-in-out;transform-origin:0 0}._2uN43zExEi input:focus+label,._2uN43zExEi label._2gQ0j5OHC8{transform:scale(.75) translateY(-25px)}._2uN43zExEi input:focus+label{color:var(--color-focus-blue)}
|
||||
._3MvgliBN_D{stroke-dasharray:890;stroke-dashoffset:890;animation:_2C1TpO8LMn 3s ease-in-out infinite normal forwards}@keyframes _2C1TpO8LMn{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}
|
||||
._2vs8ks4GvR._2vs8ks4GvR{background:none;position:fixed;top:0;bottom:0;left:0;right:0;transform:none;padding:0;border-radius:0;display:flex;justify-content:center;overflow-y:auto}.Z8vSJz0PbL{position:relative;margin-left:20px;margin-right:20px}.EWfRQXOK8M.EWfRQXOK8M{background:#222}
|
||||
._2vs8ks4GvR._2vs8ks4GvR{background:none;position:fixed;top:0;bottom:0;left:0;right:0;transform:none;padding:0;border-radius:0;display:flex;justify-content:center}.Z8vSJz0PbL{position:relative;top:10%;margin-left:20px;margin-right:20px}.EWfRQXOK8M.EWfRQXOK8M{background:#222}
|
||||
._2ueF0jmjym{position:fixed;top:0;right:0;left:0;bottom:0;background:#444;z-index:1024}.UZ5fqyDCOb{outline:none;position:relative;color:#ddd;top:50%;left:50%;transform:translate(-50%,-50%);background:#444;padding:20px;border-radius:10px}
|
||||
._113JVByWGF{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;padding:20px;background:var(--color-background);color:var(--color-text);text-align:center}._1m2ZsnzFvt{color:#2a477a;opacity:.6;display:flex;justify-content:center;padding:40px}._3TKFOM4Tgj,._1m2ZsnzFvt{align-items:center}._3TKFOM4Tgj{display:inline-flex;color:var(--color-text-secondary)}._3TKFOM4Tgj:active,._3TKFOM4Tgj:hover{color:#387cec}._3TKFOM4Tgj svg{margin-right:5px}
|
||||
._2kr0S-YLqE{padding:6px 15px}@media screen and (min-width:30em){._2kr0S-YLqE{padding:10px 40px}}
|
||||
@ -19,5 +18,3 @@ h2.Q-CsP5Y3FT{margin:0;font-size:1.3em}@media screen and (min-width:30em){h2.Q-C
|
||||
._3sTuXodYya{background:var(--color-bg-sidebar);position:relative}._1WdrygzFVZ{height:15px}@media (max-width:768px){._1WdrygzFVZ{display:none}}@media (max-width:768px){.q9nBJwAvlz{display:flex;justify-content:space-between;overflow:scroll}}._3yqSXpep4D{color:var(--color-text);text-decoration:none;display:flex;align-items:center;padding:6px 16px}@media screen and (min-width:30em){._3yqSXpep4D{padding:8px 20px}}@media (max-width:768px){._3yqSXpep4D{flex-direction:column}}._3yqSXpep4D svg{color:var(--color-icon);width:22px;height:22px}@media screen and (min-width:30em){._3yqSXpep4D svg{width:24px;height:24px}}._3wqPc_btNi{background:var(--color-sb-active-row-bg)}@media (max-width:768px){._3wqPc_btNi{background:none;border-bottom:2px solid #387cec}}._2sd59kze-t{padding-left:14px;font-size:.75em}@media (max-width:768px){._2sd59kze-t{padding-left:0;padding-top:5px}}@media screen and (min-width:30em){._2sd59kze-t{font-size:1em}}._2o6aUGu--S{position:absolute;bottom:10px;left:50%;transform:translateX(-50%)}@media (max-width:768px){._2o6aUGu--S{display:none}}._11NITPe4W7{--sz:40px;width:var(--sz);height:var(--sz);display:flex;justify-content:center;align-items:center;outline:none;padding:5px;color:var(--color-text);border-radius:100%;border:1px solid transparent}._11NITPe4W7:hover{opacity:.6}._11NITPe4W7:focus{border-color:var(--color-focus-blue)}._1kzEILbWHq{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;background:none;cursor:pointer}
|
||||
._2DECxrOsTa{-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:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._2DECxrOsTa:focus{border-color:var(--color-focus-blue)}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
|
||||
._2IgDTE__bQ{-webkit-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #525252;color:var(--color-text);background:var(--color-toggle-bg);display:flex;position:relative;outline:none}._2IgDTE__bQ:focus{border-color:var(--color-focus-blue)}._2IgDTE__bQ input{position:absolute;left:0;opacity:0}._2IgDTE__bQ label{z-index:2;display:flex;align-items:center;justify-content:center;padding:10px 0;cursor:pointer}._2IfOm9qQ_4{z-index:1;position:absolute;display:block;left:0;height:100%;transition:left .2s ease-out;background:var(--color-toggle-selected)}
|
||||
|
||||
/*# sourceMappingURL=app.8bddcee27ca7cab56b00.css.map*/
|
||||
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,4 +1,2 @@
|
||||
._2drigWG08z>div{min-width:345px}@media screen and (min-width:30em){._2drigWG08z>div{width:360px}}._2drigWG08z,._3qy5-MPwaw{padding:6px 15px 15px}@media screen and (min-width:30em){._2drigWG08z,._3qy5-MPwaw{padding:10px 40px 40px}}._1sbDIR8sCY{padding:0 15px}@media screen and (min-width:30em){._1sbDIR8sCY{padding:0 40px}}._1sbDIR8sCY>div{border-top:1px dashed #373737}._1Hvw0QbyvH{padding:16px 0}
|
||||
._3uy3l7xDdI{display:flex;flex-wrap:wrap}._2hwDLKbh5f{flex-grow:0;margin-right:10px;margin-bottom:10px;cursor:pointer;border:2px solid transparent}._1OeAkW2Cff{border-color:#387cec}
|
||||
|
||||
/*# sourceMappingURL=config.f4c2f06f01d16464ea49.css.map*/
|
||||
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["webpack:///src/components/Config.module.css","webpack:///src/components/Selection.module.css"],"names":[],"mappings":"AACE,iBACE,eAIF,CAHE,mCAFF,iBAGI,WAEJ,CADE,CAIJ,0BAEE,qBAIF,CAHE,mCAHF,0BAII,sBAEJ,CADE,CAGF,aACE,cAOF,CANE,mCAFF,aAGI,cAKJ,CAJE,CACA,iBACE,6BACF,CAGF,aACE,cACF,C;AC7BA,aACE,YAAa,CACb,cACF,CAEA,aACE,WAAY,CACZ,iBAAkB,CAClB,kBAAmB,CACnB,cAAe,CACf,4BACF,CAEA,aACE,oBACF,C","file":"config.f4c2f06f01d16464ea49.css","sourcesContent":[".root {\n > div {\n min-width: 345px;\n @media (--breakpoint-not-small) {\n width: 360px;\n }\n }\n}\n\n.root,\n.section {\n padding: 6px 15px 15px;\n @media (--breakpoint-not-small) {\n padding: 10px 40px 40px;\n }\n}\n\n.sep {\n padding: 0 15px;\n @media (--breakpoint-not-small) {\n padding: 0 40px;\n }\n > div {\n border-top: 1px dashed #373737;\n }\n}\n\n.label {\n padding: 16px 0;\n}\n",".root {\n display: flex;\n flex-wrap: wrap;\n}\n\n.item {\n flex-grow: 0;\n margin-right: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n border: 2px solid transparent;\n}\n\n.itemActive {\n border-color: #387cec;\n}\n"],"sourceRoot":""}
|
||||
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
@ -3,5 +3,3 @@
|
||||
._1jfIf4GmHx{display:grid;grid-template-columns:repeat(11,minmax(-webkit-max-content,auto));grid-template-columns:repeat(11,minmax(max-content,auto))}._3lQG38TYko{padding:8px 10px;height:50px;background:var(--color-background);position:-webkit-sticky;position:sticky;top:0;font-size:.8em;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between}._3lQG38TYko:hover{color:var(--color-text-highlight)}._2jKsqjrYbo{padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._2jKsqjrYbo.MuvmFG__PV{background:var(--color-row-odd)}._3ydhc_nkf0{text-align:right}._3q0v0OLzZL{display:inline-flex;margin-left:10px;width:16px;height:16px}._1XNg9MalRS{transform:rotate(180deg)}
|
||||
._2EXTX1C3T7{background-color:rgba(0,0,0,.6)}._3Or8nP9psK{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}.cMLUu0qS4R{opacity:1;transform:translate(-50%,-50%) scale(1)}._29FK6hdfwZ{display:flex;align-items:center;justify-content:center;margin-top:30px}
|
||||
.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>*{transition:transform .2s ease-in-out}.rtf.open .rtf--mb{background:rgba(56,124,236,.92);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.rtf.open .rtf--mb>ul{list-style:none;margin:0;padding:0}.rtf.open .rtf--ab__c:hover>span,.rtf.open .rtf--ab__c>span.always-show{transition:opacity .2s ease-in-out;opacity:.9}.rtf.open .rtf--ab__c:first-child{transform:translateY(-60px) scale(1);transition-delay:.03s}.rtf.open .rtf--ab__c:first-child.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,.rtf--mb__c>span.always-show{transition:opacity .2s ease-in-out;opacity:.9}.rtf--mb__c>span{opacity:0;transition:opacity .2s ease-in-out;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 rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28)}.rtf--mb__c>span.right{right:100%}.rtf--mb{height:48px;width:48px;z-index:9999;background:#387cec;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:18px}.rtf--ab__c,.rtf--mb>*{transition:transform .2s ease-in-out}.rtf--ab__c{display:block;position:absolute;top:0;right:1px;padding:10px 0;margin:-10px 0}.rtf--ab__c>span{opacity:0;transition:opacity .2s ease-in-out;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 rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28)}.rtf--ab__c>span.right{right:100%}.rtf--ab__c:first-child{transform:translateY(-60px) scale(0);transition-delay:.21s}.rtf--ab__c:first-child.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 rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);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)}
|
||||
|
||||
/*# sourceMappingURL=conns.c9072a30fa369846711d.css.map*/
|
||||
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 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="shortcut icon" href="yacd.ico"><link rel="icon" type="image/png" sizes="64x64" href="yacd-64.png"><link rel="icon" type="image/png" sizes="128x128" href="yacd-128.png"><link rel="preload" href="/open-sans-latin-400.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/open-sans-latin-700.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/roboto-mono-latin-400.woff2" as="font" type="font/woff2" crossorigin><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"><meta name="theme-color" content="#202020"><title>yacd - Yet Another Clash Dashboard</title><meta property="og:image" content="https://user-images.githubusercontent.com/1166872/47304841-536f3d80-d65a-11e8-8908-1917127dafc5.png"><meta property="og:site_name" content="yacd"><meta property="og:type" content="object"><meta property="og:title" content="yacd"><meta property="og:url" content="http://yacd.haishan.me"><meta property="og:description" content="Yet Another Clash Dashboard"><script defer="defer" src="runtime.f62113484153f953d626.js"></script><script defer="defer" src="core-js~app.dd6e8da2caf226e70989.js"></script><script defer="defer" src="react~app.9750176a07a47aafb60a.js"></script><script defer="defer" src="app.2738c7e31c47b68f8120.js"></script><link href="app.8bddcee27ca7cab56b00.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="shortcut icon" href="yacd.ico"><link rel="icon" type="image/png" sizes="64x64" href="yacd-64.png"><link rel="icon" type="image/png" sizes="128x128" href="yacd-128.png"><link rel="preload" href="/open-sans-latin-400.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/open-sans-latin-700.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="/roboto-mono-latin-400.woff2" as="font" type="font/woff2" crossorigin><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"><meta name="theme-color" content="#202020"><title>yacd - Yet Another Clash Dashboard</title><meta property="og:image" content="https://user-images.githubusercontent.com/1166872/47304841-536f3d80-d65a-11e8-8908-1917127dafc5.png"><meta property="og:site_name" content="yacd"><meta property="og:type" content="object"><meta property="og:title" content="yacd"><meta property="og:url" content="http://yacd.haishan.me"><meta property="og:description" content="Yet Another Clash Dashboard"><script defer="defer" src="runtime.184b22669d1e3f4e39e2.js"></script><script defer="defer" src="core-js~app.d6acbd497dd781bcb87a.js"></script><script defer="defer" src="react~app.85a6af7ab221658559e3.js"></script><script defer="defer" src="app.9446db28fec78551ca86.js"></script><link href="app.5f32612351603f3dc36a.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["webpack:///src/components/Logs.module.css","webpack:///src/components/Search.module.css"],"names":[],"mappings":"AAAA,aACE,YAAa,CACb,kBAAmB,CACnB,cAAe,CACf,cAAgB,CAChB,YACF,CAEA,aACE,UAAW,CACX,aAAc,CACd,iBAAkB,CAClB,UAAW,CACX,gBAAiB,CACjB,iBAAkB,CAClB,eAAgB,CAChB,YACF,CAEA,aACE,aAAc,CACd,UAAW,CACX,cACF,CAEA,YACE,aAAc,CACd,YAAa,CACb,uCAA4C,CAC5C,kBAAmB,CACnB,aAAc,CAEd,UAAW,CACX,eAAgB,CAChB,aACF,CAIA,aACE,QAAS,CACT,SAAU,CACV,uBAUF,CAJI,qCACE,kCACF,CAIJ,YACE,iBACF,CAIA,YACE,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,aAOF,CALE,6BACE,iCAAkC,CAClC,eAAgB,CAChB,UACF,CAGF,aACE,UACF,C;AC5EA,aACE,kBACF,CAEA,aACE,iBAAkB,CAClB,WACF,CAEA,YACE,iBAAkB,CAClB,OAAQ,CACR,0BAA2B,CAC3B,MAAO,CACP,UACF,CAEA,aACE,uBAAwB,CACxB,sCAAuC,CACvC,qBAAsB,CACtB,kBAAmB,CACnB,0CAA2C,CAC3C,qBAAsB,CACtB,aAAc,CACd,oBAAqB,CACrB,iBAAkB,CAClB,WAAY,CACZ,YAAa,CACb,qBAAsB,CACtB,0DAAkE,CAClE,UACF,CAEA,aACE,iBAAkB,CAClB,OAAQ,CACR,0BAA2B,CAC3B,SACF,C","file":"logs.9c919d1590eed02bc4b6.css","sourcesContent":[".logMeta {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n font-size: 0.9em;\n padding: 10px;\n}\n\n.logType {\n color: #eee;\n flex-shrink: 0;\n text-align: center;\n width: 66px;\n background: green;\n border-radius: 5px;\n padding: 3px 5px;\n margin: 0 8px;\n}\n\n.logTime {\n flex-shrink: 0;\n color: #999;\n font-size: 14px;\n}\n\n.logText {\n flex-shrink: 0;\n display: flex;\n font-family: 'Roboto Mono', Menlo, monospace;\n align-items: center;\n padding: 8px 0;\n /* force wrap */\n width: 100%;\n white-space: pre;\n overflow: auto;\n}\n\n/*******************/\n\n.logsWrapper {\n margin: 0;\n padding: 0;\n color: var(--color-text);\n\n :global {\n li {\n background: var(--color-background);\n }\n li.even {\n background: var(--color-background);\n }\n }\n}\n\n.log {\n padding: 10px 40px;\n}\n\n/*******************/\n\n.logPlaceholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n color: #2d2d30;\n\n div:nth-child(2) {\n color: var(--color-text-secondary);\n font-size: 1.4em;\n opacity: 0.6;\n }\n}\n\n.logPlaceholderIcon {\n opacity: 0.3;\n}\n",".RuleSearch {\n padding: 0 40px 5px;\n}\n\n.RuleSearchContainer {\n position: relative;\n height: 40px;\n}\n\n.inputWrapper {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 0;\n width: 100%;\n}\n\n.input {\n -webkit-appearance: none;\n background-color: var(--color-input-bg);\n background-image: none;\n border-radius: 20px;\n border: 1px solid var(--color-input-border);\n box-sizing: border-box;\n color: #c1c1c1;\n display: inline-block;\n font-size: inherit;\n height: 40px;\n outline: none;\n padding: 0 15px 0 35px;\n transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n width: 100%;\n}\n\n.iconWrapper {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 10px;\n}\n"],"sourceRoot":""}
|
||||
@ -1,4 +1,2 @@
|
||||
._3rlaagQhmO{display:flex;align-items:center;flex-wrap:wrap;font-size:.9em;padding:10px}._1Y8l2FW3db{color:#eee;flex-shrink:0;text-align:center;width:66px;background:green;border-radius:5px;padding:3px 5px;margin:0 8px}._3RhnPkHfE2{flex-shrink:0;color:#999;font-size:14px}.o1S9cV4T0R{flex-shrink:0;display:flex;font-family:Roboto Mono,Menlo,monospace;align-items:center;padding:8px 0;width:100%;white-space:pre;overflow:auto}._3GIdCSyyS7{margin:0;padding:0;color:var(--color-text)}._3GIdCSyyS7 li,._3GIdCSyyS7 li.even{background:var(--color-background)}.lUDfnPiNdD{padding:10px 40px}.PaFzglKCf5{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}.PaFzglKCf5 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._29b6nIu_GY{opacity:.3}
|
||||
._2QPZldYe9U{padding:0 40px 5px}._2PCUI90lIf{position:relative;height:40px}.xOYTLnYrng{position:absolute;top:50%;transform:translateY(-50%);left:0;width:100%}._1JKQs_Qawx{-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%}._2km92h_dfH{position:absolute;top:50%;transform:translateY(-50%);left:10px}
|
||||
|
||||
/*# sourceMappingURL=logs.9c919d1590eed02bc4b6.css.map*/
|
||||
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,5 +11,3 @@
|
||||
._2epoA7G8CQ{height:30px;width:100%;padding-left:8px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-background);color:var(--color-text);padding-right:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23999'/%3E%3C/svg%3E");border-radius:4px;border-image:initial;border:1px solid var(--select-border-color);transition:all .1s ease 0s;background-position:calc(100% - 8px) 50%;background-repeat:no-repeat}._2epoA7G8CQ:focus,._2epoA7G8CQ:hover{border-color:#343434;outline:none!important;color:var(--color-text-highlight);background-image:var(--select-bg-hover)}._2epoA7G8CQ option{background-color:var(--color-background)}
|
||||
._1tkxMBL44k{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 0}
|
||||
._1I0EXOg8Vu{-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%}._1I0EXOg8Vu:focus{border:1px solid var(--color-focus-blue)}
|
||||
|
||||
/*# sourceMappingURL=proxies.0fea71f33a1333d027ad.css.map*/
|
||||
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
@ -3,5 +3,3 @@
|
||||
._2ZxnpAgEbI{display:flex;align-items:center;padding:6px 15px}@media screen and (min-width:30em){._2ZxnpAgEbI{padding:10px 40px}}._1Waxn5PO-y{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}._1YW1imuuRW{display:flex;align-items:center;font-size:12px;opacity:.8}._3Anv9Ytzq4{padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:16px}@media screen and (min-width:30em){._3Anv9Ytzq4{font-size:19px}}._28txnmlSD3{width:110px}
|
||||
._3WrcX9K2WQ{display:grid;grid-template-columns:1fr minmax(auto,330px);align-items:center;padding-right:15px}@media screen and (min-width:30em){._3WrcX9K2WQ{padding-right:40px}}._109LiAqCt-{padding:6px 15px}@media screen and (min-width:30em){._109LiAqCt-{padding:10px 40px}}
|
||||
.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>*{transition:transform .2s ease-in-out}.rtf.open .rtf--mb{background:rgba(56,124,236,.92);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.rtf.open .rtf--mb>ul{list-style:none;margin:0;padding:0}.rtf.open .rtf--ab__c:hover>span,.rtf.open .rtf--ab__c>span.always-show{transition:opacity .2s ease-in-out;opacity:.9}.rtf.open .rtf--ab__c:first-child{transform:translateY(-60px) scale(1);transition-delay:.03s}.rtf.open .rtf--ab__c:first-child.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,.rtf--mb__c>span.always-show{transition:opacity .2s ease-in-out;opacity:.9}.rtf--mb__c>span{opacity:0;transition:opacity .2s ease-in-out;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 rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28)}.rtf--mb__c>span.right{right:100%}.rtf--mb{height:48px;width:48px;z-index:9999;background:#387cec;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:18px}.rtf--ab__c,.rtf--mb>*{transition:transform .2s ease-in-out}.rtf--ab__c{display:block;position:absolute;top:0;right:1px;padding:10px 0;margin:-10px 0}.rtf--ab__c>span{opacity:0;transition:opacity .2s ease-in-out;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 rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28)}.rtf--ab__c>span.right{right:100%}.rtf--ab__c:first-child{transform:translateY(-60px) scale(0);transition-delay:.21s}.rtf--ab__c:first-child.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 rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);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)}
|
||||
|
||||
/*# sourceMappingURL=rules.86d27ed35189095cbd2d.css.map*/
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
!function(e){function r(r){for(var n,o,s=r[0],u=r[1],i=r[2],f=r[3]||[],l=0,b=[];l<s.length;l++)o=s[l],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&b.push(a[o][0]),a[o]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(p&&p(r),d.push.apply(d,f);b.length;)b.shift()();return c.push.apply(c,i||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var i=t[o];0!==a[i]&&(n=!1)}n&&(c.splice(r--,1),e=u(u.s=t[0]))}return 0===c.length&&(d.forEach((function(e){if(void 0===a[e]){a[e]=null;var r=document.createElement("link");u.nc&&r.setAttribute("nonce",u.nc),r.rel="prefetch",r.as="script",r.href=s(e),document.head.appendChild(r)}})),d.length=0),e}var n={},o={10:0},a={10:0},c=[],d=[];function s(e){return u.p+""+({0:"vendors~conns~proxies~rules",1:"vendors~logs~rules",3:"config",4:"conns",6:"logs",7:"proxies",9:"rules",11:"vendors~chartjs",12:"vendors~conns",13:"vendors~proxies"}[e]||e)+"."+{0:"99b1a71b3d76d3035e41",1:"1b69c8ae2dc5929cac38",3:"185469682369eea7ed5e",4:"a55d943aa09565fccb1a",6:"367e6b30d27de1213a87",7:"fe3172e32076eb8749e4",9:"fe5dbfb2f26ad4211d1e",11:"c749992ca47ba67623b4",12:"2d8ba1925a9d128867eb",13:"8fcc0e726f340a602edf",14:"2b1ab3375a2b9a48edab"}[e]+".js"}function u(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.e=function(e){var r=[];o[e]?r.push(o[e]):0!==o[e]&&{3:1,4:1,6:1,7:1,9:1}[e]&&r.push(o[e]=new Promise((function(r,t){for(var n=({0:"vendors~conns~proxies~rules",1:"vendors~logs~rules",3:"config",4:"conns",6:"logs",7:"proxies",9:"rules",11:"vendors~chartjs",12:"vendors~conns",13:"vendors~proxies"}[e]||e)+"."+{0:"31d6cfe0d16ae931b73c",1:"31d6cfe0d16ae931b73c",3:"683c5e4f78100df80abd",4:"a8987b95653cf010754d",6:"bf8d3190ebe74f5f5c12",7:"2054c162aeb581d56063",9:"ebacd344d22f80adb7f8",11:"31d6cfe0d16ae931b73c",12:"31d6cfe0d16ae931b73c",13:"31d6cfe0d16ae931b73c",14:"31d6cfe0d16ae931b73c"}[e]+".css",a=u.p+n,c=document.getElementsByTagName("link"),d=0;d<c.length;d++){var s=(f=c[d]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(s===n||s===a))return r()}var i=document.getElementsByTagName("style");for(d=0;d<i.length;d++){var f;if((s=(f=i[d]).getAttribute("data-href"))===n||s===a)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],l.parentNode.removeChild(l),t(c)},l.href=a,document.getElementsByTagName("head")[0].appendChild(l)})).then((function(){o[e]=0})));var t=a[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=a[e]=[r,n]}));r.push(t[2]=n);var c,d=document.createElement("script");d.charset="utf-8",d.timeout=120,u.nc&&d.setAttribute("nonce",u.nc),d.src=s(e);var i=new Error;c=function(r){d.onerror=d.onload=null,clearTimeout(f);var t=a[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,t[1](i)}a[e]=void 0}};var f=setTimeout((function(){c({type:"timeout",target:d})}),12e4);d.onerror=d.onload=c,document.head.appendChild(d)}return Promise.all(r)},u.m=e,u.c=n,u.d=function(e,r,t){u.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,r){if(1&r&&(e=u(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)u.d(t,n,function(r){return e[r]}.bind(null,n));return t},u.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(r,"a",r),r},u.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},u.p="",u.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var l=0;l<i.length;l++)r(i[l]);var p=f;t()}([]);
|
||||
@ -1,2 +0,0 @@
|
||||
!function(e){function r(r){for(var n,o,d=r[0],u=r[1],i=r[2],l=r[3]||[],f=0,h=[];f<d.length;f++)o=d[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&h.push(a[o][0]),a[o]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(p&&p(r),s.push.apply(s,l);h.length;)h.shift()();return c.push.apply(c,i||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var i=t[o];0!==a[i]&&(n=!1)}n&&(c.splice(r--,1),e=u(u.s=t[0]))}return 0===c.length&&(s.forEach((function(e){if(void 0===a[e]){a[e]=null;var r=document.createElement("link");u.nc&&r.setAttribute("nonce",u.nc),r.rel="prefetch",r.as="script",r.href=d(e),document.head.appendChild(r)}})),s.length=0),e}var n={},o={10:0},a={10:0},c=[],s=[];function d(e){return u.p+""+({0:"vendors~conns~proxies~rules",1:"vendors~logs~rules",3:"config",4:"conns",6:"logs",7:"proxies",9:"rules",11:"vendors~chartjs",12:"vendors~conns",13:"vendors~proxies"}[e]||e)+"."+{0:"c215600c8244056a7348",1:"b89b151299a9a0792fbd",3:"34f4fe226a92f4ab6257",4:"99b1285dff5ccca94b08",6:"cc50e5d3455225682ee1",7:"c9885b811bbac6a73481",9:"ea160448d44308c089d7",11:"42b55d72a7fa9aeebd81",12:"755c8e5abbda57591cce",13:"e33cf62311dc7a41141e"}[e]+".js"}function u(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.e=function(e){var r=[];o[e]?r.push(o[e]):0!==o[e]&&{3:1,4:1,6:1,7:1,9:1}[e]&&r.push(o[e]=new Promise((function(r,t){for(var n=({0:"vendors~conns~proxies~rules",1:"vendors~logs~rules",3:"config",4:"conns",6:"logs",7:"proxies",9:"rules",11:"vendors~chartjs",12:"vendors~conns",13:"vendors~proxies"}[e]||e)+"."+{0:"31d6cfe0d16ae931b73c",1:"31d6cfe0d16ae931b73c",3:"f4c2f06f01d16464ea49",4:"c9072a30fa369846711d",6:"9c919d1590eed02bc4b6",7:"0fea71f33a1333d027ad",9:"86d27ed35189095cbd2d",11:"31d6cfe0d16ae931b73c",12:"31d6cfe0d16ae931b73c",13:"31d6cfe0d16ae931b73c"}[e]+".css",a=u.p+n,c=document.getElementsByTagName("link"),s=0;s<c.length;s++){var d=(l=c[s]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(d===n||d===a))return r()}var i=document.getElementsByTagName("style");for(s=0;s<i.length;s++){var l;if((d=(l=i[s]).getAttribute("data-href"))===n||d===a)return r()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=r,f.onerror=function(r){var n=r&&r.target&&r.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],f.parentNode.removeChild(f),t(c)},f.href=a,document.getElementsByTagName("head")[0].appendChild(f)})).then((function(){o[e]=0})));var t=a[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=a[e]=[r,n]}));r.push(t[2]=n);var c,s=document.createElement("script");s.charset="utf-8",s.timeout=120,u.nc&&s.setAttribute("nonce",u.nc),s.src=d(e);var i=new Error;c=function(r){s.onerror=s.onload=null,clearTimeout(l);var t=a[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,t[1](i)}a[e]=void 0}};var l=setTimeout((function(){c({type:"timeout",target:s})}),12e4);s.onerror=s.onload=c,document.head.appendChild(s)}return Promise.all(r)},u.m=e,u.c=n,u.d=function(e,r,t){u.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,r){if(1&r&&(e=u(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)u.d(t,n,function(r){return e[r]}.bind(null,n));return t},u.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(r,"a",r),r},u.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},u.p="",u.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],l=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var p=l;t()}([]);
|
||||
//# sourceMappingURL=runtime.f62113484153f953d626.js.map
|
||||
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
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,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
|
||||
#删除旧hosts配置
|
||||
hostlen=$(sed -n '/hosts:/=' "$7" 2>/dev/null)
|
||||
dnslen=$(sed -n '/dns:/=' "$7" 2>/dev/null)
|
||||
@ -77,12 +80,18 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$14" -ne 1 ]; then
|
||||
if [ "$14" != "1" ]; then
|
||||
controller_address="0.0.0.0"
|
||||
bind_address="*"
|
||||
else
|
||||
elif [ "$18" != "Tun" ] && [ "$14" = "1" ]; then
|
||||
controller_address=$11
|
||||
bind_address=$11
|
||||
elif [ "$18" = "Tun" ] && [ "$14" = "1" ]; then
|
||||
echo "Warning: Stop Set The Bind Address Option In TUN Mode, Because The Router Will Not Be Able To Connect To The Internet" >> $LOG_FILE
|
||||
echo "警告: 在TUN内核下启用仅允许内网会导致路由器无法联网,已忽略此项修改!" >$START_LOG
|
||||
controller_address="0.0.0.0"
|
||||
bind_address="*"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
if [ -z "$(grep "^external-controller: $controller_address:$5" "$7")" ]; then
|
||||
|
||||
@ -91,7 +91,12 @@ cfg_get()
|
||||
|
||||
cfg_get_dynamic()
|
||||
{
|
||||
echo "$(grep "^ \{0,\}$1" "$2" 2>/dev/null |grep -v "^ \{0,\}- name:" |grep -v "^ \{0,\}- keep-alive" |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)"
|
||||
echo "$(grep "^ \{0,\}$1" "$2" 2>/dev/null |grep -v "^ \{0,\}- name:" 2>/dev/null |grep -v "^ \{0,\}- keep-alive" 2>/dev/null |grep -v "{" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/\}.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null)"
|
||||
}
|
||||
|
||||
cfg_get_dynamic_json()
|
||||
{
|
||||
echo "$(grep "$1" "$2" 2>/dev/null |grep -v "^ \{0,\}ws-path:" 2>/dev/null |awk -v tag='$1 \\[' 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/],.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/,/ /g' 2>/dev/null)"
|
||||
}
|
||||
|
||||
cfg_new_servers_groups_check()
|
||||
@ -550,6 +555,9 @@ do
|
||||
Host="$(cfg_get "Host:" "$single_server")"
|
||||
#http_paths:
|
||||
http_paths="$(cfg_get_dynamic "-" "$single_server")"
|
||||
if [ -z "$http_paths" ]; then
|
||||
http_paths="$(cfg_get_dynamic_json "path:" "$single_server")"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$server_type" = "socks5" ] || [ "$server_type" = "http" ]; then
|
||||
@ -580,6 +588,9 @@ do
|
||||
sni="$(cfg_get "sni:" "$single_server")"
|
||||
#alpn:
|
||||
alpns="$(cfg_get_dynamic "-" "$single_server")"
|
||||
if [ -z "$alpns" ]; then
|
||||
alpns="$(cfg_get_dynamic_json "alpn:" "$single_server")"
|
||||
fi
|
||||
fi
|
||||
|
||||
#udp
|
||||
@ -787,20 +798,22 @@ do
|
||||
do
|
||||
single_group="/tmp/group_$i.yaml"
|
||||
group_type="$(cfg_get "type:" "$single_group")"
|
||||
if [ ! -z "$(grep -F "$server_name" "$single_group")" ] && [ "$group_type" = "relay" ]; then
|
||||
if [ -n "$(grep -F "$server_name" "$single_group")" ] && [ "$group_type" = "relay" ]; then
|
||||
group_name=$(cfg_get "name:" "$single_group")
|
||||
grep "^ \{0,\}-" "$single_group" 2>/dev/null |grep -v "^ \{0,\}- name:" 2>/dev/null > $SERVER_RELAY
|
||||
server_relays="$(cfg_get_dynamic "-" "$single_group")"
|
||||
if [ -z "$server_relays" ]; then
|
||||
server_relays="$(cfg_get_dynamic_json "proxies:" "$single_group")"
|
||||
fi
|
||||
s=1
|
||||
cat $SERVER_RELAY |while read -r line
|
||||
do
|
||||
if [ ! -z "$(echo "$line" |grep -F "$server_name" 2>/dev/null)" ]; then
|
||||
for server_relay in $server_relays; do
|
||||
if [ "$server_relay" = "$server_name" ]; then
|
||||
${uci_add}groups="$group_name"
|
||||
${uci_add}relay_groups="$group_name#relay#$s"
|
||||
else
|
||||
s=$(expr "$s" + 1)
|
||||
fi
|
||||
done
|
||||
elif [ ! -z "$(grep -F "$server_name" "$single_group")" ]; then
|
||||
elif [ -n "$(grep -F "$server_name" "$single_group")" ]; then
|
||||
group_name=$(cfg_get "name:" "$single_group")
|
||||
${uci_add}groups="$group_name"
|
||||
fi
|
||||
|
||||
@ -29,6 +29,17 @@ yml_other_set()
|
||||
sed -i '/- DOMAIN-KEYWORD,find_node,DIRECT/d' "$4" 2>/dev/null
|
||||
sed -i '/- DOMAIN-KEYWORD,BitTorrent,DIRECT/d' "$4" 2>/dev/null
|
||||
sed -i '/- DOMAIN-KEYWORD,announce_peer,DIRECT/d' "$4" 2>/dev/null
|
||||
|
||||
if [ -z "$(grep '^ \{0,\}- IP-CIDR,198.18.0.1/16,REJECT,no-resolve' "$4")" ]; then
|
||||
if [ ! -z "$(grep "^ \{0,\}- IP-CIDR,198.18.0.1/16" "$4")" ]; then
|
||||
sed -i "/^ \{0,\}- IP-CIDR,198.18.0.1\/16/c\- IP-CIDR,198.18.0.1\/16,REJECT,no-resolve" "$4" 2>/dev/null
|
||||
else
|
||||
sed -i '1,/^ \{0,\}- GEOIP/{/^ \{0,\}- GEOIP/s/^ \{0,\}- GEOIP/- IP-CIDR,198.18.0.1\/16,REJECT,no-resolve\n&/}' "$4" 2>/dev/null
|
||||
if [ -z "$(grep '^- IP-CIDR,198.18.0.1/16,REJECT,no-resolve' "$4")" ]; then
|
||||
sed -i '1,/^ \{0,\}- MATCH/{/^ \{0,\}- MATCH/s/^ \{0,\}- MATCH/- IP-CIDR,198.18.0.1\/16,REJECT,no-resolve\n&/}' "$4" 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$7" = 1 ]; then
|
||||
sed -i '1,/^ \{0,\}- GEOIP/{/^ \{0,\}- GEOIP/s/^ \{0,\}- GEOIP/- DOMAIN-KEYWORD,tracker,DIRECT\n&/}' "$4" 2>/dev/null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user