luci-app-openclash: bump to v0.40.2-beta
This commit is contained in:
parent
dbc1580069
commit
2411859afe
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-openclash
|
||||
PKG_VERSION:=0.39.8
|
||||
PKG_VERSION:=0.40.2
|
||||
PKG_RELEASE:=beta
|
||||
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
# Copyright (c) 2019 vernesong
|
||||
|
||||
START=99
|
||||
@ -15,8 +16,11 @@ BACKUP_FILE="/etc/openclash/backup/$(uci get openclash.config.config_path 2>/dev
|
||||
START_BACKUP="/tmp/config.sbak"
|
||||
CHANGE_FILE="/tmp/yaml_change.yaml"
|
||||
SCRIPT_FILE="/tmp/yaml_script.yaml"
|
||||
SCRIPT_BAK_FILE="/tmp/yaml_script_bak.yaml"
|
||||
RULE_PROVIDER_FILE="/tmp/yaml_rule_provider.yaml"
|
||||
RULE_PROVIDER_BAK_FILE="/tmp/yaml_rule_provider_bak.yaml"
|
||||
RULE_FILE="/tmp/yaml_rules.yaml"
|
||||
RULE_BAK_FILE="/tmp/yaml_rules_bak.yaml"
|
||||
DNS_FILE="/tmp/yaml_dns.yaml"
|
||||
PROXY_FILE="/tmp/yaml_proxy.yaml"
|
||||
PROXY_PROVIDER_FILE="/tmp/yaml_proxy_provider.yaml"
|
||||
@ -37,6 +41,9 @@ add_cron()
|
||||
[ -z "$(grep "openclash_ipdb.sh" "$CRON_FILE" 2>/dev/null)" ] && {
|
||||
[ "$(uci get openclash.config.geo_auto_update 2>/dev/null)" -eq 1 ] && echo "0 $(uci get openclash.config.geo_update_day_time 2>/dev/null) * * $(uci get openclash.config.geo_update_week_time 2>/dev/null) /usr/share/openclash/openclash_ipdb.sh" >> $CRON_FILE
|
||||
}
|
||||
[ -z "$(grep "openclash_chnroute.sh" "$CRON_FILE" 2>/dev/null)" ] && {
|
||||
[ "$(uci get openclash.config.chnr_auto_update 2>/dev/null)" -eq 1 ] && echo "0 $(uci get openclash.config.chnr_update_day_time 2>/dev/null) * * $(uci get openclash.config.chnr_update_week_time 2>/dev/null) /usr/share/openclash/openclash_chnroute.sh" >> $CRON_FILE
|
||||
}
|
||||
crontab $CRON_FILE
|
||||
nohup /usr/share/openclash/openclash_watchdog.sh &
|
||||
}
|
||||
@ -46,6 +53,7 @@ del_cron()
|
||||
sed -i '/openclash.sh/d' $CRON_FILE 2>/dev/null
|
||||
sed -i '/openclash_rule.sh/d' $CRON_FILE 2>/dev/null
|
||||
sed -i '/openclash_ipdb.sh/d' $CRON_FILE 2>/dev/null
|
||||
sed -i '/openclash_chnroute.sh/d' $CRON_FILE 2>/dev/null
|
||||
/etc/init.d/cron restart
|
||||
}
|
||||
|
||||
@ -138,8 +146,24 @@ field_cut()
|
||||
elif [ -n "$end_len" ]; then
|
||||
end_len=$(expr "$end_len" - 1)
|
||||
fi
|
||||
|
||||
sed -n "${1},${end_len}p" "$3" > "$2" 2>/dev/null
|
||||
sed -i "${1},${end_len}d" "$3" 2>/dev/null
|
||||
|
||||
if [ -z "$4" ]; then
|
||||
sed -i "${1},${end_len}d" "$3" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
yml_merge()
|
||||
{
|
||||
#合并文件
|
||||
cat "$CHANGE_FILE" "$DNS_FILE" "$PROXY_PROVIDER_FILE" "$PROXY_FILE" "$GROUP_FILE" "$RULE_PROVIDER_FILE" "$SCRIPT_FILE" "$RULE_FILE" > "$CONFIG_FILE" 2>/dev/null
|
||||
}
|
||||
|
||||
yml_rule_bak_merge()
|
||||
{
|
||||
#合并文件
|
||||
cat "$CHANGE_FILE" "$DNS_FILE" "$PROXY_PROVIDER_FILE" "$PROXY_FILE" "$GROUP_FILE" "$RULE_PROVIDER_BAK_FILE" "$SCRIPT_BAK_FILE" "$RULE_BAK_FILE" > "$CONFIG_FILE" 2>/dev/null
|
||||
}
|
||||
|
||||
yml_check()
|
||||
@ -147,6 +171,8 @@ yml_check()
|
||||
#格式替换
|
||||
sed -i 's/\t/ /g' "$3" 2>/dev/null
|
||||
sed -i "s/- \{2,\}/- /g" "$3" 2>/dev/null
|
||||
sed -i "s/^\.\.\.$//g" "$3" 2>/dev/null
|
||||
sed -i "s/^---$//g" "$3" 2>/dev/null
|
||||
|
||||
#检查关键字避免后续操作出错
|
||||
/usr/share/openclash/yml_field_name_ch.sh "$3" 2>/dev/null
|
||||
@ -218,11 +244,29 @@ yml_check()
|
||||
field_cut "$rule_provider_len" "$RULE_PROVIDER_FILE" "$3"
|
||||
fi 2>/dev/null
|
||||
|
||||
#处理备份rule_provider位置
|
||||
rule_provider_bak_len=$(sed -n '/^rule-providers:/=' "$4" 2>/dev/null)
|
||||
if [ -n "$rule_provider_bak_len" ]; then
|
||||
field_cut "$rule_provider_bak_len" "$RULE_PROVIDER_BAK_FILE" "$4" "backups"
|
||||
fi 2>/dev/null
|
||||
|
||||
#处理script位置
|
||||
script_len=$(sed -n '/^script:/=' "$3" 2>/dev/null)
|
||||
if [ -n "$script_len" ]; then
|
||||
field_cut "$script_len" "$SCRIPT_FILE" "$3"
|
||||
fi 2>/dev/null
|
||||
|
||||
#处理备份script位置
|
||||
script_bak_len=$(sed -n '/^script:/=' "$4" 2>/dev/null)
|
||||
if [ -n "$script_bak_len" ]; then
|
||||
field_cut "$script_bak_len" "$SCRIPT_BAK_FILE" "$4" "backups"
|
||||
fi 2>/dev/null
|
||||
|
||||
#处理备份rule位置
|
||||
rule_bak_len=$(sed -n '/^rules:/=' "$4" 2>/dev/null)
|
||||
if [ -n "$rule_bak_len" ]; then
|
||||
field_cut "$rule_bak_len" "$RULE_BAK_FILE" "$4" "backups"
|
||||
fi 2>/dev/null
|
||||
|
||||
if [ -n "$provider_len" ]; then
|
||||
proxy_provider_mode=1
|
||||
@ -689,8 +733,7 @@ sed -i '/OpenClash-Game-Rules-End/d' "$RULE_FILE" 2>/dev/null
|
||||
sed -i '/OpenClash-Game-Rules/r/tmp/yaml_game_rule_group.yaml' "$RULE_FILE" 2>/dev/null
|
||||
}
|
||||
|
||||
#合并文件
|
||||
cat "$CHANGE_FILE" "$DNS_FILE" "$PROXY_PROVIDER_FILE" "$PROXY_FILE" "$GROUP_FILE" "$RULE_PROVIDER_FILE" "$SCRIPT_FILE" "$RULE_FILE" > "$CONFIG_FILE" 2>/dev/null
|
||||
yml_merge
|
||||
|
||||
#处理游戏节点与策略组
|
||||
config_load "openclash"
|
||||
@ -997,6 +1040,7 @@ CONFIG_NAME=$(echo "$CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null)
|
||||
do_run_mode()
|
||||
{
|
||||
en_mode=$(uci get openclash.config.en_mode 2>/dev/null)
|
||||
proxy_mode=$(uci get openclash.config.proxy_mode 2>/dev/null)
|
||||
|
||||
if [ "$en_mode" = "fake-ip-tun" ]; then
|
||||
en_mode_tun="1"
|
||||
@ -1048,7 +1092,7 @@ do_run_core()
|
||||
core_type="Game"
|
||||
fi
|
||||
|
||||
if [ "$proxy_mode" = "script" ] || [ "$rule_source" = "ConnersHua" ]; then
|
||||
if [ "$proxy_mode" = "script" ] || [ "$rule_source" = "ConnersHua" ] || [ "$rule_source" = "lhie1" ]; then
|
||||
ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null
|
||||
core_type="Tun"
|
||||
fi
|
||||
@ -1112,18 +1156,18 @@ cat > "/var/etc/openclash.include" <<-EOF
|
||||
EOF
|
||||
|
||||
if [ "$china_ip_route" -eq 1 ]; then
|
||||
if [ ! -f "/tmp/china_ip_route.ipset" ]; then
|
||||
if [ ! -f "/etc/openclash/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
|
||||
sed -i "s/^ \{0,\}- //g" /tmp/china_ip_route.list 2>/dev/null
|
||||
sed -i '/payload:/d' /tmp/china_ip_route.list 2>/dev/null
|
||||
sed -i '/^ \{0,\}#/d' /tmp/china_ip_route.list 2>/dev/null
|
||||
echo "create china_ip_route hash:net family inet hashsize 1024 maxelem 65536" >/tmp/china_ip_route.ipset
|
||||
awk '!/^$/&&!/^#/{printf("add china_ip_route %s'" "'\n",$0)}' /tmp/china_ip_route.list >>/tmp/china_ip_route.ipset
|
||||
echo "create china_ip_route hash:net family inet hashsize 1024 maxelem 65536" >/etc/openclash/china_ip_route.ipset
|
||||
awk '!/^$/&&!/^#/{printf("add china_ip_route %s'" "'\n",$0)}' /tmp/china_ip_route.list >>/etc/openclash/china_ip_route.ipset
|
||||
rm -rf /tmp/china_ip_route.list 2>/dev/null
|
||||
fi
|
||||
ipset -! flush china_ip_route 2>/dev/null
|
||||
ipset -! restore </tmp/china_ip_route.ipset 2>/dev/null
|
||||
ipset -! restore </etc/openclash/china_ip_route.ipset 2>/dev/null
|
||||
fi
|
||||
|
||||
#lan_ac
|
||||
@ -1201,16 +1245,16 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 3 ]; then
|
||||
iptables -t nat -A OUTPUT -p tcp -j openclash_output
|
||||
fi
|
||||
|
||||
if [ "$ipv6_enable" -eq 1 ]; then
|
||||
#tcp
|
||||
ip6tables -t nat -N openclash
|
||||
if [ -n "$lan_ip6" ]; then
|
||||
for lan_ip6s in $lan_ip6; do
|
||||
ip6tables -t nat -A openclash -d "$lan_ip6s" -j RETURN 2>/dev/null
|
||||
done
|
||||
fi
|
||||
ip6tables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port"
|
||||
ip6tables -t nat -A PREROUTING -p tcp -j openclash
|
||||
#if [ "$ipv6_enable" -eq 1 ]; then
|
||||
# #tcp
|
||||
# ip6tables -t nat -N openclash
|
||||
# if [ -n "$lan_ip6" ]; then
|
||||
# for lan_ip6s in $lan_ip6; do
|
||||
# ip6tables -t nat -A openclash -d "$lan_ip6s" -j RETURN 2>/dev/null
|
||||
# done
|
||||
# fi
|
||||
# ip6tables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port"
|
||||
# ip6tables -t nat -A PREROUTING -p tcp -j openclash
|
||||
|
||||
#udp
|
||||
#if [ "$enable_udp_proxy" -eq 1 ]; then
|
||||
@ -1225,7 +1269,7 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 3 ]; then
|
||||
# ip6tables -t mangle -A openclash -p udp -j TPROXY --on-port "$proxy_port" --tproxy-mark "$PROXY_FWMARK"
|
||||
# ip6tables -t mangle -A PREROUTING -p udp -j openclash
|
||||
#fi
|
||||
fi 2>/dev/null
|
||||
#fi 2>/dev/null
|
||||
fi
|
||||
if [ -n "$en_mode_tun" ]; then
|
||||
#TUN模式
|
||||
@ -1367,7 +1411,6 @@ revert_firewall()
|
||||
|
||||
get_config()
|
||||
{
|
||||
proxy_mode=$(uci get openclash.config.proxy_mode 2>/dev/null)
|
||||
rule_source=$(uci get openclash.config.rule_source 2>/dev/null)
|
||||
enable_custom_dns=$(uci get openclash.config.enable_custom_dns 2>/dev/null)
|
||||
enable_custom_clash_rules=$(uci get openclash.config.enable_custom_clash_rules 2>/dev/null)
|
||||
@ -1395,7 +1438,7 @@ get_config()
|
||||
start()
|
||||
{
|
||||
#禁止多个实例
|
||||
status=$(ps|grep -c /etc/init.d/openclash)
|
||||
status=$(unify_ps_status "/etc/init.d/openclash")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
config_choose
|
||||
@ -1417,7 +1460,7 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
|
||||
mv "$START_BACKUP" "$CONFIG_FILE"
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
elif [ -z "$(grep "^ \{0,\}rules:" "$CONFIG_FILE" 2>/dev/null)" ] && [ -z "$(grep "^ \{0,\}script:" "$CONFIG_FILE" 2>/dev/null)" ]; then
|
||||
elif [ -z "$(grep "^ \{0,\}rules:" "$CONFIG_FILE" 2>/dev/null)" ] && [ -z "$(grep "^ \{0,\}script:" "$SCRIPT_FILE" 2>/dev/null)" ]; then
|
||||
kill_clash
|
||||
stop
|
||||
echo "错误: 配置文件完整性检查不通过,已自动还原配置文件,请对照模板格式检查修改配置文件!" >$START_LOG
|
||||
@ -1504,14 +1547,7 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
|
||||
if [ "$rule_source" != 0 ] || [ "$enable_custom_clash_rules" != 0 ]; then
|
||||
echo "错误: OpenClash 启动失败,尝试还原第三方规则并重新启动 Clash 主程序..." >$START_LOG
|
||||
echo "${LOGTIME} OpenClash Can Not Start, Try Use Backup Rules Start Again" >> $LOG_FILE
|
||||
mv "$START_BACKUP" /tmp/configrules.bak
|
||||
sed -i -n '/^rules:/,$p' /tmp/configrules.bak
|
||||
sed -i '/^rules:/,$d' "$CONFIG_FILE" 2>/dev/null
|
||||
if [ -z "$(grep "##source:" /tmp/configrules.bak 2>/dev/null)" ]; then
|
||||
sed -i '/##Other-rule-providers##/,/##Other-rule-providers-end##/d' "$CONFIG_FILE" 2>/dev/null
|
||||
fi
|
||||
cat /tmp/configrules.bak >> "$CONFIG_FILE"
|
||||
rm -rf /tmp/configrules.bak
|
||||
yml_rule_bak_merge
|
||||
nohup "$CLASH" -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
|
||||
sleep 3
|
||||
if pidof clash >/dev/null; then
|
||||
@ -1593,7 +1629,7 @@ stop()
|
||||
revert_firewall
|
||||
|
||||
echo "第三步: 关闭 OpenClash 守护程序..." >$START_LOG
|
||||
watchdog_pids=$(ps |grep openclash_watchdog.sh |grep -v grep |awk '{print $1}' 2>/dev/null)
|
||||
watchdog_pids=$(unify_ps_pids "openclash_watchdog.sh")
|
||||
for watchdog_pid in $watchdog_pids; do
|
||||
kill -9 "$watchdog_pid" >/dev/null 2>&1
|
||||
done
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -149,16 +149,16 @@ proxies: # 节点设置,此部分与proxy-provider两者不能同时删除
|
||||
#auth_aes128_sha1 auth_chain_a auth_chain_b
|
||||
|
||||
- name: "ssr"
|
||||
type: ssr
|
||||
server: server
|
||||
port: 443
|
||||
cipher: chacha20-ietf
|
||||
password: "password"
|
||||
obfs: tls1.2_ticket_auth
|
||||
protocol: auth_sha1_v4
|
||||
# obfs-param: domain.tld
|
||||
# protocol-param: "#"
|
||||
# udp: true
|
||||
type: ssr
|
||||
server: server
|
||||
port: 443
|
||||
cipher: chacha20-ietf
|
||||
password: "password"
|
||||
obfs: tls1.2_ticket_auth
|
||||
protocol: auth_sha1_v4
|
||||
# obfs-param: domain.tld
|
||||
# protocol-param: "#"
|
||||
# udp: true
|
||||
|
||||
# vmess
|
||||
# cipher support auto/aes-128-gcm/chacha20-poly1305/none
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -61,11 +61,7 @@ payload:
|
||||
- '3.5.214.0/23'
|
||||
- '3.5.216.0/24'
|
||||
- '8.128.0.0/10'
|
||||
- '8.209.36.0/22'
|
||||
- '8.209.40.0/21'
|
||||
- '8.211.128.0/17'
|
||||
- '8.212.0.0/14'
|
||||
- '8.216.0.0/13'
|
||||
- '14.0.0.0/21'
|
||||
- '14.0.12.0/22'
|
||||
- '14.1.0.0/22'
|
||||
@ -86,14 +82,11 @@ payload:
|
||||
- '14.204.0.0/15'
|
||||
- '14.208.0.0/12'
|
||||
- '15.230.41.0/24'
|
||||
- '20.62.0.0/24'
|
||||
- '15.230.49.0/24'
|
||||
- '20.81.0.0/24'
|
||||
- '20.139.160.0/20'
|
||||
- '20.249.255.0/24'
|
||||
- '20.251.0.0/22'
|
||||
- '23.236.64.0/25'
|
||||
- '23.236.64.128/26'
|
||||
- '23.236.64.192/27'
|
||||
- '27.0.128.0/22'
|
||||
- '27.0.132.0/24'
|
||||
- '27.0.134.0/23'
|
||||
@ -311,6 +304,7 @@ payload:
|
||||
- '42.247.64.0/18'
|
||||
- '42.247.128.0/17'
|
||||
- '42.248.0.0/13'
|
||||
- '43.0.0.0/9'
|
||||
- '43.224.12.0/22'
|
||||
- '43.224.24.0/22'
|
||||
- '43.224.44.0/22'
|
||||
@ -321,7 +315,7 @@ payload:
|
||||
- '43.224.80.0/22'
|
||||
- '43.224.100.0/22'
|
||||
- '43.224.144.0/22'
|
||||
- '43.224.160.0/22'
|
||||
- '43.224.161.0/24'
|
||||
- '43.224.176.0/22'
|
||||
- '43.224.184.0/22'
|
||||
- '43.224.200.0/21'
|
||||
@ -389,7 +383,6 @@ payload:
|
||||
- '43.230.124.0/22'
|
||||
- '43.230.220.0/22'
|
||||
- '43.230.224.0/19'
|
||||
- '43.231.12.0/22'
|
||||
- '43.231.32.0/20'
|
||||
- '43.231.80.0/20'
|
||||
- '43.231.96.0/20'
|
||||
@ -464,6 +457,16 @@ payload:
|
||||
- '43.246.64.0/19'
|
||||
- '43.246.96.0/22'
|
||||
- '43.246.147.0/24'
|
||||
- '43.246.148.0/24'
|
||||
- '43.246.150.0/24'
|
||||
- '43.246.151.0/30'
|
||||
- '43.246.151.4/32'
|
||||
- '43.246.151.6/31'
|
||||
- '43.246.151.8/29'
|
||||
- '43.246.151.16/28'
|
||||
- '43.246.151.32/27'
|
||||
- '43.246.151.64/26'
|
||||
- '43.246.151.128/25'
|
||||
- '43.246.228.0/22'
|
||||
- '43.247.4.0/22'
|
||||
- '43.247.8.0/22'
|
||||
@ -964,8 +967,8 @@ payload:
|
||||
- '101.2.172.0/22'
|
||||
- '101.4.0.0/14'
|
||||
- '101.16.0.0/12'
|
||||
- '101.32.112.0/20'
|
||||
- '101.32.128.0/17'
|
||||
- '101.32.176.0/20'
|
||||
- '101.32.192.0/18'
|
||||
- '101.33.0.0/16'
|
||||
- '101.34.0.0/15'
|
||||
- '101.36.0.0/18'
|
||||
@ -1325,7 +1328,7 @@ payload:
|
||||
- '103.43.104.0/22'
|
||||
- '103.43.124.0/22'
|
||||
- '103.43.184.0/22'
|
||||
- '103.43.192.0/21'
|
||||
- '103.43.196.0/22'
|
||||
- '103.43.208.0/22'
|
||||
- '103.43.220.0/22'
|
||||
- '103.43.224.0/22'
|
||||
@ -1392,7 +1395,6 @@ payload:
|
||||
- '103.50.48.0/20'
|
||||
- '103.50.64.0/21'
|
||||
- '103.50.72.0/22'
|
||||
- '103.50.92.0/22'
|
||||
- '103.50.108.0/22'
|
||||
- '103.50.112.0/20'
|
||||
- '103.50.132.0/22'
|
||||
@ -1755,10 +1757,11 @@ payload:
|
||||
- '103.94.88.0/22'
|
||||
- '103.94.116.0/22'
|
||||
- '103.94.160.0/22'
|
||||
- '103.94.182.0/24'
|
||||
- '103.94.200.0/22'
|
||||
- '103.95.31.0/24'
|
||||
- '103.95.28.0/24'
|
||||
- '103.95.30.0/23'
|
||||
- '103.95.52.0/22'
|
||||
- '103.95.69.0/24'
|
||||
- '103.95.70.0/23'
|
||||
- '103.95.88.0/21'
|
||||
- '103.95.136.0/21'
|
||||
@ -1849,6 +1852,7 @@ payload:
|
||||
- '103.103.72.0/22'
|
||||
- '103.103.188.0/22'
|
||||
- '103.103.204.0/22'
|
||||
- '103.103.225.0/24'
|
||||
- '103.104.36.0/22'
|
||||
- '103.104.40.0/22'
|
||||
- '103.104.64.0/22'
|
||||
@ -1924,7 +1928,6 @@ payload:
|
||||
- '103.114.100.0/22'
|
||||
- '103.114.148.0/22'
|
||||
- '103.114.156.0/23'
|
||||
- '103.114.159.0/24'
|
||||
- '103.114.212.0/22'
|
||||
- '103.114.236.0/22'
|
||||
- '103.114.240.0/22'
|
||||
@ -2040,7 +2043,7 @@ payload:
|
||||
- '103.137.180.0/22'
|
||||
- '103.137.236.0/22'
|
||||
- '103.138.2.0/23'
|
||||
- '103.138.134.0/23'
|
||||
- '103.138.135.0/24'
|
||||
- '103.138.208.0/23'
|
||||
- '103.138.220.0/23'
|
||||
- '103.138.248.0/23'
|
||||
@ -2076,6 +2079,7 @@ payload:
|
||||
- '103.143.16.0/22'
|
||||
- '103.143.31.0/24'
|
||||
- '103.143.74.0/23'
|
||||
- '103.143.120.0/24'
|
||||
- '103.143.124.0/23'
|
||||
- '103.143.132.0/22'
|
||||
- '103.143.174.0/23'
|
||||
@ -2086,12 +2090,11 @@ payload:
|
||||
- '103.144.136.0/23'
|
||||
- '103.144.158.0/23'
|
||||
- '103.145.42.0/23'
|
||||
- '103.145.92.0/22'
|
||||
- '103.145.94.0/23'
|
||||
- '103.145.98.0/23'
|
||||
- '103.145.188.0/23'
|
||||
- '103.146.6.0/23'
|
||||
- '103.146.72.0/23'
|
||||
- '103.146.91.0/24'
|
||||
- '103.146.126.0/23'
|
||||
- '103.146.138.0/23'
|
||||
- '103.146.236.0/23'
|
||||
@ -2099,6 +2102,7 @@ payload:
|
||||
- '103.147.124.0/23'
|
||||
- '103.147.198.0/23'
|
||||
- '103.147.206.0/23'
|
||||
- '103.147.211.0/24'
|
||||
- '103.148.174.0/23'
|
||||
- '103.149.6.0/23'
|
||||
- '103.149.17.0/24'
|
||||
@ -2109,7 +2113,6 @@ payload:
|
||||
- '103.149.220.0/23'
|
||||
- '103.149.242.0/23'
|
||||
- '103.149.244.0/22'
|
||||
- '103.149.248.0/23'
|
||||
- '103.150.24.0/23'
|
||||
- '103.150.66.0/23'
|
||||
- '103.150.72.0/23'
|
||||
@ -2125,21 +2128,44 @@ payload:
|
||||
- '103.151.142.0/23'
|
||||
- '103.151.148.0/22'
|
||||
- '103.151.158.0/23'
|
||||
- '103.151.178.0/23'
|
||||
- '103.151.206.0/23'
|
||||
- '103.151.216.0/23'
|
||||
- '103.151.228.0/23'
|
||||
- '103.152.14.0/23'
|
||||
- '103.152.24.0/23'
|
||||
- '103.152.28.0/22'
|
||||
- '103.152.76.0/23'
|
||||
- '103.152.80.0/23'
|
||||
- '103.152.98.0/23'
|
||||
- '103.152.112.0/23'
|
||||
- '103.152.113.0/24'
|
||||
- '103.152.120.0/22'
|
||||
- '103.152.132.0/23'
|
||||
- '103.152.152.0/23'
|
||||
- '103.152.168.0/23'
|
||||
- '103.152.186.0/23'
|
||||
- '103.152.190.0/23'
|
||||
- '103.152.192.0/23'
|
||||
- '103.152.200.0/23'
|
||||
- '103.152.208.0/23'
|
||||
- '103.152.224.0/23'
|
||||
- '103.152.247.0/24'
|
||||
- '103.152.250.0/23'
|
||||
- '103.153.4.0/23'
|
||||
- '103.153.36.0/23'
|
||||
- '103.153.99.0/24'
|
||||
- '103.153.100.0/23'
|
||||
- '103.153.114.0/23'
|
||||
- '103.153.122.0/23'
|
||||
- '103.153.128.0/23'
|
||||
- '103.153.132.0/23'
|
||||
- '103.153.138.0/23'
|
||||
- '103.153.146.0/23'
|
||||
- '103.153.160.0/23'
|
||||
- '103.154.18.0/23'
|
||||
- '103.154.30.0/23'
|
||||
- '103.154.32.0/23'
|
||||
- '103.154.40.0/23'
|
||||
- '103.154.66.0/23'
|
||||
- '103.154.162.0/23'
|
||||
- '103.154.164.0/23'
|
||||
- '103.154.168.0/23'
|
||||
- '103.154.243.0/24'
|
||||
- '103.155.14.0/23'
|
||||
- '103.155.16.0/23'
|
||||
- '103.155.34.0/23'
|
||||
- '103.192.0.0/19'
|
||||
- '103.192.48.0/21'
|
||||
- '103.192.56.0/22'
|
||||
@ -2164,7 +2190,6 @@ payload:
|
||||
- '103.193.216.0/21'
|
||||
- '103.193.224.0/20'
|
||||
- '103.194.16.0/22'
|
||||
- '103.194.230.0/23'
|
||||
- '103.195.112.0/22'
|
||||
- '103.195.152.0/22'
|
||||
- '103.195.160.0/22'
|
||||
@ -2372,7 +2397,8 @@ payload:
|
||||
- '103.220.240.0/21'
|
||||
- '103.220.252.0/22'
|
||||
- '103.221.0.0/19'
|
||||
- '103.221.32.0/21'
|
||||
- '103.221.32.0/22'
|
||||
- '103.221.40.0/24'
|
||||
- '103.221.44.0/22'
|
||||
- '103.221.88.0/22'
|
||||
- '103.221.92.0/23'
|
||||
@ -3120,7 +3146,10 @@ payload:
|
||||
- '118.26.40.0/21'
|
||||
- '118.26.48.0/20'
|
||||
- '118.26.64.0/19'
|
||||
- '118.26.112.0/20'
|
||||
- '118.26.112.0/21'
|
||||
- '118.26.121.0/24'
|
||||
- '118.26.122.0/23'
|
||||
- '118.26.124.0/23'
|
||||
- '118.26.128.0/17'
|
||||
- '118.28.0.0/15'
|
||||
- '118.30.0.0/20'
|
||||
@ -3165,8 +3194,8 @@ payload:
|
||||
- '118.178.0.0/16'
|
||||
- '118.180.0.0/14'
|
||||
- '118.184.5.0/24'
|
||||
- '118.184.10.0/24'
|
||||
- '118.184.115.0/24'
|
||||
- '118.184.109.0/24'
|
||||
- '118.184.110.0/23'
|
||||
- '118.184.116.0/22'
|
||||
- '118.184.120.0/23'
|
||||
- '118.184.122.0/24'
|
||||
@ -3321,7 +3350,10 @@ payload:
|
||||
- '120.0.0.0/12'
|
||||
- '120.24.0.0/14'
|
||||
- '120.30.0.0/15'
|
||||
- '120.32.0.0/12'
|
||||
- '120.32.0.0/13'
|
||||
- '120.40.0.0/14'
|
||||
- '120.44.0.0/15'
|
||||
- '120.46.0.0/16'
|
||||
- '120.48.0.0/15'
|
||||
- '120.52.0.0/14'
|
||||
- '120.64.0.0/13'
|
||||
@ -3375,7 +3407,7 @@ payload:
|
||||
- '121.59.28.0/24'
|
||||
- '121.59.31.0/24'
|
||||
- '121.59.33.0/24'
|
||||
- '121.59.34.0/23'
|
||||
- '121.59.35.0/24'
|
||||
- '121.59.36.0/22'
|
||||
- '121.59.40.0/21'
|
||||
- '121.59.48.0/20'
|
||||
@ -3415,7 +3447,19 @@ payload:
|
||||
- '122.48.0.0/16'
|
||||
- '122.49.0.0/18'
|
||||
- '122.51.0.0/16'
|
||||
- '122.64.0.0/11'
|
||||
- '122.64.0.0/14'
|
||||
- '122.68.0.0/15'
|
||||
- '122.70.0.0/18'
|
||||
- '122.70.64.0/19'
|
||||
- '122.70.96.0/20'
|
||||
- '122.70.112.0/21'
|
||||
- '122.70.120.0/22'
|
||||
- '122.70.124.0/23'
|
||||
- '122.70.126.0/24'
|
||||
- '122.70.128.0/17'
|
||||
- '122.71.0.0/16'
|
||||
- '122.72.0.0/13'
|
||||
- '122.80.0.0/12'
|
||||
- '122.96.0.0/15'
|
||||
- '122.98.144.0/20'
|
||||
- '122.98.160.0/21'
|
||||
@ -3471,13 +3515,7 @@ payload:
|
||||
- '123.49.136.0/22'
|
||||
- '123.49.152.0/21'
|
||||
- '123.49.160.0/19'
|
||||
- '123.49.192.0/19'
|
||||
- '123.49.224.0/20'
|
||||
- '123.49.240.0/23'
|
||||
- '123.49.243.0/24'
|
||||
- '123.49.245.0/24'
|
||||
- '123.49.246.0/23'
|
||||
- '123.49.248.0/21'
|
||||
- '123.49.192.0/18'
|
||||
- '123.50.160.0/19'
|
||||
- '123.52.0.0/14'
|
||||
- '123.56.0.0/15'
|
||||
@ -3530,8 +3568,6 @@ payload:
|
||||
- '123.242.192.0/21'
|
||||
- '123.244.0.0/14'
|
||||
- '123.249.0.0/16'
|
||||
- '123.253.109.0/24'
|
||||
- '123.253.110.0/24'
|
||||
- '123.253.240.0/22'
|
||||
- '123.254.96.0/21'
|
||||
- '124.6.64.0/18'
|
||||
@ -3550,7 +3586,13 @@ payload:
|
||||
- '124.64.0.0/15'
|
||||
- '124.66.0.0/17'
|
||||
- '124.67.0.0/16'
|
||||
- '124.68.0.0/17'
|
||||
- '124.68.0.0/19'
|
||||
- '124.68.32.0/20'
|
||||
- '124.68.48.0/21'
|
||||
- '124.68.56.0/22'
|
||||
- '124.68.60.0/23'
|
||||
- '124.68.63.0/24'
|
||||
- '124.68.64.0/18'
|
||||
- '124.68.128.0/18'
|
||||
- '124.68.192.0/19'
|
||||
- '124.68.224.0/23'
|
||||
@ -3593,7 +3635,11 @@ payload:
|
||||
- '124.151.0.0/16'
|
||||
- '124.152.0.0/16'
|
||||
- '124.160.0.0/13'
|
||||
- '124.172.0.0/14'
|
||||
- '124.172.0.0/16'
|
||||
- '124.173.32.0/19'
|
||||
- '124.173.64.0/18'
|
||||
- '124.173.128.0/17'
|
||||
- '124.174.0.0/15'
|
||||
- '124.192.0.0/15'
|
||||
- '124.196.0.0/16'
|
||||
- '124.200.0.0/13'
|
||||
@ -3646,7 +3692,7 @@ payload:
|
||||
- '132.237.134.0/24'
|
||||
- '134.175.0.0/16'
|
||||
- '135.84.247.0/24'
|
||||
- '135.84.255.0/24'
|
||||
- '135.84.254.0/23'
|
||||
- '135.159.208.0/20'
|
||||
- '135.244.80.0/20'
|
||||
- '137.59.59.0/24'
|
||||
@ -3750,6 +3796,7 @@ payload:
|
||||
- '144.211.138.0/24'
|
||||
- '144.255.0.0/16'
|
||||
- '146.56.192.0/18'
|
||||
- '146.88.175.0/24'
|
||||
- '146.196.56.0/22'
|
||||
- '146.196.68.0/22'
|
||||
- '146.196.92.0/22'
|
||||
@ -3848,7 +3895,7 @@ payload:
|
||||
- '159.75.0.0/16'
|
||||
- '159.221.232.0/22'
|
||||
- '159.226.0.0/16'
|
||||
- '160.19.208.0/21'
|
||||
- '160.19.212.0/22'
|
||||
- '160.19.216.0/22'
|
||||
- '160.20.48.0/22'
|
||||
- '160.62.10.0/24'
|
||||
@ -3872,8 +3919,9 @@ payload:
|
||||
- '161.207.0.0/16'
|
||||
- '162.14.0.0/21'
|
||||
- '162.14.12.0/22'
|
||||
- '162.14.20.0/22'
|
||||
- '162.14.24.0/21'
|
||||
- '162.14.16.0/21'
|
||||
- '162.14.26.0/23'
|
||||
- '162.14.28.0/22'
|
||||
- '162.14.32.0/19'
|
||||
- '162.14.64.0/18'
|
||||
- '162.14.128.0/17'
|
||||
@ -3901,6 +3949,7 @@ payload:
|
||||
- '163.204.0.0/16'
|
||||
- '163.244.246.0/24'
|
||||
- '164.52.80.0/24'
|
||||
- '165.84.197.0/24'
|
||||
- '165.84.251.0/25'
|
||||
- '165.84.251.128/26'
|
||||
- '165.84.251.192/27'
|
||||
@ -3925,7 +3974,6 @@ payload:
|
||||
- '170.225.224.0/23'
|
||||
- '170.252.152.0/21'
|
||||
- '171.8.0.0/13'
|
||||
- '171.22.147.0/24'
|
||||
- '171.34.0.0/15'
|
||||
- '171.36.0.0/14'
|
||||
- '171.40.0.0/13'
|
||||
@ -3977,6 +4025,7 @@ payload:
|
||||
- '180.78.0.0/15'
|
||||
- '180.84.0.0/15'
|
||||
- '180.86.0.0/16'
|
||||
- '180.87.93.98/32'
|
||||
- '180.88.0.0/14'
|
||||
- '180.94.56.0/21'
|
||||
- '180.94.96.0/20'
|
||||
@ -5625,7 +5674,6 @@ payload:
|
||||
- '211.152.140.0/22'
|
||||
- '211.152.150.0/23'
|
||||
- '211.152.157.0/24'
|
||||
- '211.152.158.0/23'
|
||||
- '211.152.160.0/19'
|
||||
- '211.152.192.0/18'
|
||||
- '211.153.0.0/16'
|
||||
@ -5697,7 +5745,13 @@ payload:
|
||||
- '218.192.0.0/12'
|
||||
- '218.240.0.0/14'
|
||||
- '218.244.0.0/15'
|
||||
- '218.246.0.0/17'
|
||||
- '218.246.0.0/19'
|
||||
- '218.246.32.0/20'
|
||||
- '218.246.48.0/21'
|
||||
- '218.246.56.0/23'
|
||||
- '218.246.58.0/24'
|
||||
- '218.246.60.0/22'
|
||||
- '218.246.64.0/18'
|
||||
- '218.246.129.0/24'
|
||||
- '218.246.131.0/24'
|
||||
- '218.246.132.0/23'
|
||||
@ -5780,12 +5834,13 @@ payload:
|
||||
- '220.242.197.0/24'
|
||||
- '220.242.205.0/24'
|
||||
- '220.242.207.0/24'
|
||||
- '220.242.216.0/21'
|
||||
- '220.242.217.0/24'
|
||||
- '220.242.218.0/23'
|
||||
- '220.242.220.0/22'
|
||||
- '220.242.224.0/19'
|
||||
- '220.243.0.0/17'
|
||||
- '220.243.128.0/18'
|
||||
- '220.243.192.0/23'
|
||||
- '220.243.194.0/24'
|
||||
- '220.243.196.0/24'
|
||||
- '220.243.198.0/23'
|
||||
- '220.243.201.0/24'
|
||||
@ -5898,7 +5953,6 @@ payload:
|
||||
- '223.166.0.0/15'
|
||||
- '223.192.0.0/15'
|
||||
- '223.198.0.0/15'
|
||||
- '223.201.4.0/22'
|
||||
- '223.201.8.0/21'
|
||||
- '223.201.16.0/20'
|
||||
- '223.201.32.0/19'
|
||||
|
||||
@ -14,6 +14,8 @@ function index()
|
||||
entry({"admin", "services", "openclash", "status"},call("action_status")).leaf=true
|
||||
entry({"admin", "services", "openclash", "state"},call("action_state")).leaf=true
|
||||
entry({"admin", "services", "openclash", "startlog"},call("action_start")).leaf=true
|
||||
entry({"admin", "services", "openclash", "close_all_connection"},call("action_close_all_connection"))
|
||||
entry({"admin", "services", "openclash", "restore_history"},call("action_restore_history"))
|
||||
entry({"admin", "services", "openclash", "currentversion"},call("action_currentversion"))
|
||||
entry({"admin", "services", "openclash", "lastversion"},call("action_lastversion"))
|
||||
entry({"admin", "services", "openclash", "update"},call("action_update"))
|
||||
@ -25,6 +27,8 @@ function index()
|
||||
entry({"admin", "services", "openclash", "ping"}, call("act_ping"))
|
||||
entry({"admin", "services", "openclash", "download_rule"}, call("action_download_rule"))
|
||||
entry({"admin", "services", "openclash", "restore"}, call("action_restore_config"))
|
||||
entry({"admin", "services", "openclash", "one_key_update"}, call("action_one_key_update"))
|
||||
entry({"admin", "services", "openclash", "one_key_update_check"}, call("action_one_key_update_check"))
|
||||
entry({"admin", "services", "openclash", "switch_mode"}, call("action_switch_mode"))
|
||||
entry({"admin", "services", "openclash", "op_mode"}, call("action_op_mode"))
|
||||
entry({"admin", "services", "openclash", "settings"},cbi("openclash/settings"),_("Global Settings"), 30).leaf = true
|
||||
@ -32,6 +36,8 @@ function index()
|
||||
entry({"admin", "services", "openclash", "rule-providers-settings"},cbi("openclash/rule-providers-settings"),_("Rule Providers and Groups"), 50).leaf = true
|
||||
entry({"admin", "services", "openclash", "game-rules-manage"},form("openclash/game-rules-manage"), nil).leaf = true
|
||||
entry({"admin", "services", "openclash", "rule-providers-manage"},form("openclash/rule-providers-manage"), nil).leaf = true
|
||||
entry({"admin", "services", "openclash", "proxy-provider-file-manage"},form("openclash/proxy-provider-file-manage"), nil).leaf = true
|
||||
entry({"admin", "services", "openclash", "rule-providers-file-manage"},form("openclash/rule-providers-file-manage"), nil).leaf = true
|
||||
entry({"admin", "services", "openclash", "config-subscribe"},cbi("openclash/config-subscribe"),_("Config Update"), 60).leaf = true
|
||||
entry({"admin", "services", "openclash", "servers-config"},cbi("openclash/servers-config"), nil).leaf = true
|
||||
entry({"admin", "services", "openclash", "groups-config"},cbi("openclash/groups-config"), nil).leaf = true
|
||||
@ -52,7 +58,12 @@ local function is_web()
|
||||
end
|
||||
|
||||
local function is_watchdog()
|
||||
return luci.sys.call("ps |grep openclash_watchdog.sh |grep -v grep >/dev/null") == 0
|
||||
local ps_version = luci.sys.exec("ps --version 2>&1 |grep -c procps-ng |tr -d '\n'")
|
||||
if ps_version == "0" then
|
||||
return luci.sys.call("ps |grep openclash_watchdog.sh |grep -v grep >/dev/null") == 0
|
||||
else
|
||||
return luci.sys.call("ps -ef |grep openclash_watchdog.sh |grep -v grep >/dev/null") == 0
|
||||
end
|
||||
end
|
||||
|
||||
local function cn_port()
|
||||
@ -79,6 +90,10 @@ local function ConnersHua_return()
|
||||
return os.date("%Y-%m-%d %H:%M:%S",fs.mtime("/etc/openclash/ConnersHua_return.yaml"))
|
||||
end
|
||||
|
||||
local function chnroute()
|
||||
return os.date("%Y-%m-%d %H:%M:%S",fs.mtime("/etc/openclash/rule_provider/ChinaIP.yaml"))
|
||||
end
|
||||
|
||||
local function daip()
|
||||
local daip = luci.sys.exec("ifstatus lan 2>/dev/null |jsonfilter -e '@[\"ipv4-address\"][0].address' 2>/dev/null")
|
||||
if not daip or daip == "" then
|
||||
@ -202,6 +217,17 @@ local function upchecktime()
|
||||
end
|
||||
end
|
||||
|
||||
local function historychecktime()
|
||||
local CONFIG_FILE = string.sub(luci.sys.exec("uci get openclash.config.config_path 2>/dev/null"), 1, -2)
|
||||
local CONFIG_NAME = fs.basename(CONFIG_FILE)
|
||||
local HISTORY_PATH = "/etc/openclash/history/" .. CONFIG_NAME
|
||||
if not nixio.fs.access(HISTORY_PATH) then
|
||||
return "0"
|
||||
else
|
||||
return os.date("%Y-%m-%d %H:%M:%S",fs.mtime(HISTORY_PATH))
|
||||
end
|
||||
end
|
||||
|
||||
function download_rule()
|
||||
local filename = luci.http.formvalue("filename")
|
||||
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_download_rule_list.sh "%s" >/dev/null 2>&1',filename))
|
||||
@ -218,6 +244,20 @@ function action_restore_config()
|
||||
luci.sys.call("cp '/usr/share/openclash/backup/openclash_custom_domain_dns.list' '/etc/openclash/custom/openclash_custom_domain_dns.list' >/dev/null 2>&1 &")
|
||||
end
|
||||
|
||||
function action_one_key_update()
|
||||
return luci.sys.call("sh /usr/share/openclash/openclash_update.sh 'one_key_update' >/dev/null 2>&1 &")
|
||||
end
|
||||
|
||||
function action_one_key_update_check()
|
||||
luci.sys.call("rm -rf /tmp/*_last_version 2>/dev/null")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json({
|
||||
corever = corever(),
|
||||
corelv = corelv(),
|
||||
oplv = oplv();
|
||||
})
|
||||
end
|
||||
|
||||
function action_op_mode()
|
||||
local op_mode = luci.sys.exec("uci get openclash.config.operation_mode 2>/dev/null |tr -d '\n'")
|
||||
luci.http.prepare_content("application/json")
|
||||
@ -259,7 +299,9 @@ function action_state()
|
||||
lhie1 = lhie1(),
|
||||
ConnersHua = ConnersHua(),
|
||||
ConnersHua_return = ConnersHua_return(),
|
||||
ipdb = ipdb();
|
||||
ipdb = ipdb(),
|
||||
historychecktime = historychecktime(),
|
||||
chnroute = chnroute();
|
||||
})
|
||||
end
|
||||
|
||||
@ -336,6 +378,14 @@ function action_core_game_update()
|
||||
})
|
||||
end
|
||||
|
||||
function action_close_all_connection()
|
||||
return luci.sys.call("sh /usr/share/openclash/openclash_history_set.sh close_all_conection")
|
||||
end
|
||||
|
||||
function action_restore_history()
|
||||
return luci.sys.call("sh /usr/share/openclash/openclash_history_set.sh")
|
||||
end
|
||||
|
||||
function act_ping()
|
||||
local e={}
|
||||
e.index=luci.http.formvalue("index")
|
||||
|
||||
@ -45,6 +45,9 @@ function config_check(CONFIG_FILE)
|
||||
rule = luci.sys.call(string.format('egrep "^ {0,}Rule:" "%s" >/dev/null 2>&1',CONFIG_FILE))
|
||||
if (rule ~= 0) then
|
||||
rule = luci.sys.call(string.format('egrep "^ {0,}rules:" "%s" >/dev/null 2>&1',CONFIG_FILE))
|
||||
if (rule ~= 0) then
|
||||
rule = luci.sys.call(string.format('egrep "^ {0,}script:" "%s" >/dev/null 2>&1',CONFIG_FILE))
|
||||
end
|
||||
end
|
||||
end
|
||||
if yaml then
|
||||
|
||||
@ -43,6 +43,9 @@ function config_check(CONFIG_FILE)
|
||||
rule = luci.sys.call(string.format('egrep "^ {0,}Rule:" "%s" >/dev/null 2>&1',CONFIG_FILE))
|
||||
if (rule ~= 0) then
|
||||
rule = luci.sys.call(string.format('egrep "^ {0,}rules:" "%s" >/dev/null 2>&1',CONFIG_FILE))
|
||||
if (rule ~= 0) then
|
||||
rule = luci.sys.call(string.format('egrep "^ {0,}script:" "%s" >/dev/null 2>&1',CONFIG_FILE))
|
||||
end
|
||||
end
|
||||
end
|
||||
if yaml then
|
||||
@ -263,137 +266,31 @@ if a then table.remove(e,t)end
|
||||
return a
|
||||
end
|
||||
|
||||
local p,r={}
|
||||
for x,y in ipairs(fs.glob("/etc/openclash/proxy_provider/*"))do
|
||||
r=fs.stat(y)
|
||||
if r then
|
||||
p[x]={}
|
||||
p[x].name=fs.basename(y)
|
||||
p[x].mtime=os.date("%Y-%m-%d %H:%M:%S",r.mtime)
|
||||
p[x].size=i(r.size)
|
||||
p[x].remove=0
|
||||
p[x].enable=false
|
||||
end
|
||||
p = SimpleForm("provider_file_manage",translate("Provider File Manage"))
|
||||
p.reset = false
|
||||
p.submit = false
|
||||
|
||||
local provider_manage = {
|
||||
{proxy_mg, rule_mg}
|
||||
}
|
||||
|
||||
promg = p:section(Table, provider_manage)
|
||||
|
||||
o = promg:option(Button, "proxy_mg")
|
||||
o.inputtitle = translate("Proxy Provider File List")
|
||||
o.inputstyle = "reload"
|
||||
o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "proxy-provider-file-manage"))
|
||||
end
|
||||
|
||||
proxy_form=SimpleForm("proxy_provider_file_list",translate("Proxy Provider File List"))
|
||||
proxy_form.reset=false
|
||||
proxy_form.submit=false
|
||||
tb1=proxy_form:section(Table,p)
|
||||
nm1=tb1:option(DummyValue,"name",translate("File Name"))
|
||||
mt1=tb1:option(DummyValue,"mtime",translate("Update Time"))
|
||||
sz1=tb1:option(DummyValue,"size",translate("Size"))
|
||||
|
||||
btndl1 = tb1:option(Button,"download1",translate("Download Configurations"))
|
||||
btndl1.template="openclash/other_button"
|
||||
btndl1.render=function(y,x,r)
|
||||
y.inputstyle="remove"
|
||||
Button.render(y,x,r)
|
||||
end
|
||||
btndl1.write = function (r,x)
|
||||
local sPath, sFile, fd, block
|
||||
sPath = "/etc/openclash/proxy_provider/"..p[x].name
|
||||
sFile = NXFS.basename(sPath)
|
||||
if fs.isdirectory(sPath) then
|
||||
fd = io.popen('tar -C "%s" -cz .' % {sPath}, "r")
|
||||
sFile = sFile .. ".tar.gz"
|
||||
else
|
||||
fd = nixio.open(sPath, "r")
|
||||
end
|
||||
if not fd then
|
||||
return
|
||||
end
|
||||
HTTP.header('Content-Disposition', 'attachment; filename="%s"' % {sFile})
|
||||
HTTP.prepare_content("application/octet-stream")
|
||||
while true do
|
||||
block = fd:read(nixio.const.buffersize)
|
||||
if (not block) or (#block ==0) then
|
||||
break
|
||||
else
|
||||
HTTP.write(block)
|
||||
end
|
||||
end
|
||||
fd:close()
|
||||
HTTP.close()
|
||||
o = promg:option(Button, "rule_mg")
|
||||
o.inputtitle = translate("Rule Providers File List")
|
||||
o.inputstyle = "reload"
|
||||
o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "rule-providers-file-manage"))
|
||||
end
|
||||
|
||||
btnrm1=tb1:option(Button,"remove1",translate("Remove"))
|
||||
btnrm1.render=function(p,x,r)
|
||||
p.inputstyle="reset"
|
||||
Button.render(p,x,r)
|
||||
end
|
||||
btnrm1.write=function(r,x)
|
||||
local r=fs.unlink("/etc/openclash/proxy_provider/"..luci.openclash.basename(p[x].name))
|
||||
if r then table.remove(p,x)end
|
||||
return r
|
||||
end
|
||||
|
||||
local g,h={}
|
||||
for n,m in ipairs(fs.glob("/etc/openclash/rule_provider/*"))do
|
||||
h=fs.stat(m)
|
||||
if h then
|
||||
g[n]={}
|
||||
g[n].name=fs.basename(m)
|
||||
g[n].mtime=os.date("%Y-%m-%d %H:%M:%S",h.mtime)
|
||||
g[n].size=i(h.size)
|
||||
g[n].remove=0
|
||||
g[n].enable=false
|
||||
end
|
||||
end
|
||||
|
||||
rule_form=SimpleForm("rule_provider_file_list",translate("Rule Providers File List"))
|
||||
rule_form.reset=false
|
||||
rule_form.submit=false
|
||||
tb2=rule_form:section(Table,g)
|
||||
nm2=tb2:option(DummyValue,"name",translate("File Name"))
|
||||
mt2=tb2:option(DummyValue,"mtime",translate("Update Time"))
|
||||
sz2=tb2:option(DummyValue,"size",translate("Size"))
|
||||
|
||||
btndl2 = tb2:option(Button,"download2",translate("Download Configurations"))
|
||||
btndl2.template="openclash/other_button"
|
||||
btndl2.render=function(m,n,h)
|
||||
m.inputstyle="remove"
|
||||
Button.render(m,n,h)
|
||||
end
|
||||
btndl2.write = function (h,n)
|
||||
local sPath, sFile, fd, block
|
||||
sPath = "/etc/openclash/rule_provider/"..g[n].name
|
||||
sFile = NXFS.basename(sPath)
|
||||
if fs.isdirectory(sPath) then
|
||||
fd = io.popen('tar -C "%s" -cz .' % {sPath}, "r")
|
||||
sFile = sFile .. ".tar.gz"
|
||||
else
|
||||
fd = nixio.open(sPath, "r")
|
||||
end
|
||||
if not fd then
|
||||
return
|
||||
end
|
||||
HTTP.header('Content-Disposition', 'attachment; filename="%s"' % {sFile})
|
||||
HTTP.prepare_content("application/octet-stream")
|
||||
while true do
|
||||
block = fd:read(nixio.const.buffersize)
|
||||
if (not block) or (#block ==0) then
|
||||
break
|
||||
else
|
||||
HTTP.write(block)
|
||||
end
|
||||
end
|
||||
fd:close()
|
||||
HTTP.close()
|
||||
end
|
||||
|
||||
btnrm2=tb2:option(Button,"remove2",translate("Remove"))
|
||||
btnrm2.render=function(g,n,h)
|
||||
g.inputstyle="reset"
|
||||
Button.render(g,n,h)
|
||||
end
|
||||
btnrm2.write=function(h,n)
|
||||
local h=fs.unlink("/etc/openclash/rule_provider/"..luci.openclash.basename(g[n].name))
|
||||
if h then table.remove(g,n)end
|
||||
return h
|
||||
end
|
||||
|
||||
m = SimpleForm("openclash")
|
||||
m = SimpleForm("config_file_edit",translate("Config File Edit"))
|
||||
m.reset = false
|
||||
m.submit = false
|
||||
|
||||
@ -461,4 +358,4 @@ o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash"))
|
||||
end
|
||||
|
||||
return ful , form , proxy_form , rule_form , m
|
||||
return ful , form , p , m
|
||||
|
||||
@ -76,6 +76,11 @@ o:depends("type", "url-test")
|
||||
o:depends("type", "fallback")
|
||||
o:depends("type", "load-balance")
|
||||
|
||||
o = s:option(Value, "tolerance", translate("Tolerance(ms)"))
|
||||
o.default = "150"
|
||||
o.rmempty = true
|
||||
o:depends("type", "url-test")
|
||||
|
||||
o = s:option(DynamicList, "other_group", translate("Other Group"))
|
||||
o.description = font_red..bold_on..translate("The Added Proxy Groups Must Exist Except 'DIRECT' & 'REJECT'")..bold_off..font_off
|
||||
uci:foreach("openclash", "groups",
|
||||
@ -100,7 +105,7 @@ o.inputtitle = translate("Commit Configurations")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
m.uci:commit(openclash)
|
||||
sys.call("/usr/share/openclash/yml_groups_name_ch.sh start")
|
||||
sys.call("/usr/share/openclash/yml_groups_name_ch.sh")
|
||||
luci.http.redirect(m.redirect)
|
||||
end
|
||||
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
|
||||
local proxy_form
|
||||
local openclash = "openclash"
|
||||
local NXFS = require "nixio.fs"
|
||||
local SYS = require "luci.sys"
|
||||
local HTTP = require "luci.http"
|
||||
local DISP = require "luci.dispatcher"
|
||||
local UTIL = require "luci.util"
|
||||
local fs = require "luci.openclash"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
|
||||
local function i(e)
|
||||
local t=0
|
||||
local a={' KB',' MB',' GB',' TB'}
|
||||
repeat
|
||||
e=e/1024
|
||||
t=t+1
|
||||
until(e<=1024)
|
||||
return string.format("%.1f",e)..a[t]
|
||||
end
|
||||
|
||||
local p,r={}
|
||||
for x,y in ipairs(fs.glob("/etc/openclash/proxy_provider/*"))do
|
||||
r=fs.stat(y)
|
||||
if r then
|
||||
p[x]={}
|
||||
p[x].name=fs.basename(y)
|
||||
p[x].mtime=os.date("%Y-%m-%d %H:%M:%S",r.mtime)
|
||||
p[x].size=i(r.size)
|
||||
p[x].remove=0
|
||||
p[x].enable=false
|
||||
end
|
||||
end
|
||||
|
||||
proxy_form=SimpleForm("proxy_provider_file_list",translate("Proxy Provider File List"))
|
||||
proxy_form.reset=false
|
||||
proxy_form.submit=false
|
||||
tb1=proxy_form:section(Table,p)
|
||||
nm1=tb1:option(DummyValue,"name",translate("File Name"))
|
||||
mt1=tb1:option(DummyValue,"mtime",translate("Update Time"))
|
||||
sz1=tb1:option(DummyValue,"size",translate("Size"))
|
||||
|
||||
btndl1 = tb1:option(Button,"download1",translate("Download Configurations"))
|
||||
btndl1.template="openclash/other_button"
|
||||
btndl1.render=function(y,x,r)
|
||||
y.inputstyle="remove"
|
||||
Button.render(y,x,r)
|
||||
end
|
||||
btndl1.write = function (r,x)
|
||||
local sPath, sFile, fd, block
|
||||
sPath = "/etc/openclash/proxy_provider/"..p[x].name
|
||||
sFile = NXFS.basename(sPath)
|
||||
if fs.isdirectory(sPath) then
|
||||
fd = io.popen('tar -C "%s" -cz .' % {sPath}, "r")
|
||||
sFile = sFile .. ".tar.gz"
|
||||
else
|
||||
fd = nixio.open(sPath, "r")
|
||||
end
|
||||
if not fd then
|
||||
return
|
||||
end
|
||||
HTTP.header('Content-Disposition', 'attachment; filename="%s"' % {sFile})
|
||||
HTTP.prepare_content("application/octet-stream")
|
||||
while true do
|
||||
block = fd:read(nixio.const.buffersize)
|
||||
if (not block) or (#block ==0) then
|
||||
break
|
||||
else
|
||||
HTTP.write(block)
|
||||
end
|
||||
end
|
||||
fd:close()
|
||||
HTTP.close()
|
||||
end
|
||||
|
||||
btnrm1=tb1:option(Button,"remove1",translate("Remove"))
|
||||
btnrm1.render=function(p,x,r)
|
||||
p.inputstyle="reset"
|
||||
Button.render(p,x,r)
|
||||
end
|
||||
btnrm1.write=function(r,x)
|
||||
local r=fs.unlink("/etc/openclash/proxy_provider/"..luci.openclash.basename(p[x].name))
|
||||
if r then table.remove(p,x)end
|
||||
return r
|
||||
end
|
||||
|
||||
local t = {
|
||||
{Refresh, Delete_all, Apply}
|
||||
}
|
||||
|
||||
a = proxy_form:section(Table, t)
|
||||
|
||||
o = a:option(Button, "Refresh")
|
||||
o.inputtitle = translate("Refresh Page")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "proxy-provider-file-manage"))
|
||||
end
|
||||
|
||||
o = a:option(Button, "Delete_all")
|
||||
o.inputtitle = translate("Delete All File")
|
||||
o.inputstyle = "remove"
|
||||
o.write = function()
|
||||
luci.sys.call("rm -rf /etc/openclash/proxy_provider/* >/dev/null 2>&1")
|
||||
end
|
||||
|
||||
o = a:option(Button, "Apply")
|
||||
o.inputtitle = translate("Back Configurations")
|
||||
o.inputstyle = "reset"
|
||||
o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "config"))
|
||||
end
|
||||
|
||||
return proxy_form
|
||||
@ -113,7 +113,7 @@ o.inputtitle = translate("Commit Configurations")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
m.uci:commit(openclash)
|
||||
sys.call("/usr/share/openclash/yml_groups_name_ch.sh start")
|
||||
sys.call("/usr/share/openclash/yml_groups_name_ch.sh")
|
||||
luci.http.redirect(m.redirect)
|
||||
end
|
||||
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
|
||||
local rule_form
|
||||
local openclash = "openclash"
|
||||
local NXFS = require "nixio.fs"
|
||||
local SYS = require "luci.sys"
|
||||
local HTTP = require "luci.http"
|
||||
local DISP = require "luci.dispatcher"
|
||||
local UTIL = require "luci.util"
|
||||
local fs = require "luci.openclash"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
|
||||
local function i(e)
|
||||
local t=0
|
||||
local a={' KB',' MB',' GB',' TB'}
|
||||
repeat
|
||||
e=e/1024
|
||||
t=t+1
|
||||
until(e<=1024)
|
||||
return string.format("%.1f",e)..a[t]
|
||||
end
|
||||
|
||||
local g,h={}
|
||||
for n,m in ipairs(fs.glob("/etc/openclash/rule_provider/*"))do
|
||||
h=fs.stat(m)
|
||||
if h then
|
||||
g[n]={}
|
||||
g[n].name=fs.basename(m)
|
||||
g[n].mtime=os.date("%Y-%m-%d %H:%M:%S",h.mtime)
|
||||
g[n].size=i(h.size)
|
||||
g[n].remove=0
|
||||
g[n].enable=false
|
||||
end
|
||||
end
|
||||
|
||||
rule_form=SimpleForm("rule_provider_file_list",translate("Rule Providers File List"))
|
||||
rule_form.reset=false
|
||||
rule_form.submit=false
|
||||
tb2=rule_form:section(Table,g)
|
||||
nm2=tb2:option(DummyValue,"name",translate("File Name"))
|
||||
mt2=tb2:option(DummyValue,"mtime",translate("Update Time"))
|
||||
sz2=tb2:option(DummyValue,"size",translate("Size"))
|
||||
|
||||
btndl2 = tb2:option(Button,"download2",translate("Download Configurations"))
|
||||
btndl2.template="openclash/other_button"
|
||||
btndl2.render=function(m,n,h)
|
||||
m.inputstyle="remove"
|
||||
Button.render(m,n,h)
|
||||
end
|
||||
btndl2.write = function (h,n)
|
||||
local sPath, sFile, fd, block
|
||||
sPath = "/etc/openclash/rule_provider/"..g[n].name
|
||||
sFile = NXFS.basename(sPath)
|
||||
if fs.isdirectory(sPath) then
|
||||
fd = io.popen('tar -C "%s" -cz .' % {sPath}, "r")
|
||||
sFile = sFile .. ".tar.gz"
|
||||
else
|
||||
fd = nixio.open(sPath, "r")
|
||||
end
|
||||
if not fd then
|
||||
return
|
||||
end
|
||||
HTTP.header('Content-Disposition', 'attachment; filename="%s"' % {sFile})
|
||||
HTTP.prepare_content("application/octet-stream")
|
||||
while true do
|
||||
block = fd:read(nixio.const.buffersize)
|
||||
if (not block) or (#block ==0) then
|
||||
break
|
||||
else
|
||||
HTTP.write(block)
|
||||
end
|
||||
end
|
||||
fd:close()
|
||||
HTTP.close()
|
||||
end
|
||||
|
||||
btnrm2=tb2:option(Button,"remove2",translate("Remove"))
|
||||
btnrm2.render=function(g,n,h)
|
||||
g.inputstyle="reset"
|
||||
Button.render(g,n,h)
|
||||
end
|
||||
btnrm2.write=function(h,n)
|
||||
local h=fs.unlink("/etc/openclash/rule_provider/"..luci.openclash.basename(g[n].name))
|
||||
if h then table.remove(g,n)end
|
||||
return h
|
||||
end
|
||||
|
||||
local t = {
|
||||
{Refresh, Delete_all, Apply}
|
||||
}
|
||||
|
||||
a = rule_form:section(Table, t)
|
||||
|
||||
o = a:option(Button, "Refresh")
|
||||
o.inputtitle = translate("Refresh Page")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "rule-providers-file-manage"))
|
||||
end
|
||||
|
||||
o = a:option(Button, "Delete_all")
|
||||
o.inputtitle = translate("Delete All File")
|
||||
o.inputstyle = "remove"
|
||||
o.write = function()
|
||||
luci.sys.call("rm -rf /etc/openclash/rule_provider/* >/dev/null 2>&1")
|
||||
end
|
||||
|
||||
o = a:option(Button, "Apply")
|
||||
o.inputtitle = translate("Back Configurations")
|
||||
o.inputstyle = "reset"
|
||||
o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "config"))
|
||||
end
|
||||
|
||||
return rule_form
|
||||
@ -33,6 +33,7 @@ end
|
||||
s:tab("dashboard", translate("Dashboard Settings"))
|
||||
s:tab("rules_update", translate("Rules Update"))
|
||||
s:tab("geo_update", translate("GEOIP Update"))
|
||||
s:tab("chnr_update", translate("Chnroute Update"))
|
||||
s:tab("version_update", translate("Version Update"))
|
||||
s:tab("debug", translate("Debug Logs"))
|
||||
|
||||
@ -170,7 +171,6 @@ o = s:taboption("dns", ListValue, "ipv6_enable", translate("Enable ipv6 Resolve"
|
||||
o.description = font_red..bold_on..translate("Enable Clash to Resolve ipv6 DNS Requests")..bold_off..font_off
|
||||
o:value("0", translate("Disable"))
|
||||
o:value("1", translate("Enable"))
|
||||
o:depends("en_mode", "redir-host")
|
||||
o.default=0
|
||||
|
||||
o = s:taboption("dns", ListValue, "disable_masq_cache", translate("Disable Dnsmasq's DNS Cache"))
|
||||
@ -218,7 +218,7 @@ end
|
||||
end
|
||||
|
||||
o = s:taboption("dns", Value, "custom_domain_dns_server", translate("Specify DNS Server"))
|
||||
o.description = translate("Specify DNS Server For List, Only One IP Server Address Support")
|
||||
o.description = translate("Specify DNS Server For List and Server Nodes With Fake-IP Mode, Only One IP Server Address Support")
|
||||
o.default="114.114.114.114"
|
||||
o.placeholder = translate("114.114.114.114 or 127.0.0.1#5300")
|
||||
o:depends("dns_advanced_setting", "1")
|
||||
@ -361,12 +361,6 @@ o:depends("rule_source", "lhie1")
|
||||
end
|
||||
file:seek("set")
|
||||
o = s:taboption("rules", ListValue, "PayPal", translate("PayPal"))
|
||||
o:depends("rule_source", "lhie1")
|
||||
for l in file:lines() do
|
||||
o:value(l)
|
||||
end
|
||||
file:seek("set")
|
||||
o = s:taboption("rules", ListValue, "Netease_Music", translate("Netease Music"))
|
||||
o:depends("rule_source", "lhie1")
|
||||
for l in file:lines() do
|
||||
o:value(l)
|
||||
@ -465,6 +459,42 @@ o.write = function()
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash"))
|
||||
end
|
||||
|
||||
if op_mode == "redir-host" then
|
||||
o = s:taboption("chnr_update", ListValue, "chnr_auto_update", translate("Auto Update"))
|
||||
o.description = translate("Auto Update Chnroute Lists")
|
||||
o:value("0", translate("Disable"))
|
||||
o:value("1", translate("Enable"))
|
||||
o.default=0
|
||||
|
||||
o = s:taboption("chnr_update", ListValue, "chnr_update_week_time", translate("Update Time (Every Week)"))
|
||||
o:value("*", translate("Every Day"))
|
||||
o:value("1", translate("Every Monday"))
|
||||
o:value("2", translate("Every Tuesday"))
|
||||
o:value("3", translate("Every Wednesday"))
|
||||
o:value("4", translate("Every Thursday"))
|
||||
o:value("5", translate("Every Friday"))
|
||||
o:value("6", translate("Every Saturday"))
|
||||
o:value("0", translate("Every Sunday"))
|
||||
o.default=1
|
||||
|
||||
o = s:taboption("chnr_update", ListValue, "chnr_update_day_time", translate("Update time (every day)"))
|
||||
for t = 0,23 do
|
||||
o:value(t, t..":00")
|
||||
end
|
||||
o.default=0
|
||||
|
||||
o = s:taboption("chnr_update", Button, translate("Chnroute Lists Update"))
|
||||
o.title = translate("Update Chnroute Lists")
|
||||
o.inputtitle = translate("Check And Update")
|
||||
o.inputstyle = "reload"
|
||||
o.write = function()
|
||||
m.uci:set("openclash", "config", "enable", 1)
|
||||
m.uci:commit("openclash")
|
||||
SYS.call("/usr/share/openclash/openclash_chnroute.sh >/dev/null 2>&1 &")
|
||||
HTTP.redirect(DISP.build_url("admin", "services", "openclash"))
|
||||
end
|
||||
end
|
||||
|
||||
---- Dashboard Settings
|
||||
local lan_ip=SYS.exec("uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null |tr -d '\n'")
|
||||
local cn_port=SYS.exec("uci get openclash.config.cn_port 2>/dev/null |tr -d '\n'")
|
||||
|
||||
@ -6,8 +6,9 @@
|
||||
<b> 组件的状态显示,运行前请确保各项目显示正常,需要更新请到全局设置页面操作 </b>
|
||||
</p>
|
||||
</td></tr>
|
||||
<tr><td width="25%"> GEOIP(By MaxMind)数据库日期 </td><td width="25%" align="left" id="_ipdb"><%:Collecting data...%></td><td width="25%"> lhie1 规则更新日期 </td><td width="25%" align="left" id="_lhie1"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"> 策略组节点选择 备份日期 </td><td width="25%" align="left" id="_historychecktime"><%:Collecting data...%></td><td width="25%"> lhie1 规则更新日期 </td><td width="25%" align="left" id="_lhie1"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"> ConnersHua 规则更新日期 </td><td width="25%" align="left" id="_ConnersHua"><%:Collecting data...%></td><td width="25%"> ConnersHua 回国规则更新日期 </td><td width="25%" align="left" id="_ConnersHua_return"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"> 大陆IP白名单 更新日期 </td><td width="25%" align="left" id="_chnroute"><%:Collecting data...%></td><td width="25%"> GEOIP(By MaxMind)数据库日期 </td><td width="25%" align="left" id="_ipdb"><%:Collecting data...%></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@ -16,12 +17,21 @@
|
||||
var lhie1 = document.getElementById('_lhie1');
|
||||
var ConnersHua = document.getElementById('_ConnersHua');
|
||||
var ConnersHua_return = document.getElementById('_ConnersHua_return');
|
||||
var chnroute = document.getElementById('_chnroute');
|
||||
var historychecktime = document.getElementById('_historychecktime');
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "state")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
ipdb.innerHTML = status.ipdb ? "<b><font color=green>"+status.ipdb+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
lhie1.innerHTML = status.lhie1 ? "<b><font color=green>"+status.lhie1+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
ConnersHua.innerHTML = status.ConnersHua ? "<b><font color=green>"+status.ConnersHua+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
ConnersHua_return.innerHTML = status.ConnersHua_return ? "<b><font color=green>"+status.ConnersHua_return+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
chnroute.innerHTML = status.chnroute ? "<b><font color=green>"+status.chnroute+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
if ( status.historychecktime != "0" ) {
|
||||
historychecktime.innerHTML = "<b><font color=green>"+status.historychecktime+"</font></b>";
|
||||
}
|
||||
else {
|
||||
historychecktime.innerHTML = "<b><font color=green>"+"<%:暂未备份%>"+"</font></b>";
|
||||
}
|
||||
}
|
||||
});
|
||||
XHR.poll(10, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "state")%>', null, function(x, status) {
|
||||
@ -30,6 +40,13 @@
|
||||
lhie1.innerHTML = status.lhie1 ? "<b><font color=green>"+status.lhie1+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
ConnersHua.innerHTML = status.ConnersHua ? "<b><font color=green>"+status.ConnersHua+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
ConnersHua_return.innerHTML = status.ConnersHua_return ? "<b><font color=green>"+status.ConnersHua_return+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
chnroute.innerHTML = status.chnroute ? "<b><font color=green>"+status.chnroute+"</font></b>" : "<b><font color=red>"+"<%:File Not Exist%>"+"</font></b>";
|
||||
if ( status.historychecktime != "0" ) {
|
||||
historychecktime.innerHTML = "<b><font color=green>"+status.historychecktime+"</font></b>";
|
||||
}
|
||||
else {
|
||||
historychecktime.innerHTML = "<b><font color=green>"+"<%:暂未备份%>"+"</font></b>";
|
||||
}
|
||||
}
|
||||
});
|
||||
//]]></script>
|
||||
@ -31,6 +31,7 @@
|
||||
<tr><td width="25%"> OpenClash 守护程序 </td><td width="25%" align="left" id="_watchdog"><%:Collecting data...%></td><td width="25%"> 控制面板登录端口 </td><td width="25%" align="left" id="_dapo"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"> OpenClash 运行模式 </td><td width="25%" align="left" id="_mode"><%:Collecting data...%></td><td width="25%"> 控制面板登录密钥 </td><td width="25%" align="left" id="_dase"><%:Collecting data...%></td></tr>
|
||||
<tr><td width="25%"> Yacd 控制面板 </td><td width="25%" align="left" id="_web"><%:Collecting data...%></td><td width="25%"> Dashboard 控制面板 </td><td width="25%" align="left" id="_webo"><%:Collecting data...%></td></tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@ -44,6 +45,9 @@
|
||||
var dase = document.getElementById('_dase');
|
||||
var dapo = document.getElementById('_dapo');
|
||||
var clashversion = document.getElementById('_clashversion');
|
||||
var close_all_connection = document.getElementById('_close_all_connection');
|
||||
var restore_history = document.getElementById('_restore_history');
|
||||
var get_history = document.getElementById('_get_history');
|
||||
|
||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
@ -97,6 +101,43 @@
|
||||
}
|
||||
}
|
||||
|
||||
function b_close_all_connection(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:正在重置...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "close_all_connection")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:重置所有链接%>';
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function b_restore_history(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:正在还原...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "restore_history")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:手动还原策略组选择%>';
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function b_get_history(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:正在保存...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "get_history")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:手动保存策略组选择%>';
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function ycad_dashboard(btn)
|
||||
{
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', status.cn_port, function(x, status) {
|
||||
|
||||
@ -44,10 +44,15 @@
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section">
|
||||
<table width="100%">
|
||||
<tr><td width="100%" colspan="4">
|
||||
<tr><td width="50%" colspan="2">
|
||||
<p align="center" id="restore">
|
||||
<%:Collecting data...%>
|
||||
</p>
|
||||
</td>
|
||||
<td width="50%" colspan="2">
|
||||
<p align="center" id="one_key_update">
|
||||
<%:Collecting data...%>
|
||||
</p>
|
||||
</td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
@ -75,6 +80,7 @@
|
||||
var ma_core_game_up = document.getElementById('ma_core_game_up');
|
||||
var ma_op_up = document.getElementById('ma_op_up');
|
||||
var restore = document.getElementById('restore');
|
||||
var one_key_update = document.getElementById('one_key_update');
|
||||
|
||||
XHR.poll(6, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "update")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
@ -181,6 +187,7 @@
|
||||
ma_core_game_up.innerHTML = '<input type="button" class="cbi-button cbi-button-reload" value="<%:下载到本地%>" onclick="return ma_core_game_update(this)"/>';
|
||||
ma_op_up.innerHTML = '<input type="button" class="cbi-button cbi-button-reload" value="<%:下载到本地%>" onclick="return ma_op_update(this)"/>';
|
||||
restore.innerHTML = '<input type="button" class="cbi-button cbi-button-reset" value="<%:还原默认配置%>" onclick="return restore_config(this)"/>';
|
||||
one_key_update.innerHTML = '<input type="button" class="cbi-button cbi-button-reset" value="<%:一键检查更新%>" onclick="return all_one_key_update(this)"/>';
|
||||
|
||||
function winOpen(url)
|
||||
{
|
||||
@ -307,7 +314,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
function restore_config(btn)
|
||||
function restore_config(btn)
|
||||
{
|
||||
btn.value = '<%:还原默认配置%>';
|
||||
btn.disabled = true;
|
||||
@ -329,6 +336,39 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
function all_one_key_update(btn)
|
||||
{
|
||||
btn.value = '<%:一键检查更新%>';
|
||||
btn.disabled = true;
|
||||
var r = confirm("确定要一键检查并更新所有内核及插件吗?")
|
||||
if (r == true) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update_check")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.corever != "0\n" ) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "one_key_update")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
alert('一键检查更新正在进行...')
|
||||
}
|
||||
else {
|
||||
alert('一键检查更新失败,请稍后再试!')
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
alert('未选择编译版本,请到常规设置标签中配置!')
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert('一键检查更新失败,请稍后再试!')
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
}
|
||||
btn.disabled = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
XHR.poll(7, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', status.startlog, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.startlog == "\n" || status.startlog == "" ) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/cfg_servers_address_fake_filter.sh)
|
||||
status=$(unify_ps_status "cfg_servers_address_fake_filter.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
cfg_unused_servers_del()
|
||||
{
|
||||
@ -15,7 +16,7 @@ cfg_unused_servers_del()
|
||||
uci delete openclash."$section" 2>/dev/null
|
||||
}
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/cfg_unused_servers_del.sh)
|
||||
status=$(unify_ps_status "cfg_unused_servers_del.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
config_load "openclash"
|
||||
config_foreach cfg_unused_servers_del "servers"
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
#禁止多个实例
|
||||
status=$(ps|grep -c /usr/share/openclash/clash_version.sh)
|
||||
status=$(unify_ps_status "clash_version.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
CKTIME=$(date "+%Y-%m-%d-%H")
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/openclash.sh)
|
||||
status=$(unify_ps_status "openclash.sh")
|
||||
[ "$status" -gt 3 ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
@ -27,10 +28,11 @@ urlencode() {
|
||||
}
|
||||
|
||||
kill_watchdog() {
|
||||
watchdog_pids=$(ps |grep openclash_watchdog.sh |grep -v grep |awk '{print $1}' 2>/dev/null)
|
||||
for watchdog_pid in $watchdog_pids; do
|
||||
kill -9 "$watchdog_pid" >/dev/null 2>&1
|
||||
done
|
||||
|
||||
watchdog_pids=$(unify_ps_pids "openclash_watchdog.sh")
|
||||
for watchdog_pid in $watchdog_pids; do
|
||||
kill -9 "$watchdog_pid" >/dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
config_download()
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(unify_ps_status "openclash_chnroute.sh")
|
||||
[ "$status" -gt 3 ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
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)
|
||||
china_ip_route=$(uci get openclash.config.china_ip_route 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
|
||||
echo "开始下载大陆IP白名单..." >$START_LOG
|
||||
if pidof clash >/dev/null; then
|
||||
curl -sL --connect-timeout 10 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/ChinaIP.yaml -o /tmp/ChinaIP.yaml >/dev/null 2>&1
|
||||
else
|
||||
curl -sL --connect-timeout 10 --retry 2 https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/ChinaIP.yaml -o /tmp/ChinaIP.yaml >/dev/null 2>&1
|
||||
fi
|
||||
if [ "$?" -eq "0" ] && [ -s "/tmp/ChinaIP.yaml" ]; then
|
||||
echo "大陆IP白名单下载成功,检查版本是否更新..." >$START_LOG
|
||||
cmp -s /tmp/ChinaIP.yaml /etc/openclash/rule_provider/ChinaIP.yaml
|
||||
if [ "$?" -ne "0" ]; then
|
||||
status=$(unify_ps_prevent)
|
||||
while ( [ "$status" -gt 1 ] )
|
||||
do
|
||||
sleep 5
|
||||
status=$(unify_ps_prevent)
|
||||
done
|
||||
[ "$china_ip_route" -eq 1 ] && /etc/init.d/openclash stop
|
||||
echo "大陆IP白名单有更新,开始替换旧版本..." >$START_LOG\
|
||||
&& mv /tmp/ChinaIP.yaml /etc/openclash/rule_provider/ChinaIP.yaml >/dev/null 2>&1\
|
||||
&& echo "删除下载缓存..." >$START_LOG\
|
||||
&& rm -rf /tmp/ChinaIP.yaml >/dev/null 2>&1\
|
||||
&& rm -rf /etc/openclash/china_ip_route.ipset >/dev/null 2>&1
|
||||
[ "$china_ip_route" -eq 1 ] && /etc/init.d/openclash start
|
||||
echo "大陆IP白名单更新成功!" >$START_LOG
|
||||
echo "${LOGTIME} Chnroute Lists Update Successful" >>$LOG_FILE
|
||||
sleep 10
|
||||
echo "" >$START_LOG
|
||||
else
|
||||
echo "大陆IP白名单没有更新,停止继续操作..." >$START_LOG
|
||||
echo "${LOGTIME} Updated Chnroute Lists No Change, Do Nothing" >>$LOG_FILE
|
||||
rm -rf /tmp/ChinaIP.yaml >/dev/null 2>&1
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
fi
|
||||
else
|
||||
echo "大陆IP白名单下载失败,请检查网络或稍后再试!" >$START_LOG
|
||||
rm -rf /tmp/ChinaIP.yaml >/dev/null 2>&1
|
||||
echo "${LOGTIME} Chnroute Lists Update Error" >>$LOG_FILE
|
||||
sleep 10
|
||||
echo "" >$START_LOG
|
||||
fi
|
||||
@ -5,11 +5,12 @@ START_LOG="/tmp/openclash_start.log"
|
||||
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
CORE_TYPE="$1"
|
||||
[ -z "$CORE_TYPE" ] && CORE_TYPE="Dev"
|
||||
[ -z "$CORE_TYPE" ] || [ "$1" = "one_key_update" ] && CORE_TYPE="Dev"
|
||||
en_mode=$(uci get openclash.config.en_mode 2>/dev/null)
|
||||
CPU_MODEL=$(uci get openclash.config.core_version 2>/dev/null)
|
||||
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)
|
||||
mkdir -p /etc/openclash/core
|
||||
|
||||
[ -s "/tmp/openclash.auth" ] && {
|
||||
PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null)
|
||||
@ -19,6 +20,13 @@ case $CORE_TYPE in
|
||||
"Tun")
|
||||
CORE_CV=$(/etc/openclash/core/clash_tun -v 2>/dev/null |awk -F ' ' '{print $2}')
|
||||
CORE_LV=$(sed -n 2p /tmp/clash_last_version 2>/dev/null)
|
||||
if [ -z "$CORE_LV" ]; then
|
||||
echo "获取【Tun】内核最新版本信息失败,请稍后再试..." >$START_LOG
|
||||
echo "${LOGTIME} 【Tun】Core Version Check Error, Please Try Again After A few seconds" >>$LOG_FILE
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
exit 0
|
||||
fi
|
||||
if [ "$en_mode" = "fake-ip-tun" ] || [ "$en_mode" = "redir-host-tun" ] || [ "$en_mode" = "redir-host-mix" ] || [ "$en_mode" = "fake-ip-mix" ]; then
|
||||
if_restart=1
|
||||
fi
|
||||
@ -39,6 +47,7 @@ case $CORE_TYPE in
|
||||
esac
|
||||
|
||||
[ -z "$(pidof clash)" ] && if_restart=0
|
||||
[ -n "$2" ] || [ "$1" = "one_key_update" ] && if_restart=0
|
||||
|
||||
if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
if [ "$CPU_MODEL" != 0 ]; then
|
||||
@ -72,6 +81,7 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
esac
|
||||
fi
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "【"$CORE_TYPE"】版本内核下载成功,开始更新..." >$START_LOG
|
||||
case $CORE_TYPE in
|
||||
"Tun")
|
||||
[ -s "/tmp/clash_tun.gz" ] && {
|
||||
@ -84,7 +94,8 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
;;
|
||||
"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
|
||||
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 /etc/openclash/core/clash_game >/dev/null 2>&1
|
||||
chmod 4755 /tmp/clash_game >/dev/null 2>&1
|
||||
@ -93,19 +104,36 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
;;
|
||||
*)
|
||||
[ -s "/tmp/clash.tar.gz" ] && {
|
||||
tar zxvf /tmp/clash.tar.gz -C /tmp
|
||||
rm -rf /tmp/clash.tar.gz >/dev/null 2>&1
|
||||
rm -rf /etc/openclash/core/clash >/dev/null 2>&1
|
||||
chmod 4755 /tmp/clash >/dev/null 2>&1
|
||||
chown root:root /tmp/clash >/dev/null 2>&1
|
||||
tar zxvf /tmp/clash.tar.gz -C /etc/openclash/core
|
||||
rm -rf /tmp/clash.tar.gz >/dev/null 2>&1
|
||||
chmod 4755 /etc/openclash/core/clash >/dev/null 2>&1
|
||||
chown root:root /etc/openclash/core/clash >/dev/null 2>&1
|
||||
}
|
||||
esac
|
||||
mkdir -p /etc/openclash/core
|
||||
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "【"$CORE_TYPE"】版本内核更新失败,请检查网络或稍后再试!" >$START_LOG
|
||||
echo "${LOGTIME} OpenClash 【"$CORE_TYPE"】 Core Update Error" >>$LOG_FILE
|
||||
case $CORE_TYPE in
|
||||
"Tun")
|
||||
rm -rf /tmp/clash_tun >/dev/null 2>&1
|
||||
;;
|
||||
"Game")
|
||||
rm -rf /tmp/clash_game >/dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
esac
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$if_restart" -eq 1 ]; then
|
||||
kill -9 "$(pidof clash|sed 's/$//g')" 2>/dev/null
|
||||
/etc/init.d/openclash stop
|
||||
fi
|
||||
echo "【"$CORE_TYPE"】版本内核下载成功,开始更新..." >$START_LOG
|
||||
|
||||
case $CORE_TYPE in
|
||||
"Tun")
|
||||
mv /tmp/clash_tun /etc/openclash/core/clash_tun >/dev/null 2>&1
|
||||
@ -114,12 +142,15 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
mv /tmp/clash_game /etc/openclash/core/clash_game >/dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
mv /tmp/clash /etc/openclash/core/clash >/dev/null 2>&1
|
||||
esac
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "【"$CORE_TYPE"】版本内核更新成功!" >$START_LOG
|
||||
echo "${LOGTIME} OpenClash 【"$CORE_TYPE"】 Core Update Successful" >>$LOG_FILE
|
||||
sleep 3
|
||||
if [ -n "$2" ] || [ "$1" = "one_key_update" ]; then
|
||||
uci set openclash.config.config_reload=0
|
||||
uci commit openclash
|
||||
fi
|
||||
[ "$if_restart" -eq 1 ] && /etc/init.d/openclash start
|
||||
echo "" >$START_LOG
|
||||
else
|
||||
@ -133,7 +164,6 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
|
||||
rm -rf /tmp/clash_game >/dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
rm -rf /tmp/clash >/dev/null 2>&1
|
||||
esac
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/openclash_custom_domain_dns.sh)
|
||||
status=$(unify_ps_status "openclash_custom_domain_dns.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/openclash_debug.sh)
|
||||
status=$(unify_ps_status "openclash_debug.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
DEBUG_LOG="/tmp/openclash_debug.log"
|
||||
|
||||
@ -32,15 +32,19 @@ cfg_server_address()
|
||||
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}$")
|
||||
if [ -z "$IFIP" ] && [ ! -z "$server" ]; then
|
||||
echo "server=/$server/114.114.114.114" >> "$SER_FAKE_FILTER_FILE"
|
||||
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
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
#Fake下正确检测节点延迟
|
||||
#Fake下正确检测节点延迟及获取真实地址
|
||||
|
||||
rm -rf "$SER_FAKE_FILTER_FILE" 2>/dev/null
|
||||
custom_domain_dns_server=$(uci get openclash.config.custom_domain_dns_server 2>/dev/null)
|
||||
[ -z "$custom_domain_dns_server" ] && {
|
||||
custom_domain_dns_server="114.114.114.114"
|
||||
}
|
||||
config_load "openclash"
|
||||
config_foreach cfg_server_address "servers"
|
||||
@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
CURL_GROUP_CACHE="/tmp/openclash_history_gorup.json"
|
||||
CURL_NOW_CACHE="/tmp/openclash_history_now.json"
|
||||
CURL_CACHE="/tmp/openclash_history_curl.json"
|
||||
CONFIG_FILE=$(ps -w|grep /etc/openclash/clash 2>/dev/null |grep -v grep |awk -F '-f ' '{print $2}' 2>/dev/null)
|
||||
CONFIG_FILE=$(unify_ps_cfgname)
|
||||
CONFIG_NAME=$(echo "$CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null)
|
||||
HISTORY_PATH="/etc/openclash/history/$CONFIG_NAME"
|
||||
SECRET=$(uci get openclash.config.dashboard_password 2>/dev/null)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
CONFIG_FILE=$(uci get openclash.config.config_path 2>/dev/null)
|
||||
CONFIG_NAME=$(echo "$CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null)
|
||||
@ -35,8 +36,12 @@ restore_history() {
|
||||
curl -m 5 --retry 2 -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X PUT -d '{"name":"'"$NOW_NAME"'"}' http://"$LAN_IP":"$PORT"/proxies/"$GROUP_NAME" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
close_all_conection() {
|
||||
curl -m 5 --retry 2 -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X DELETE http://"$LAN_IP":"$PORT"/connections >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if [ -s "$HISTORY_PATH" ]; then
|
||||
cat $HISTORY_PATH |while read line
|
||||
cat "$HISTORY_PATH" |while read line
|
||||
do
|
||||
GROUP_NAME=$(echo $line |awk -F '#*#' '{print $1}')
|
||||
if [ "$GROUP_NAME" != "GLOBAL" ]; then
|
||||
@ -49,4 +54,5 @@ if [ -s "$HISTORY_PATH" ]; then
|
||||
restore_history
|
||||
fi
|
||||
done >/dev/null 2>&1
|
||||
close_all_conection
|
||||
fi
|
||||
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
status=$(ps|grep -c /usr/share/openclash/openclash_ipdb.sh)
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(unify_ps_status "openclash_ipdb.sh")
|
||||
[ "$status" -gt 3 ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
@ -20,11 +22,11 @@
|
||||
echo "GEOIP 数据库下载成功,检查数据库版本是否更新..." >$START_LOG
|
||||
cmp -s /tmp/Country.mmdb /etc/openclash/Country.mmdb
|
||||
if [ "$?" -ne "0" ]; then
|
||||
status=$(ps |grep -v openclash_watchdog |grep -c openclash.sh)
|
||||
status=$(unify_ps_prevent)
|
||||
while ( [ "$status" -gt 1 ] )
|
||||
do
|
||||
sleep 5
|
||||
status=$(ps |grep -v openclash_watchdog |grep -c openclash.sh)
|
||||
status=$(unify_ps_prevent)
|
||||
done
|
||||
/etc/init.d/openclash stop
|
||||
echo "数据库版本有更新,开始替换数据库版本..." >$START_LOG\
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
unify_ps_status() {
|
||||
if [ "$(ps --version 2>&1 |grep -c procps-ng)" -eq 1 ];then
|
||||
echo "$(ps -ef |grep -v grep |grep -c "$1")"
|
||||
else
|
||||
echo "$(ps |grep -v grep |grep -c "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
unify_ps_pids() {
|
||||
if [ "$(ps --version 2>&1 |grep -c procps-ng)" -eq 1 ];then
|
||||
echo "$(ps -ef |grep "$1" |grep -v grep |awk '{print $2}' 2>/dev/null)"
|
||||
else
|
||||
echo "$(ps |grep "$1" |grep -v grep |awk '{print $1}' 2>/dev/null)"
|
||||
fi
|
||||
}
|
||||
|
||||
unify_ps_prevent() {
|
||||
if [ "$(ps --version 2>&1 |grep -c procps-ng)" -eq 1 ];then
|
||||
echo "$(ps -ef |grep -v openclash_watchdog |grep -c openclash.sh 2>/dev/null)"
|
||||
else
|
||||
echo "$(ps |grep -v openclash_watchdog |grep -c openclash.sh 2>/dev/null)"
|
||||
fi
|
||||
}
|
||||
|
||||
unify_ps_cfgname() {
|
||||
if [ "$(ps --version 2>&1 |grep -c procps-ng)" -eq 1 ];then
|
||||
echo "$(ps -efw |grep /etc/openclash/clash 2>/dev/null |grep -v grep |awk -F '-f ' '{print $2}' 2>/dev/null)"
|
||||
else
|
||||
echo "$(ps -w |grep /etc/openclash/clash 2>/dev/null |grep -v grep |awk -F '-f ' '{print $2}' 2>/dev/null)"
|
||||
fi
|
||||
}
|
||||
@ -1,5 +1,43 @@
|
||||
#!/bin/sh
|
||||
status=$(ps|grep -c /usr/share/openclash/openclash_rule.sh)
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
field_cut()
|
||||
{
|
||||
local i lines end_len
|
||||
rule_len=$(sed -n '/^ \{0,\}rules:/=' "$3" 2>/dev/null)
|
||||
rule_provider_len=$(sed -n '/^ \{0,\}rule-providers:/=' "$3" 2>/dev/null)
|
||||
script_len=$(sed -n '/^ \{0,\}script:/=' "$3" 2>/dev/null)
|
||||
lines="$rule_len $rule_provider_len $script_len"
|
||||
|
||||
for i in $lines; do
|
||||
if [ -z "$1" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ "$1" -ge "$i" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$end_len" -gt "$i" ] || [ -z "$end_len" ]; then
|
||||
end_len="$i"
|
||||
fi
|
||||
done 2>/dev/null
|
||||
|
||||
if [ -n "$1" ] && [ -z "$end_len" ]; then
|
||||
end_len=$(sed -n '$=' "$3")
|
||||
elif [ -n "$end_len" ]; then
|
||||
end_len=$(expr "$end_len" - 1)
|
||||
fi
|
||||
|
||||
sed -n "${1},${end_len}p" "$3" > "$2" 2>/dev/null
|
||||
|
||||
if [ -z "$4" ]; then
|
||||
sed -i "${1},${end_len}d" "$3" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
status=$(unify_ps_status "openclash_rule.sh")
|
||||
[ "$status" -gt 3 ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
@ -9,6 +47,9 @@
|
||||
RUlE_SOURCE=$(uci get openclash.config.rule_source 2>/dev/null)
|
||||
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)
|
||||
OTHER_RULE_PROVIDER_FILE="/tmp/other_rule_provider.yaml"
|
||||
OTHER_SCRIPT_FILE="/tmp/other_rule_script.yaml"
|
||||
OTHER_RULE_FILE="/tmp/other_rule.yaml"
|
||||
|
||||
if [ -s "/tmp/openclash.auth" ]; then
|
||||
PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null)
|
||||
@ -41,6 +82,26 @@
|
||||
if [ "$?" -eq "0" ] && [ "$RUlE_SOURCE" != 0 ] && [ -s "/tmp/rules.yaml" ]; then
|
||||
echo "下载成功,开始预处理规则文件..." >$START_LOG
|
||||
sed -i "/^rules:/a\##source:${RUlE_SOURCE}" /tmp/rules.yaml >/dev/null 2>&1
|
||||
|
||||
#处理rule_provider位置
|
||||
rule_provider_len=$(sed -n '/^ \{0,\}rule-providers:/=' "/tmp/rules.yaml" 2>/dev/null)
|
||||
if [ -n "$rule_provider_len" ]; then
|
||||
field_cut "$rule_provider_len" "$OTHER_RULE_PROVIDER_FILE" "/tmp/rules.yaml"
|
||||
fi 2>/dev/null
|
||||
#处理script位置
|
||||
script_len=$(sed -n '/^ \{0,\}script:/=' "/tmp/rules.yaml" 2>/dev/null)
|
||||
if [ -n "$script_len" ]; then
|
||||
field_cut "$script_len" "$OTHER_SCRIPT_FILE" "/tmp/rules.yaml"
|
||||
fi 2>/dev/null
|
||||
#处理备份rule位置
|
||||
rule_bak_len=$(sed -n '/^ \{0,\}rules:/=' "/tmp/rules.yaml" 2>/dev/null)
|
||||
if [ -n "$rule_bak_len" ]; then
|
||||
field_cut "$rule_bak_len" "$OTHER_RULE_FILE" "/tmp/rules.yaml"
|
||||
fi 2>/dev/null
|
||||
#合并
|
||||
cat "$OTHER_RULE_PROVIDER_FILE" "$OTHER_SCRIPT_FILE" "$OTHER_RULE_FILE" > "/tmp/rules.yaml" 2>/dev/null
|
||||
rm -rf /tmp/other_rule* 2>/dev/null
|
||||
|
||||
echo "检查下载的规则文件是否有更新..." >$START_LOG
|
||||
cmp -s /etc/openclash/"$RUlE_SOURCE".yaml /tmp/rules.yaml
|
||||
if [ "$?" -ne "0" ]; then
|
||||
@ -48,11 +109,11 @@
|
||||
mv /tmp/rules.yaml /etc/openclash/"$RUlE_SOURCE".yaml >/dev/null 2>&1
|
||||
sed -i '/^rules:/a\##updated' /etc/openclash/"$RUlE_SOURCE".yaml >/dev/null 2>&1
|
||||
echo "替换成功,重新加载 OpenClash 应用新规则..." >$START_LOG
|
||||
status=$(ps |grep -v openclash_watchdog |grep -c openclash.sh)
|
||||
status=$(unify_ps_prevent)
|
||||
while ( [ "$status" -gt 1 ] )
|
||||
do
|
||||
sleep 5
|
||||
status=$(ps |grep -v openclash_watchdog |grep -c openclash.sh)
|
||||
status=$(unify_ps_prevent)
|
||||
done
|
||||
/etc/init.d/openclash restart 2>/dev/null
|
||||
echo "${LOGTIME} Other Rules 【$RUlE_SOURCE】 Update Successful" >>$LOG_FILE
|
||||
@ -66,7 +127,7 @@
|
||||
elif [ "$RUlE_SOURCE" = 0 ]; then
|
||||
echo "未启用第三方规则,更新程序终止!" >$START_LOG
|
||||
rm -rf /tmp/rules.yaml >/dev/null 2>&1
|
||||
echo "${LOGTIME} Other Rules 【$RUlE_SOURCE】 Not Enable, Update Stop" >>$LOG_FILE
|
||||
echo "${LOGTIME} Other Rules Not Enable, Update Stop" >>$LOG_FILE
|
||||
sleep 10
|
||||
echo "" >$START_LOG
|
||||
else
|
||||
|
||||
@ -1,8 +1,20 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
#禁止多个实例
|
||||
status=$(ps|grep -c /usr/share/openclash/openclash_update.sh)
|
||||
status=$(unify_ps_status "openclash_update.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
#一键更新
|
||||
if [ "$1" = "one_key_update" ]; then
|
||||
uci set openclash.config.enable=1
|
||||
uci commit openclash
|
||||
/usr/share/openclash/openclash_core.sh "$1" >/dev/null 2>&1 &
|
||||
/usr/share/openclash/openclash_core.sh "Tun" "$1" >/dev/null 2>&1 &
|
||||
/usr/share/openclash/openclash_core.sh "Game" "$1" >/dev/null 2>&1 &
|
||||
wait
|
||||
fi
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
LOG_FILE="/tmp/openclash.log"
|
||||
@ -41,6 +53,8 @@ if [ "$?" -eq "0" ]; then
|
||||
echo "OpenClash 更新成功,即将进行重启!" >$START_LOG
|
||||
echo "${LOGTIME} OpenClash Update Successful" >>$LOG_FILE
|
||||
sleep 3
|
||||
uci set openclash.config.enable=1
|
||||
uci commit openclash
|
||||
/etc/init.d/openclash restart 2>/dev/null
|
||||
else
|
||||
echo "OpenClash 更新失败,文件保存在/tmp/openclash.ipk,请尝试手动更新!" >$START_LOG
|
||||
@ -57,17 +71,29 @@ EOF
|
||||
echo "OpenClash-$LAST_VER 下载失败,请检查网络或稍后再试!" >$START_LOG
|
||||
rm -rf /tmp/openclash.ipk >/dev/null 2>&1
|
||||
echo "${LOGTIME} OpenClash Update Error" >>$LOG_FILE
|
||||
sleep 10
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
if [ "$(uci get openclash.config.config_reload 2>/dev/null)" -eq 0 ]; then
|
||||
uci set openclash.config.config_reload=1
|
||||
uci commit openclash
|
||||
/etc/init.d/openclash restart 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
elif [ ! -f "$LAST_OPVER" ]; then
|
||||
else
|
||||
if [ ! -f "$LAST_OPVER" ]; then
|
||||
echo "获取版本信息失败,请稍后再试..." >$START_LOG
|
||||
echo "${LOGTIME} OpenClash Version Check Error, Please Try Again After A few seconds" >>$LOG_FILE
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
else
|
||||
else
|
||||
echo "OpenClash 没有更新,停止继续操作!" >$START_LOG
|
||||
echo "${LOGTIME} OpenClash Version No Change, Do Nothing" >>$LOG_FILE
|
||||
sleep 5
|
||||
echo "" >$START_LOG
|
||||
fi
|
||||
if [ "$(uci get openclash.config.config_reload 2>/dev/null)" -eq 0 ]; then
|
||||
uci set openclash.config.config_reload=1
|
||||
uci commit openclash
|
||||
/etc/init.d/openclash restart 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -22,7 +22,7 @@ if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{prin
|
||||
if [ "$(expr "$OP_CV" \>= "$OP_LV")" -eq 1 ]; then
|
||||
sed -i "/^https:/i\CheckTime:${CKTIME}" "$LAST_OPVER" 2>/dev/null
|
||||
sed -i '/^https:/,$d' $LAST_OPVER
|
||||
elif [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ]; then
|
||||
elif [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ] && [ -n "$OP_LV" ]; then
|
||||
sed -i "/^https:/i\CheckTime:${CKTIME}" "$LAST_OPVER" 2>/dev/null
|
||||
return 2
|
||||
fi
|
||||
@ -32,6 +32,6 @@ if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{prin
|
||||
elif [ "$(expr "$OP_CV" \>= "$OP_LV")" -eq 1 ]; then
|
||||
sed -i '/^CheckTime:/,$d' $LAST_OPVER
|
||||
echo "CheckTime:$CKTIME" >> $LAST_OPVER
|
||||
elif [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ]; then
|
||||
elif [ "$(expr "$OP_LV" \> "$OP_CV")" -eq 1 ] && [ -n "$OP_LV" ]; then
|
||||
return 2
|
||||
fi 2>/dev/null
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
/*! 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}
|
||||
/*! 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}
|
||||
@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)}
|
||||
._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}
|
||||
._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 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}
|
||||
._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 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)}
|
||||
._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)}
|
||||
._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}.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}
|
||||
@ -18,3 +18,5 @@ 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.cf6b34db68df27895b0a.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
@ -1,2 +1,4 @@
|
||||
._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*/
|
||||
@ -0,0 +1 @@
|
||||
{"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,3 +3,5 @@
|
||||
._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.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>
|
||||
<!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.0ec94503bb844bc8ee38.js"></script><script defer="defer" src="core-js~app.33c5cdecfc11e62e3415.js"></script><script defer="defer" src="react~app.85a6af7ab221658559e3.js"></script><script defer="defer" src="app.57466da82c6534ab0c59.js"></script><link href="app.cf6b34db68df27895b0a.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
@ -1,2 +1,4 @@
|
||||
._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*/
|
||||
@ -0,0 +1 @@
|
||||
{"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":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -11,3 +11,5 @@
|
||||
._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
@ -3,3 +3,5 @@
|
||||
._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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,2 @@
|
||||
!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()}([]);
|
||||
!function(e){function r(r){for(var n,o,d=r[0],u=r[1],f=r[2],i=r[3]||[],l=0,b=[];l<d.length;l++)o=d[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),s.push.apply(s,i);b.length;)b.shift()();return c.push.apply(c,f||[]),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 f=t[o];0!==a[f]&&(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:"3bbf7c997e35c27e0e09",1:"1b69c8ae2dc5929cac38",3:"185469682369eea7ed5e",4:"ac1318f4c605f341f4a1",6:"dca8fd31fe2ece5617ba",7:"f9db39b6b9f59e944a16",9:"c6d8e4559779501d90c2",11:"c749992ca47ba67623b4",12:"9d08041ab4f217cf48cb",13:"5afec5e5759a23a386fc",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:"f4c2f06f01d16464ea49",4:"c9072a30fa369846711d",6:"9c919d1590eed02bc4b6",7:"0fea71f33a1333d027ad",9:"86d27ed35189095cbd2d",11:"31d6cfe0d16ae931b73c",12:"31d6cfe0d16ae931b73c",13:"31d6cfe0d16ae931b73c",14:"31d6cfe0d16ae931b73c"}[e]+".css",a=u.p+n,c=document.getElementsByTagName("link"),s=0;s<c.length;s++){var d=(i=c[s]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(d===n||d===a))return r()}var f=document.getElementsByTagName("style");for(s=0;s<f.length;s++){var i;if((d=(i=f[s]).getAttribute("data-href"))===n||d===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,s=document.createElement("script");s.charset="utf-8",s.timeout=120,u.nc&&s.setAttribute("nonce",u.nc),s.src=d(e);var f=new Error;c=function(r){s.onerror=s.onload=null,clearTimeout(i);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;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,t[1](f)}a[e]=void 0}};var i=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 f=window.webpackJsonp=window.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var l=0;l<f.length;l++)r(f[l]);var p=i;t()}([]);
|
||||
//# sourceMappingURL=runtime.0ec94503bb844bc8ee38.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
@ -202,7 +202,13 @@
|
||||
sed -i "/^ \{0,\}hosts:/c\hosts:" "$7"
|
||||
fi
|
||||
fi
|
||||
sed -i "/^dns:/a\ use-hosts: true" "$7"
|
||||
if [ -z "$(grep "^ \{0,\}use-hosts:" $7)" ]; then
|
||||
sed -i "/^dns:/a\ use-hosts: true" "$7"
|
||||
else
|
||||
if [ ! -z "$(grep "^ \{0,\}use-hosts:" $7)" ]; then
|
||||
sed -i "/^ \{0,\}use-hosts:/c\ use-hosts: true" "$7"
|
||||
fi
|
||||
fi
|
||||
sed -i '/^hosts:/a\##Custom HOSTS END##' "$7" 2>/dev/null
|
||||
sed -i '/^hosts:/a\##Custom HOSTS##' "$7" 2>/dev/null
|
||||
sed -i '/##Custom HOSTS##/r/etc/openclash/custom/openclash_custom_hosts.list' "$7" 2>/dev/null
|
||||
|
||||
@ -20,9 +20,6 @@ YML_FILE="$1"
|
||||
}
|
||||
|
||||
#proxies
|
||||
[ -z "$(grep "^Proxy:" "$YML_FILE")" ] && {
|
||||
sed -i "s/^ \{1,\}Proxy:/Proxy:/g" "$YML_FILE" 2>/dev/null
|
||||
}
|
||||
[ -z "$(grep "^Proxy:" "$YML_FILE")" ] && {
|
||||
sed -i "s/^proxies:/Proxy:/g" "$YML_FILE" 2>/dev/null
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
. /lib/functions.sh
|
||||
status=$(ps|grep -c /usr/share/openclash/yml_groups_get.sh)
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(unify_ps_status "yml_groups_get.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
@ -185,6 +187,8 @@ do
|
||||
group_test_url="$(cfg_get "url:" "$single_group")"
|
||||
#test_interval
|
||||
group_test_interval="$(cfg_get "interval:" "$single_group")"
|
||||
#test_tolerance
|
||||
group_test_tolerance="$(cfg_get "tolerance:" "$single_group")"
|
||||
|
||||
echo "正在读取【$CONFIG_NAME】-【$group_type】-【$group_name】策略组配置..." >$START_LOG
|
||||
|
||||
@ -200,6 +204,7 @@ do
|
||||
${uci_set}type="$group_type"
|
||||
${uci_set}test_url="$group_test_url"
|
||||
${uci_set}test_interval="$group_test_interval"
|
||||
${uci_set}tolerance="$group_test_tolerance"
|
||||
|
||||
#other_group
|
||||
if [ "$group_type" = "select" ]; then
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#!/bin/bash
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(unify_ps_status "yml_groups_name_ch.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
cfg_groups_set()
|
||||
{
|
||||
@ -30,15 +35,18 @@ cfg_groups_set()
|
||||
sed -i "s/other_group \'${old_name_cfg}/other_group \'${name}/g" $CFG_FILE 2>/dev/null
|
||||
sed -i "s/new_servers_group \'${old_name_cfg}/new_servers_group \'${name}/g" $CFG_FILE 2>/dev/null
|
||||
sed -i "s/relay_groups \'${old_name_cfg}/relay_groups \'${name}/g" $CFG_FILE 2>/dev/null
|
||||
#第三方规则处理
|
||||
OTHER_RULE_NAMES=("GlobalTV" "AsianTV" "Proxy" "Youtube" "Apple" "Microsoft" "Netflix" "Spotify" "Steam" "Speedtest" "Telegram" "PayPal" "Netease_Music" "AdBlock" "Domestic" "Others")
|
||||
for i in ${OTHER_RULE_NAMES[@]}; do
|
||||
if [ "$(uci get openclash.config."$i" 2>/dev/null)" = "$old_name_cfg" ]; then
|
||||
uci set openclash.config."$i"=$name 2>/dev/null
|
||||
uci commit openclash
|
||||
fi
|
||||
done 2>/dev/null
|
||||
config_load "openclash"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
start(){
|
||||
status=$(ps|grep -c /usr/share/openclash/yml_groups_name_ch.sh)
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
config_load "openclash"
|
||||
config_foreach cfg_groups_set "groups"
|
||||
}
|
||||
config_load "openclash"
|
||||
config_foreach cfg_groups_set "groups"
|
||||
@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/yml_groups_set.sh)
|
||||
status=$(unify_ps_status "yml_groups_set.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
@ -149,6 +150,7 @@ yml_groups_set()
|
||||
config_get "old_name" "$section" "old_name" ""
|
||||
config_get "test_url" "$section" "test_url" ""
|
||||
config_get "test_interval" "$section" "test_interval" ""
|
||||
config_get "tolerance" "$section" "tolerance" ""
|
||||
|
||||
if [ ! -z "$if_game_group" ] && [ "$if_game_group" != "$name" ]; then
|
||||
return
|
||||
@ -229,6 +231,9 @@ yml_groups_set()
|
||||
[ ! -z "$test_interval" ] && {
|
||||
echo " interval: \"$test_interval\"" >>$GROUP_FILE
|
||||
}
|
||||
[ ! -z "$tolerance" ] && {
|
||||
echo " tolerance: \"$tolerance\"" >>$GROUP_FILE
|
||||
}
|
||||
}
|
||||
|
||||
create_config=$(uci get openclash.config.create_config 2>/dev/null)
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
. /lib/functions.sh
|
||||
status=$(ps|grep -c /usr/share/openclash/yml_proxys_get.sh)
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(unify_ps_status "yml_proxys_get.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
. /usr/share/openclash/openclash_ps.sh
|
||||
|
||||
status=$(ps|grep -c /usr/share/openclash/yml_proxys_set.sh)
|
||||
status=$(unify_ps_status "yml_proxys_set.sh")
|
||||
[ "$status" -gt "3" ] && exit 0
|
||||
|
||||
START_LOG="/tmp/openclash_start.log"
|
||||
@ -80,10 +81,11 @@ yml_proxy_provider_set()
|
||||
return
|
||||
fi
|
||||
|
||||
#避免重复代理集
|
||||
if [ "$config" = "$CONFIG_NAME" ] || [ "$config" = "all" ]; then
|
||||
if [ -n "$(grep -w "path: $path" "$PROXY_PROVIDER_FILE" 2>/dev/null)" ]; then
|
||||
return
|
||||
elif [ "$(grep -Fw "$name" "$proxy_provider_name" |wc -l 2>/dev/null)" -ge 2 ] && [ -z "$(grep -w "path: $path" "$PROXY_PROVIDER_FILE" 2>/dev/null)" ]; then
|
||||
elif [ "$(grep -w "$name$" "$proxy_provider_name" |wc -l 2>/dev/null)" -ge 2 ] && [ -z "$(grep -w "path: $path" "$PROXY_PROVIDER_FILE" 2>/dev/null)" ]; then
|
||||
sed -i "1,/${name}/{//d}" "$proxy_provider_name" 2>/dev/null
|
||||
return
|
||||
fi
|
||||
@ -207,8 +209,9 @@ yml_servers_set()
|
||||
return
|
||||
fi
|
||||
|
||||
#避免重复节点
|
||||
if [ "$config" = "$CONFIG_NAME" ] || [ "$config" = "all" ]; then
|
||||
if [ "$(grep -Fw "$name" "$servers_name" |wc -l 2>/dev/null)" -ge 2 ] && [ -n "$(grep -w "name: \"$name\"" "$SERVER_FILE" 2>/dev/null)" ]; then
|
||||
if [ "$(grep -w "$name$" "$servers_name" |wc -l 2>/dev/null)" -ge 2 ] && [ -n "$(grep -w "name: \"$name\"" "$SERVER_FILE" 2>/dev/null)" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@ -216,12 +219,11 @@ yml_servers_set()
|
||||
if [ "$config" = "$CONFIG_NAME" ] || [ "$config" = "all" ]; then
|
||||
if [ -n "$(grep -w "name: \"$name\"" "$SERVER_FILE" 2>/dev/null)" ]; then
|
||||
return
|
||||
elif [ "$(grep -Fw "$name" "$servers_name" |wc -l 2>/dev/null)" -ge 2 ] && [ -z "$(grep -w "name: \"$name\"" "$SERVER_FILE" 2>/dev/null)" ]; then
|
||||
elif [ "$(grep -w "$name$" "$servers_name" |wc -l 2>/dev/null)" -ge 2 ] && [ -z "$(grep -w "name: \"$name\"" "$SERVER_FILE" 2>/dev/null)" ]; then
|
||||
sed -i "1,/${name}/{//d}" "$servers_name" 2>/dev/null
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "正在写入【$type】-【$name】节点到配置文件【$CONFIG_NAME】..." >$START_LOG
|
||||
|
||||
if [ "$obfs" != "none" ] && [ -n "$obfs" ]; then
|
||||
@ -616,6 +618,7 @@ cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
url: https://cp.cloudflare.com/generate_204
|
||||
interval: "600"
|
||||
tolerance: "150"
|
||||
- name: Proxy
|
||||
type: select
|
||||
proxies:
|
||||
@ -704,6 +707,7 @@ cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
url: https://cp.cloudflare.com/generate_204
|
||||
interval: "600"
|
||||
tolerance: "150"
|
||||
- name: Proxy
|
||||
type: select
|
||||
proxies:
|
||||
@ -870,20 +874,6 @@ cat >> "$SERVER_FILE" <<-EOF
|
||||
EOF
|
||||
fi
|
||||
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
- name: Netease Music
|
||||
type: select
|
||||
proxies:
|
||||
- DIRECT
|
||||
- Proxy
|
||||
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
|
||||
${UCI_SET}rule_source="lhie1"
|
||||
${UCI_SET}GlobalTV="GlobalTV"
|
||||
${UCI_SET}AsianTV="AsianTV"
|
||||
@ -895,7 +885,6 @@ ${UCI_SET}Netflix="Netflix"
|
||||
${UCI_SET}Spotify="Spotify"
|
||||
${UCI_SET}Steam="Steam"
|
||||
${UCI_SET}AdBlock="AdBlock"
|
||||
${UCI_SET}Netease_Music="Netease Music"
|
||||
${UCI_SET}Speedtest="Speedtest"
|
||||
${UCI_SET}Telegram="Telegram"
|
||||
${UCI_SET}PayPal="PayPal"
|
||||
@ -914,7 +903,6 @@ ${UCI_SET}Others="Others"
|
||||
${UCI_DEL_LIST}="Telegram" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Telegram" >/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
|
||||
${UCI_DEL_LIST}="Netease Music" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Netease Music" >/dev/null 2>&1
|
||||
}
|
||||
elif [ "$rule_sources" = "ConnersHua_return" ] && [ "$servers_if_update" != "1" ] && [ -z "$if_game_proxy" ]; then
|
||||
echo "使用ConnersHua回国规则创建中..." >$START_LOG
|
||||
@ -938,6 +926,7 @@ cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
url: https://cp.cloudflare.com/generate_204
|
||||
interval: "600"
|
||||
tolerance: "150"
|
||||
- name: Proxy
|
||||
type: select
|
||||
proxies:
|
||||
|
||||
@ -124,7 +124,6 @@ if [ "$2" != 0 ]; then
|
||||
|| [ -z "$(grep "$Spotify" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep "$Steam" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep "$AdBlock" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep "$Netease_Music" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep "$Speedtest" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep "$Telegram" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep "$Microsoft" /tmp/Proxy_Group)" ]\
|
||||
@ -148,7 +147,7 @@ if [ "$2" != 0 ]; then
|
||||
|
||||
[ "$check_def" -ne 1 ] && {
|
||||
grep "^##updated$" /etc/openclash/"$2".yaml 1>/dev/null
|
||||
[ "$?" -eq "0" ] && {
|
||||
[ "$?" -eq 0 ] && {
|
||||
sed -i '/^##updated$/d' /etc/openclash/"$2".yaml
|
||||
check_def=1
|
||||
}
|
||||
@ -166,7 +165,6 @@ if [ "$2" != 0 ]; then
|
||||
AdBlock_YAML=$(grep '##AdBlock:' "$4" |awk -F ':' '{print $2}')
|
||||
Others_YAML=$(grep '##Others:' "$4" |awk -F ':' '{print $2}')
|
||||
Domestic_YAML=$(grep '##Domestic:' "$4" |awk -F ':' '{print $2}')
|
||||
Netease_Music_YAML=$(grep '##Netease_Music:' "$4" |awk -F ':' '{print $2}')
|
||||
Speedtest_YAML=$(grep '##Speedtest:' "$4" |awk -F ':' '{print $2}')
|
||||
Telegram_YAML=$(grep '##Telegram:' "$4" |awk -F ':' '{print $2}')
|
||||
PayPal_YAML=$(grep '##PayPal:' "$4" |awk -F ':' '{print $2}')
|
||||
@ -195,7 +193,6 @@ if [ "$2" != 0 ]; then
|
||||
|| [ "$Spotify" != "$Spotify_YAML" ]\
|
||||
|| [ "$Steam" != "$Steam_YAML" ]\
|
||||
|| [ "$AdBlock" != "$AdBlock_YAML" ]\
|
||||
|| [ "$Netease_Music" != "$Netease_Music_YAML" ]\
|
||||
|| [ "$Speedtest" != "$Speedtest_YAML" ]\
|
||||
|| [ "$Telegram" != "$Telegram_YAML" ]\
|
||||
|| [ "$Microsoft" != "$Microsoft_YAML" ]\
|
||||
@ -211,56 +208,100 @@ if [ "$2" != 0 ]; then
|
||||
sed -i '/^rules:/,$d' "$4" 2>/dev/null
|
||||
sed -i '/##Other-rule-providers##/,/##Other-rule-providers-end##/d' "$9" 2>/dev/null
|
||||
if [ "$2" = "lhie1" ]; then
|
||||
cp /etc/openclash/lhie1.yaml /tmp/other_rule.yaml
|
||||
sed -i "s/,GlobalTV$/,${GlobalTV}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,GlobalTV,no-resolve$/,${GlobalTV},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##GlobalTV:${GlobalTV}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AsianTV$/,${AsianTV}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AsianTV,no-resolve$/,${AsianTV},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##AsianTV:${AsianTV}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Proxy$/,${Proxy}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Proxy,no-resolve$/,${Proxy},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Proxy:${Proxy}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Youtube$/,${Youtube}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Youtube,no-resolve$/,${Youtube},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Youtube:${Youtube}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Apple$/,${Apple}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Apple,no-resolve$/,${Apple},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Apple:${Apple}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Netflix$/,${Netflix}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Netflix,no-resolve$/,${Netflix},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Netflix:${Netflix}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Spotify$/,${Spotify}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Spotify,no-resolve$/,${Spotify},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Spotify:${Spotify}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Steam$/,${Steam}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Steam,no-resolve$/,${Steam},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Steam:${Steam}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AdBlock$/,${AdBlock}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AdBlock,no-resolve$/,${AdBlock},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##AdBlock:${AdBlock}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Netease Music$/,${Netease_Music}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Netease Music$/,${Netease_Music},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Netease_Music:${Netease_Music}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Speedtest$/,${Speedtest}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Speedtest$/,${Speedtest},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Speedtest:${Speedtest}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Telegram$/,${Telegram}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Telegram$/,${Telegram},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Telegram:${Telegram}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Microsoft$/,${Microsoft}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Microsoft$/,${Microsoft},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Microsoft:${Microsoft}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,PayPal$/,${PayPal}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,PayPal$/,${PayPal},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##PayPal:${PayPal}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Domestic$/,${Domestic}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Domestic$/,${Domestic},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Domestic:${Domestic}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Others$/,${Others}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Others$/,${Others},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Others:${Others}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/#d//g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
#删除原有的script部分,防止冲突
|
||||
rm -rf /tmp/yaml_script.yaml 2>/dev/null
|
||||
cp /etc/openclash/lhie1.yaml /tmp/other_rule_provider.yaml
|
||||
sed -n '/^ \{0,\}rules:/,$p' /tmp/other_rule_provider.yaml > /tmp/other_rule.yaml 2>/dev/null
|
||||
sed -i '/^ \{0,\}rules:/,$d' /tmp/other_rule_provider.yaml 2>/dev/null
|
||||
sed -n '/^ \{0,\}script:/,$p' /tmp/other_rule_provider.yaml > /tmp/yaml_script.yaml 2>/dev/null
|
||||
sed -i '/^ \{0,\}script:/,$d' /tmp/other_rule_provider.yaml 2>/dev/null
|
||||
sed -i "/^ \{0,\}script:/c\script:" /tmp/other_rule.yaml 2>/dev/null
|
||||
sed -i "/^ \{0,\}rules:/c\rules:" /tmp/other_rule.yaml 2>/dev/null
|
||||
sed -i "/^ \{0,\}rule-providers:/c\rule-providers:" /tmp/other_rule_provider.yaml 2>/dev/null
|
||||
echo "##Other-rule-providers-end##" >> /tmp/other_rule_provider.yaml
|
||||
if [ -z "$(sed -n '/^ \{0,\}rule-providers:/=' "$9" 2>/dev/null)" ]; then
|
||||
sed -i "s/,GlobalTV$/,${GlobalTV}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"GlobalTV\"/: \"${GlobalTV}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,GlobalTV,no-resolve$/,${GlobalTV},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##GlobalTV:${GlobalTV}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AsianTV$/,${AsianTV}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"AsianTV\"/: \"${AsianTV}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AsianTV,no-resolve$/,${AsianTV},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##AsianTV:${AsianTV}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Proxy$/,${Proxy}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Proxy\"/: \"${Proxy}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Proxy,no-resolve$/,${Proxy},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Proxy:${Proxy}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,YouTube$/,${Youtube}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"YouTube\"/: \"${Youtube}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,YouTube,no-resolve$/,${Youtube},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Youtube:${Youtube}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Apple$/,${Apple}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Apple\"/: \"${Apple}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Apple,no-resolve$/,${Apple},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Apple:${Apple}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Netflix$/,${Netflix}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Netflix\"/: \"${Netflix}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Netflix,no-resolve$/,${Netflix},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Netflix:${Netflix}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Spotify$/,${Spotify}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Spotify\"/: \"${Spotify}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Spotify,no-resolve$/,${Spotify},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Spotify:${Spotify}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Steam$/,${Steam}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Steam\"/: \"${Steam}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Steam,no-resolve$/,${Steam},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Steam:${Steam}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AdBlock$/,${AdBlock}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"AdBlock\"/: \"${AdBlock}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,AdBlock,no-resolve$/,${AdBlock},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##AdBlock:${AdBlock}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Speedtest$/,${Speedtest}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Speedtest\"/: \"${Speedtest}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Speedtest$/,${Speedtest},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Speedtest:${Speedtest}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Telegram$/,${Telegram}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Telegram\"/: \"${Telegram}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Telegram$/,${Telegram},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Telegram:${Telegram}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Microsoft$/,${Microsoft}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Microsoft\"/: \"${Microsoft}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Microsoft$/,${Microsoft},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Microsoft:${Microsoft}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,PayPal$/,${PayPal}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"PayPal\"/: \"${PayPal}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,PayPal$/,${PayPal},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##PayPal:${PayPal}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Domestic$/,${Domestic}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Domestic\"/: \"${Domestic}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/return \"Domestic\"$/return \"${Domestic}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Domestic$/,${Domestic},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Domestic:${Domestic}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Others$/,${Others}#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/: \"Others\"/: \"${Others}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/return \"Others\"$/return \"${Others}\"#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/,Others$/,${Others},no-resolve#d/g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/rules:/a\##Others:${Others}" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "s/#d//g" "/tmp/other_rule.yaml" 2>/dev/null
|
||||
sed -i "/^rule-providers:/c\rule-providers: ##Other-rule-providers##" /tmp/other_rule_provider.yaml 2>/dev/null
|
||||
cat /tmp/other_rule_provider.yaml >> "$9" 2>/dev/null
|
||||
else
|
||||
#处理缩进
|
||||
sed -i '/^ *$/d' "$9" 2>/dev/null
|
||||
sed -i 's/\t/ /g' "$9" 2>/dev/null
|
||||
sed -i '/^ \{0,\}#/d' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}/ /g' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}type:/ type:/g' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}behavior:/ behavior:/g' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}path:/ path:/g' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}url:/ url:/g' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}interval:/ interval:/g' "$9" 2>/dev/null
|
||||
sed -i 's/^ \{1,\}rule-providers:/rule-providers:/g' "$9" 2>/dev/null
|
||||
|
||||
sed -i '/^ \{0,\}rule-providers:/a\##Other-rule-providers##' /tmp/other_rule_provider.yaml 2>/dev/null
|
||||
sed -i '/^ \{0,\}rule-providers:/d' "/tmp/other_rule_provider.yaml" 2>/dev/null
|
||||
sed -i '/rule-providers:/r/tmp/other_rule_provider.yaml' "$9" 2>/dev/null
|
||||
fi
|
||||
elif [ "$2" = "ConnersHua" ]; then
|
||||
cp /etc/openclash/ConnersHua.yaml /tmp/other_rule_provider.yaml
|
||||
sed -n '/^rules:/,$p' /tmp/other_rule_provider.yaml > /tmp/other_rule.yaml 2>/dev/null
|
||||
@ -327,12 +368,12 @@ elif [ "$2" = 0 ]; then
|
||||
[ -f "$8" ] && {
|
||||
grep '##source:' "$4" 1>/dev/null
|
||||
if [ "$?" -eq "0" ]; then
|
||||
cp "$8" /tmp/configrules.bak
|
||||
sed -i -n '/^rules:/,$p' /tmp/configrules.bak
|
||||
sed -i '/^rules:/,$d' "$4"
|
||||
sed -i '/##Other-rule-providers##/,/##Other-rule-providers-end##/d' "$9" 2>/dev/null
|
||||
cat /tmp/configrules.bak >> "$4" 2>/dev/null
|
||||
rm -rf /tmp/configrules.bak 2>/dev/null
|
||||
sed -i '/^rules:/,$d' "$4" 2>/dev/null
|
||||
rm -rf /tmp/yaml_rule_provider.yaml 2>/dev/null
|
||||
rm -rf /tmp/yaml_script.yaml 2>/dev/null
|
||||
cat "/tmp/yaml_rule_provider_bak.yaml" >> "$4" 2>/dev/null
|
||||
cat "/tmp/yaml_script_bak.yaml" >> "$4" 2>/dev/null
|
||||
cat "/tmp/yaml_rules_bak.yaml" >> "$4" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
@ -227,8 +227,8 @@ msgstr "(如您不知道选项有何用,请不要随意修改)"
|
||||
msgid "Specify DNS Server"
|
||||
msgstr "指定(第二)DNS服务器"
|
||||
|
||||
msgid "Specify DNS Server For List, Only One IP Server Address Support"
|
||||
msgstr "指定下方列表中域名的DNS服务器,只支持填写一个IP地址"
|
||||
msgid "Specify DNS Server For List and Server Nodes With Fake-IP Mode, Only One IP Server Address Support"
|
||||
msgstr "指定下方列表中域名和Fake-IP模式下非代理集内节点的DNS服务器,只支持填写一个IP地址"
|
||||
|
||||
msgid "Domain Names In The List Do Not Return Fake-IP, One rule per line"
|
||||
msgstr "每行请只填写一个域名,列表中的域名在(Fake-IP模式)下查询DNS时将返回真实IP地址,更改后点击上方按钮生效"
|
||||
@ -394,6 +394,15 @@ msgstr "自动更新GEOIP数据库"
|
||||
msgid "Update GEOIP Database"
|
||||
msgstr "更新GEOIP数据库"
|
||||
|
||||
msgid "Auto Update Chnroute Lists"
|
||||
msgstr "自动更新大陆白名单"
|
||||
|
||||
msgid "Update Chnroute Lists"
|
||||
msgstr "更新大陆白名单"
|
||||
|
||||
msgid "Chnroute Update"
|
||||
msgstr "大陆白名单订阅"
|
||||
|
||||
msgid "Other Rules Update(Only in Use)"
|
||||
msgstr "正在使用第三方规则时才能更新"
|
||||
|
||||
@ -756,6 +765,9 @@ msgstr "检测地址(URL)"
|
||||
msgid "Test Interval(s)"
|
||||
msgstr "检测频率(秒)"
|
||||
|
||||
msgid "Tolerance(ms)"
|
||||
msgstr "节点切换容忍值(毫秒)"
|
||||
|
||||
msgid "Select"
|
||||
msgstr "Select【手动选择】"
|
||||
|
||||
@ -979,4 +991,13 @@ msgid "Rule Match Proxy Mode"
|
||||
msgstr "*仅代理命中规则流量"
|
||||
|
||||
msgid "Only Proxy Rules Match, Prevent BT Passing"
|
||||
msgstr "仅允许代理命中规则的流量,防止BT下载流量经过代理"
|
||||
msgstr "仅允许代理命中规则的流量,防止BT下载流量经过代理"
|
||||
|
||||
msgid "Provider File Manage"
|
||||
msgstr "代理(规则)集文件管理"
|
||||
|
||||
msgid "Config File Edit"
|
||||
msgstr "配置文件编辑"
|
||||
|
||||
msgid "Delete All File"
|
||||
msgstr "删除所有文件"
|
||||
Loading…
Reference in New Issue
Block a user