OpenClash: bump to v0.36.6-beta

This commit is contained in:
CN_SZTL 2020-02-15 22:06:46 +08:00
parent 9dc8577090
commit fde41fea37
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
44 changed files with 362 additions and 362 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.36.5
PKG_VERSION:=0.36.6
PKG_RELEASE:=beta
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
@ -98,6 +98,9 @@ fi
mkdir -p /lib/upgrade/keep.d >/dev/null 2>&1
cat > "/lib/upgrade/keep.d/luci-app-openclash" <<-EOF
/etc/openclash/custom/
/etc/openclash/config/
/etc/openclash/game_rules/
/etc/openclash/proxy_provider/
EOF
uci set openclash.config.enable=0 >/dev/null 2>&1
uci commit openclash >/dev/null 2>&1

View File

@ -4,7 +4,6 @@
START=99
STOP=15
CLASH="/etc/openclash/clash"
CLASH_CONFIG="/etc/openclash"
CRON_FILE="/etc/crontabs/root"
@ -155,7 +154,7 @@ yml_check()
[ ! -z "$(grep "^ \{1,\}dns:" "$3")" ] && {
sed -i "/^ \{1,\}dns:/c\dns:" "$3"
}
#位置检查
proxy_len=$(sed -n '/^Proxy:/=' "$3" 2>/dev/null)
group_len=$(sed -n '/^ \{0,\}Proxy Group:/=' "$3" 2>/dev/null)
@ -168,22 +167,22 @@ yml_check()
echo "${LOGTIME} Unsupported Config, Please Check The General Setting's location And Try-again!" >> $LOG_FILE
mv "$START_BACKUP" "$CONFIG_FILE"
exit 0
fi
fi 2>/dev/null
if [ "$proxy_len" -ge "$rule_len" ] || [ "$provider_len" -ge "$rule_len" ]; then
echo "错误: 不支持的配置文件,服务器节点设置部分应位于规则之前,请根据模板修改后重试!" > $START_LOG
echo "${LOGTIME} Unsupported Config, Please Check The Proxy Setting's location And Try-again!" >> $LOG_FILE
mv "$START_BACKUP" "$CONFIG_FILE"
exit 0
fi
fi 2>/dev/null
if [ "$group_len" -ge "$rule_len" ] || [ "$proxy_len" -ge "$group_len" ]; then
echo "错误: 不支持的配置文件,策略组设置部分应位于规则之前、节点之后,请根据模板修改后重试!" > $START_LOG
echo "${LOGTIME} Unsupported Config, Please Check The Group Setting's location And Try-again!" >> $LOG_FILE
mv "$START_BACKUP" "$CONFIG_FILE"
exit 0
fi
fi 2>/dev/null
#处理provider位置
if [ ! -z "$provider_len" ]; then
if [ "$provider_len" -ge "$proxy_len" ] && [ "$provider_len" -le "$group_len" ]; then
@ -206,7 +205,7 @@ yml_check()
sed -i '/^proxy-provider:/d' /tmp/backprovider.yaml 2>/dev/null
sed -i '/proxy-provider:/r/tmp/backprovider.yaml' "$3" 2>/dev/null
rm -rf /tmp/backprovider.yaml 2>/dev/null
fi
fi 2>/dev/null
fi
@ -616,41 +615,6 @@ elif [ -f "/tmp/yaml_servers.yaml" ]; then
fi
}
proxy_router()
{
ipset -! create router nethash && ipset flush router
rm -rf /tmp/openclash_pr_list.conf >/dev/null 2>&1
# github and some other site need to go proxy with redir-host mode
echo "#for router itself" >> /tmp/openclash_pr_list.conf
echo "server=/.google.com/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.google.com/router" >> /tmp/openclash_pr_list.conf
echo "server=/.google.com.tw/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.google.com.tw/router" >> /tmp/openclash_pr_list.conf
echo "server=/.google.com.hk/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.google.com.hk/router" >> /tmp/openclash_pr_list.conf
echo "server=/.google.com.jp/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.google.com.jp/router" >> /tmp/openclash_pr_list.conf
echo "server=/.github.com/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.github.com/router" >> /tmp/openclash_pr_list.conf
echo "server=/.github.io/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.github.io/router" >> /tmp/openclash_pr_list.conf
echo "server=/.githubusercontent.com/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.githubusercontent.com/router" >> /tmp/openclash_pr_list.conf
echo "server=/.shields.io/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.shields.io/router" >> /tmp/openclash_pr_list.conf
echo "server=/.shields.io/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.shields.io/router" >> /tmp/openclash_pr_list.conf
echo "server=/.s3.amazonaws.com/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.s3.amazonaws.com/router" >> /tmp/openclash_pr_list.conf
echo "server=/.openwrt.org/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.openwrt.org/router" >> /tmp/openclash_pr_list.conf
echo "server=/.s3-ap-northeast-1.amazonaws.com/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.s3-ap-northeast-1.amazonaws.com/router" >> /tmp/openclash_pr_list.conf
echo "server=/.s3-ap-southeast-2.amazonaws.com/127.0.0.1#$dns_port" >> /tmp/openclash_pr_list.conf
echo "ipset=/.s3-ap-southeast-2.amazonaws.com/router" >> /tmp/openclash_pr_list.conf
mv /tmp/openclash_pr_list.conf /tmp/dnsmasq.d/openclash_pr_list.conf
}
start()
{
#禁止多个实例
@ -727,13 +691,14 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
log_level=$(uci get openclash.config.log_level 2>/dev/null)
proxy_mode=$(uci get openclash.config.proxy_mode 2>/dev/null)
intranet_allowed=$(uci get openclash.config.intranet_allowed 2>/dev/null)
echo "第二步: 配置文件检查..." >$START_LOG
yml_check "$en_mode" "$enable_custom_dns" "$CONFIG_FILE" "$BACKUP_FILE" "$START_BACKUP"
grep "^ \{0,\}Proxy Group:" "$CONFIG_FILE" >/dev/null 2>&1 && grep "^ \{0,\}Rule:" "$CONFIG_FILE" >/dev/null 2>&1
if [ "$?" -eq "0" ]; then
grep "^ \{0,\}Proxy:" "$CONFIG_FILE" >/dev/null 2>&1 || grep "^ \{0,\}proxy-provider:" "$CONFIG_FILE" >/dev/null 2>&1
if [ "$?" -ne "0" ]; then
nohup $CLASH -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
nohup "$CLASH" -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
echo "错误: 配置文件完整性检查不通过,已自动还原配置文件,请根据日志信息对照模板格式检查修改配置文件!" >$START_LOG
mv "$START_BACKUP" "$CONFIG_FILE"
stop
@ -746,8 +711,8 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
yml_auth_custom "$CONFIG_FILE"
yml_cut "$CHANGE_FILE" "$RULE_FILE" "$DNS_FILE" "$CONFIG_FILE" "$PROXY_FILE" "$PROXY_PROVIDER_FILE" "$GROUP_FILE"
yml_dns_custom "$enable_custom_dns" "$DNS_FILE"
sh /usr/share/openclash/yml_change.sh "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" &
sh /usr/share/openclash/yml_rules_change.sh "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$RULE_FILE" &
sh /usr/share/openclash/yml_change.sh >/dev/null 2>&1 "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" &
sh /usr/share/openclash/yml_rules_change.sh >/dev/null 2>&1 "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$RULE_FILE" "$set_rule_file" "$en_mode" &
wait
yml_game_custom
echo "第四步: DNS设置检查..." >$START_LOG
@ -759,12 +724,11 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
echo "" >$START_LOG
else
echo "第五步: 启动 Clash 主程序..." >$START_LOG
nohup $CLASH -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
nohup "$CLASH" -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
#检测proxy_provider配置文件状态
echo "第六步: 等待主程序下载代理集..." >$START_LOG
yml_proxy_provider_check "$PROXY_PROVIDER_FILE"
rm -rf /tmp/yaml_* 2>/dev/null
echo "第七步: 设置控制面板..." >$START_LOG
ln -s /usr/share/openclash/yacd /www/luci-static/openclash 2>/dev/null
@ -809,11 +773,7 @@ EOF
iptables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port"
iptables -t nat -A PREROUTING -p tcp -j openclash
if [ "$en_mode" = "redir-host" ]; then
proxy_router
iptables -t nat -A OUTPUT -p tcp -m set --match-set router dst -j REDIRECT --to-ports "$proxy_port" >/dev/null 2>&1
else
if [ "$en_mode" = "fake-ip" ]; then
iptables -t nat -A OUTPUT -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
fi
@ -821,9 +781,6 @@ EOF
ip6tables -t nat -N openclash
ip6tables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port"
ip6tables -t nat -A PREROUTING -p tcp -j openclash
if [ "$en_mode" = "redir-host" ]; then
ip6tables -t nat -A OUTPUT -p tcp -m set --match-set router dst -j REDIRECT --to-ports "$proxy_port" >/dev/null 2>&1
fi
fi
else
#TUN模式
@ -835,7 +792,7 @@ EOF
ipset add localnetwork 224.0.0.0/4
ipset add localnetwork 240.0.0.0/4
ipset add localnetwork 172.16.0.0/12
ipset add localnetwork "$wan_ip4"
ipset add localnetwork "$wan_ip4"
#启动TUN
if [ "$en_mode_tun" = "2" ]; then
ip tuntap add user root mode tun clash0
@ -848,21 +805,15 @@ EOF
#设置防火墙
iptables -t mangle -N openclash
iptables -t mangle -F openclash
if [ "$en_mode" = "redir-host" ]; then
proxy_router
iptables -t mangle -A openclash -p tcp -m set --match-set router dst -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
else
iptables -t mangle -A openclash -m set --match-set localnetwork dst -j RETURN
if [ "$en_mode" = "fake-ip" ]; then
iptables -t mangle -A openclash -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
fi
iptables -t mangle -A openclash -m set --match-set localnetwork dst -j RETURN
iptables -t mangle -I OUTPUT -j openclash
iptables -t mangle -I PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK"
#ipv6
if [ "$ipv6_enable" -eq 1 ]; then
ip6tables -t mangle -I PREROUTING -j MARK --set-mark "$PROXY_FWMARK"
if [ "$en_mode" = "redir-host" ]; then
ip6tables -t mangle -A OUTPUT -p tcp -m set --match-set router dst -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
fi
fi
fi
@ -898,7 +849,7 @@ EOF
sed -i '/^Rule:/,$d' "$CONFIG_FILE"
cat /etc/openclash/configrules.bak >> "$CONFIG_FILE"
rm -rf /etc/openclash/configrules.bak
nohup $CLASH -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
nohup "$CLASH" -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
sleep 3
if pidof clash >/dev/null; then
/usr/share/openclash/openclash_history_set.sh
@ -934,7 +885,7 @@ EOF
fi
fi
else
nohup $CLASH -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
nohup "$CLASH" -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
echo "错误: 配置文件完整性检查不通过,已自动还原配置文件,请根据日志信息对照模板格式检查修改配置文件!" >$START_LOG
mv "$START_BACKUP" "$CONFIG_FILE"
stop
@ -942,6 +893,7 @@ EOF
echo "" >$START_LOG
fi
rm -rf $START_BACKUP 2>/dev/null
rm -rf /tmp/yaml_* 2>/dev/null
else
subscribe_url=$(uci get openclash.config.subscribe_url 2>/dev/null)
if [ ! -f "$CONFIG_FILE" ] && [ ! -z "$subscribe_url" ]; then
@ -965,8 +917,7 @@ stop()
wait
echo "第二步: 删除 OpenClash 防火墙规则..." >$START_LOG
rm -rf /var/etc/openclash.include 2>/dev/null
ipset -F router >/dev/null 2>&1 && ipset -X router >/dev/null 2>&1
rm -rf /tmp/dnsmasq.d/openclash_pr_list.conf
#ipv4
iptables -t nat -F openclash >/dev/null 2>&1
iptables -t nat -D PREROUTING -p tcp -j openclash >/dev/null 2>&1
@ -977,21 +928,11 @@ stop()
iptables -t nat -D OUTPUT "$out_line" >/dev/null 2>&1
done
out_lines=$(iptables -nvL OUTPUT -t nat |sed 1,2d |sed -n '/router/=' 2>/dev/null |sort -rn)
for out_line in $out_lines; do
iptables -t nat -D OUTPUT "$out_line" >/dev/null 2>&1
done
#ipv6
ip6tables -t nat -F openclash >/dev/null 2>&1
ip6tables -t nat -D PREROUTING -p tcp -j openclash >/dev/null 2>&1
ip6tables -t nat -X openclash >/dev/null 2>&1
out_lines=$(ip6tables -nvL OUTPUT -t nat |sed 1,2d |sed -n '/router/=' 2>/dev/null |sort -rn)
for out_line in $out_lines; do
ip6tables -t nat -D OUTPUT "$out_line" >/dev/null 2>&1
done
#TUN
ip link set dev clash0 down >/dev/null 2>&1
ip tuntap del clash0 mode tun >/dev/null 2>&1
@ -1002,7 +943,6 @@ stop()
iptables -t mangle -D OUTPUT -j openclash >/dev/null 2>&1
iptables -t mangle -D PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
ip6tables -t mangle -D PREROUTING -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
ip6tables -t mangle -D OUTPUT -p tcp -m set --match-set router dst -j MARK --set-mark "$PROXY_FWMARK" >/dev/null 2>&1
iptables -t mangle -F openclash >/dev/null 2>&1
iptables -t mangle -X openclash >/dev/null 2>&1
ipset destroy localnetwork >/dev/null 2>&1

File diff suppressed because one or more lines are too long

View File

@ -22,10 +22,11 @@ function index()
entry({"admin", "services", "openclash", "settings"},cbi("openclash/settings"),_("Global Settings"), 30).leaf = true
entry({"admin", "services", "openclash", "servers"},cbi("openclash/servers"),_("Severs and Groups"), 40).leaf = true
entry({"admin", "services", "openclash", "game-settings"},cbi("openclash/game-settings"),_("Game Rules and Groups"), 50).leaf = true
entry({"admin", "services", "openclash", "game-rules-manage"},form("openclash/game-rules-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
entry({"admin", "services", "openclash", "proxy-provider-config"},cbi("openclash/proxy-provider-config"), nil).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
entry({"admin", "services", "openclash", "proxy-provider-config"},cbi("openclash/proxy-provider-config"), nil).leaf = true
entry({"admin", "services", "openclash", "config"},form("openclash/config"),_("Server Config"), 70).leaf = true
entry({"admin", "services", "openclash", "log"},form("openclash/log"),_("Logs"), 80).leaf = true
@ -54,41 +55,6 @@ local function is_watchdog()
return luci.sys.exec("ps |grep openclash_watchdog.sh |grep -v grep 2>/dev/null |sed -n 1p")
end
local function config_check()
local yaml = fs.isfile(CONFIG_FILE)
local proxy,group,rule
if yaml then
proxy_provier = luci.sys.call(string.format('egrep "^ {0,}proxy-provider:" "%s" >/dev/null 2>&1',CONFIG_FILE))
proxy = luci.sys.call(string.format('egrep "^ {0,}Proxy:" "%s" >/dev/null 2>&1',CONFIG_FILE))
group = luci.sys.call(string.format('egrep "^ {0,}Proxy Group:" "%s" >/dev/null 2>&1',CONFIG_FILE))
rule = luci.sys.call(string.format('egrep "^ {0,}Rule:" "%s" >/dev/null 2>&1',CONFIG_FILE))
end
if yaml then
if (proxy == 0) then
proxy = ""
else
if (proxy_provier == 0) then
proxy = ""
else
proxy = " - 代理服务器"
end
end
if (group == 0) then
group = ""
else
group = " - 策略组"
end
if (rule == 0) then
rule = ""
else
rule = " - 规则"
end
return proxy..group..rule
elseif (yaml ~= 0) then
return "1"
end
end
local function cn_port()
return luci.sys.exec("uci get openclash.config.cn_port 2>/dev/null |tr -d '\n'")
end
@ -158,12 +124,14 @@ local function corecv()
if not nixio.fs.access("/etc/openclash/clash") then
return "0"
else
return luci.sys.exec("/etc/openclash/clash -v 2>/dev/null 2>/dev/null |awk -F ' ' '{print $2}'")
return luci.sys.exec("/etc/openclash/clash -v 2>/dev/null |awk -F ' ' '{print $2}'")
end
end
local function corelv()
return luci.sys.exec("sh /usr/share/openclash/clash_version.sh && sed -n 1p /tmp/clash_last_version 2>/dev/null")
local new = luci.sys.exec("sh /usr/share/openclash/clash_version.sh")
local core_lv = luci.sys.exec("sed -n 1p /tmp/clash_last_version 2>/dev/null")
return core_lv..","..new
end
local function opcv()
@ -204,12 +172,8 @@ end
function download_rule()
local filename = luci.http.formvalue("filename")
local rule_file_dir="/etc/openclash/game_rules/" .. filename
luci.sys.call(string.format('/usr/share/openclash/openclash_game_rule.sh "%s" >/dev/null 2>&1',filename))
if not fs.isfile(rule_file_dir) then
return "0"
else
return "1"
end
local state = luci.sys.call(string.format('/usr/share/openclash/openclash_game_rule.sh "%s" >/dev/null 2>&1',filename))
return state
end
function action_status()
@ -227,7 +191,6 @@ end
function action_state()
luci.http.prepare_content("application/json")
luci.http.write_json({
config_check = config_check(),
config = config(),
lhie1 = lhie1(),
ConnersHua = ConnersHua(),

View File

@ -15,33 +15,6 @@ m.pageaction = false
m:section(SimpleSection).template = "openclash/status"
m:section(SimpleSection).template = "openclash/state"
local e,a={}
for t,o in ipairs(fs.glob("/etc/openclash/config/*"))do
a=fs.stat(o)
if a then
e[t]={}
e[t].name=fs.basename(o)
BACKUP_FILE="/etc/openclash/backup/".. e[t].name
e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",fs.mtime(BACKUP_FILE)) or os.date("%Y-%m-%d %H:%M:%S",a.mtime)
if string.sub(luci.sys.exec("uci get openclash.config.config_path"), 23, -2) == e[t].name then
e[t].state=translate("Enable")
else
e[t].state=translate("Disable")
end
e[t].size=tostring(a.size)
e[t].remove=0
e[t].enable=false
end
end
form=SimpleForm("filelist")
form.reset=false
form.submit=false
tb=form:section(Table,e)
st=tb:option(DummyValue,"state",translate("State"))
nm=tb:option(DummyValue,"name",translate("Config Alias"))
mt=tb:option(DummyValue,"mtime",translate("Update Time"))
function IsYamlFile(e)
e=e or""
local e=string.lower(string.sub(e,-5,-1))
@ -53,6 +26,75 @@ function IsYmlFile(e)
return e == ".yml"
end
function config_check(CONFIG_FILE)
local yaml = fs.isfile(CONFIG_FILE)
local proxy,group,rule
if yaml then
proxy_provier = luci.sys.call(string.format('egrep "^ {0,}proxy-provider:" "%s" >/dev/null 2>&1',CONFIG_FILE))
proxy = luci.sys.call(string.format('egrep "^ {0,}Proxy:" "%s" >/dev/null 2>&1',CONFIG_FILE))
group = luci.sys.call(string.format('egrep "^ {0,}Proxy Group:" "%s" >/dev/null 2>&1',CONFIG_FILE))
rule = luci.sys.call(string.format('egrep "^ {0,}Rule:" "%s" >/dev/null 2>&1',CONFIG_FILE))
end
if yaml then
if (proxy == 0) then
proxy = 0
else
if (proxy_provier == 0) then
proxy = 0
else
proxy = " - 代理服务器"
end
end
if (group == 0) then
group = 0
else
group = " - 策略组"
end
if (rule == 0) then
rule = 0
else
rule = " - 规则"
end
if proxy and group and rule then
return "Config Normal"
else
return proxy..group..rule.."部分异常"
end
elseif (yaml ~= 0) then
return "配置文件不存在"
end
end
local e,a={}
for t,o in ipairs(fs.glob("/etc/openclash/config/*"))do
a=fs.stat(o)
if a then
e[t]={}
e[t].num=string.format(t)
e[t].name=fs.basename(o)
BACKUP_FILE="/etc/openclash/backup/".. e[t].name
CONFIG_FILE="/etc/openclash/config/".. e[t].name
e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",fs.mtime(BACKUP_FILE)) or os.date("%Y-%m-%d %H:%M:%S",a.mtime)
if string.sub(luci.sys.exec("uci get openclash.config.config_path"), 23, -2) == e[t].name then
e[t].state=translate("Enable")
else
e[t].state=translate("Disable")
end
e[t].size=tostring(a.size)
e[t].check=translate(config_check(CONFIG_FILE))
end
end
form=SimpleForm("filelist")
form.reset=false
form.submit=false
tb=form:section(Table,e)
st=tb:option(DummyValue,"state",translate("State"))
st.template="openclash/cfg_check"
nm=tb:option(DummyValue,"name",translate("Config Alias"))
mt=tb:option(DummyValue,"mtime",translate("Update Time"))
ck=tb:option(DummyValue,"check",translate("启动参数检查"))
ck.template="openclash/cfg_check"
btnis=tb:option(Button,"switch",translate("Switch Config"))
btnis.template="openclash/other_button"
btnis.render=function(o,t,a)

View File

@ -8,6 +8,11 @@ local fs = require "luci.openclash"
local uci = require("luci.model.uci").cursor()
local CHIF = "0"
font_green = [[<font color="green">]]
font_off = [[</font>]]
bold_on = [[<strong>]]
bold_off = [[</strong>]]
function IsYamlFile(e)
e=e or""
local e=string.lower(string.sub(e,-5,-1))
@ -133,6 +138,7 @@ form.reset=false
form.submit=false
tb=form:section(Table,e)
st=tb:option(DummyValue,"state",translate("State"))
st.template="openclash/cfg_check"
nm=tb:option(DummyValue,"name",translate("Config Alias"))
mt=tb:option(DummyValue,"mtime",translate("Update Time"))
sz=tb:option(DummyValue,"size",translate("Size"))
@ -277,10 +283,12 @@ s = m:section(Table, tab)
local conf = string.sub(luci.sys.exec("uci get openclash.config.config_path"), 1, -2)
local dconf = "/etc/openclash/default.yaml"
local conf_name = fs.basename(conf)
if not conf_name then conf_name = "config.yaml" end
sev = s:option(Value, "user")
sev.template = "cbi/tvalue"
sev.description = translate("You Can Modify config file Here, Except The Settings That Were Taken Over")
sev.description = translate("Modify Your Config file:").." "..font_green..bold_on..conf_name..bold_off..font_off.." "..translate("Here, Except The Settings That Were Taken Over")
sev.rows = 40
sev.wrap = "off"
sev.cfgvalue = function(self, section)
@ -289,7 +297,7 @@ end
sev.write = function(self, section, value)
if (CHIF == "0") then
value = value:gsub("\r\n?", "\n")
NXFS.writefile(conf, value)
NXFS.writefile(conf, value)
end
end

View File

@ -0,0 +1,88 @@
local form, m
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()
m = SimpleForm("openclash", translate("Game Rules List"))
m.description=translate("规则项目: SSTap-Rule ( https://github.com/FQrabbit/SSTap-Rule )<br/>")
m.reset = false
m.submit = false
local t = {
{Apply}
}
a = m:section(Table, t)
o = a:option(Button, "Apply")
o.inputtitle = translate("Back Configurations")
o.inputstyle = "apply"
o.write = function()
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "game-settings"))
end
if not NXFS.access("/tmp/rules_name") then
SYS.call("awk -F ',' '{print $1}' /etc/openclash/game_rules.list > /tmp/rules_name 2>/dev/null")
end
file = io.open("/tmp/rules_name", "r");
---- Rules List
local e={},o,t
if NXFS.access("/tmp/rules_name") then
for o in file:lines() do
table.insert(e,o)
end
for t,o in ipairs(e) do
e[t]={}
e[t].num=string.format(t)
e[t].name=o
e[t].filename=string.sub(luci.sys.exec(string.format("grep -F '%s,' /etc/openclash/game_rules.list |awk -F ',' '{print $3}' 2>/dev/null",e[t].name)),1,-2)
if e[t].filename == "" then
e[t].filename=string.sub(luci.sys.exec(string.format("grep -F '%s,' /etc/openclash/game_rules.list |awk -F ',' '{print $2}' 2>/dev/null",e[t].name)),1,-2)
end
RULE_FILE="/etc/openclash/game_rules/".. e[t].filename
if fs.mtime(RULE_FILE) then
e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",fs.mtime(RULE_FILE))
else
e[t].mtime="/"
end
if fs.isfile(RULE_FILE) then
e[t].exist=translate("Exist")
else
e[t].exist=translate("Not Exist")
end
e[t].remove=0
end
end
file:close()
form=SimpleForm("filelist")
form.reset=false
form.submit=false
tb=form:section(Table,e)
nu=tb:option(DummyValue,"num",translate("Order Number"))
st=tb:option(DummyValue,"exist",translate("State"))
nm=tb:option(DummyValue,"name",translate("Rule Name"))
fm=tb:option(DummyValue,"filename",translate("File Name"))
mt=tb:option(DummyValue,"mtime",translate("Update Time"))
btnis=tb:option(DummyValue,"filename",translate("Download Rule"))
btnis.template="openclash/download_game_rule"
btnrm=tb:option(Button,"remove",translate("Remove"))
btnrm.render=function(e,t,a)
e.inputstyle="reset"
Button.render(e,t,a)
end
btnrm.write=function(a,t)
fs.unlink("/etc/openclash/game_rules/"..e[t].filename)
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "game-rules-manage"))
end
return m, form

View File

@ -14,7 +14,7 @@ m.pageaction = false
m.description=translate("注意事项:<br/>游戏代理为测试功能不保证可用性。其中游戏模式使用的内核由comzyh修改 \
<br/>https://github.com/comzyh/clash <br/>使 \
<br/>1使:FallBackUDP \
<br/>2使 \
<br/>2使 \
<br/>3 \
<br/>4https://github.com/Dreamacro/clash/releases/tag/TUN \
<br/>https://github.com/vernesong/OpenClash/releases/tag/TUN \
@ -39,11 +39,6 @@ function IsYmlFile(e)
return e == ".yml"
end
if not NXFS.access("/tmp/rules_name") then
SYS.call("awk -F ',' '{print $1}' /etc/openclash/game_rules.list > /tmp/rules_name 2>/dev/null")
end
file = io.open("/tmp/rules_name", "r");
-- [[ Edit Game Rule ]] --
s = m:section(TypedSection, "game_config")
s.anonymous = true
@ -104,58 +99,17 @@ o:value("DIRECT")
o:value("REJECT")
o.rmempty = true
---- Rules List
local e={},o,t
if NXFS.access("/tmp/rules_name") then
for o in file:lines() do
table.insert(e,o)
end
for t,o in ipairs(e) do
e[t]={}
e[t].num=string.format(t)
e[t].name=o
e[t].filename=string.sub(luci.sys.exec(string.format("grep -F '%s,' /etc/openclash/game_rules.list |awk -F ',' '{print $3}' 2>/dev/null",e[t].name)),1,-2)
if e[t].filename == "" then
e[t].filename=string.sub(luci.sys.exec(string.format("grep -F '%s,' /etc/openclash/game_rules.list |awk -F ',' '{print $2}' 2>/dev/null",e[t].name)),1,-2)
end
RULE_FILE="/etc/openclash/game_rules/".. e[t].filename
if fs.mtime(RULE_FILE) then
e[t].mtime=os.date("%Y-%m-%d %H:%M:%S",fs.mtime(RULE_FILE))
else
e[t].mtime="/"
end
if fs.isfile(RULE_FILE) then
e[t].exist=translate("Exist")
else
e[t].exist=translate("Not Exist")
end
e[t].remove=0
end
end
file:close()
local rm = {
{rule_mg}
}
form=SimpleForm("filelist", translate("Game Rules List"))
form.description=translate("规则项目: SSTap-Rule ( https://github.com/FQrabbit/SSTap-Rule )<br/>")
form.reset=false
form.submit=false
tb=form:section(Table,e)
nu=tb:option(DummyValue,"num",translate("Order Number"))
st=tb:option(DummyValue,"exist",translate("State"))
nm=tb:option(DummyValue,"name",translate("Rule Name"))
fm=tb:option(DummyValue,"filename",translate("File Name"))
mt=tb:option(DummyValue,"mtime",translate("Update Time"))
rmg = m:section(Table, rm)
btnis=tb:option(DummyValue,"filename",translate("Download Rule"))
btnis.template="openclash/download_game_rule"
btnrm=tb:option(Button,"remove",translate("Remove"))
btnrm.render=function(e,t,a)
e.inputstyle="reset"
Button.render(e,t,a)
end
btnrm.write=function(a,t)
fs.unlink("/etc/openclash/game_rules/"..e[t].filename)
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "game-settings"))
o = rmg:option(Button, "rule_mg")
o.inputtitle = translate("Game Rules Manage")
o.inputstyle = "reload"
o.write = function()
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "game-rules-manage"))
end
local t = {
@ -181,4 +135,4 @@ o.write = function()
HTTP.redirect(DISP.build_url("admin", "services", "openclash"))
end
return m, form
return m

View File

@ -0,0 +1,18 @@
<%+cbi/valueheader%>
<div style="text-align: center;">
<%
local val = self:cfgvalue(section)
if val == "启用" or val == "Enable" or val == "检查通过" or val == "Config Normal" then
%>
<div style="color: green; font-weight:bold;">
<%
else
%>
<div style="color: red; font-weight:bold;">
<%
end
write(pcdata(val))
%>
</div>
</div>
<%+cbi/valuefooter%>

View File

@ -14,15 +14,19 @@
if ( x && x.status == 200 ) {
if(status.game_rule_download_status=="0")
{
btn.value = '<%:下载失败%>';
btn.value = '<%:下载失败%>';
}
else
else if (status.game_rule_download_status=="1")
{
btn.value = '<%:下载成功%>';
btn.value = '<%:下载成功%>';
}
else if (status.game_rule_download_status=="2")
{
btn.value = '<%:规则没有更新%>';
}
}
else {
btn.value = '<%:下载超时%>';
btn.value = '<%:下载超时%>';
}
}
);

View File

@ -3,39 +3,21 @@
<table>
<tr><td width="100%" colspan="4">
<p align="center">
<b> 一些必要的状态显示,运行前请确保各项目显示正常,需要更新请到全局设置页面操作 </b>
<b> 组件的状态显示,运行前请确保各项目显示正常,需要更新请到全局设置页面操作 </b>
</p>
</td></tr>
<tr><td width="25%"> 正在使用的配置文件 </td><td width="25%" align="left" id="_config"><%:Collecting data...%></td><td width="25%"> 启动参数检查(配置文件) </td><td width="25%" align="left" id="_config_check"><%:Collecting data...%></td></tr>
<tr><td width="25%"> GEOIPBy 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%"> 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>
</table>
</fieldset>
<script type="text/javascript">//<![CDATA[
var config = document.getElementById('_config');
var ipdb = document.getElementById('_ipdb');
var lhie1 = document.getElementById('_lhie1');
var ConnersHua = document.getElementById('_ConnersHua');
var ConnersHua_return = document.getElementById('_ConnersHua_return');
var config_check = document.getElementById('_config_check');
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "state")%>', null, function(x, status) {
if ( x && x.status == 200 ) {
if (status.config_check == "") {
config_check.innerHTML = '<b><font color=green><%:Config Normal%></font></b>';
}
else if (status.config_check == "1") {
config_check.innerHTML = '<b><font color=red><%:未找到配置文件%></font></b>';
}
else {
config_check.innerHTML = '<b><font color=red>'+status.config_check+'<%: - 参数异常%></font></b>';
}
if (status.config == "1") {
config.innerHTML = "<b><font color=red><%:未找到配置文件%></font></b>";
}
else {
config.innerHTML = "<b><font color=green>"+status.config+"</font></b>";
}
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>";
@ -44,21 +26,6 @@
});
XHR.poll(10, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "state")%>', null, function(x, status) {
if ( x && x.status == 200 ) {
if (status.config_check == "") {
config_check.innerHTML = '<b><font color=green><%:Config Normal%></font></b>';
}
else if (status.config_check == "1") {
config_check.innerHTML = '<b><font color=red><%:未找到配置文件%></font></b>';
}
else {
config_check.innerHTML = '<b><font color=red>'+status.config_check+'<%: - 参数异常%></font></b>';
}
if (status.config == "1") {
config.innerHTML = "<b><font color=red><%:未找到配置文件%></font></b>";
}
else {
config.innerHTML = "<b><font color=green>"+status.config+"</font></b>";
}
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>";

View File

@ -56,11 +56,15 @@
else {
core_cv.innerHTML = "<b><font color=red><%:Unknown%></font></b>";
}
if ( status.corelv != "" && status.corelv != status.corecv && status.corecv != "" && status.corecv != "0" && status.corelv != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+status.corelv+"<%:<New>%></font></b>";
var corelv = status.corelv;
var arr_core = corelv.split(",");
var corelvis = arr_core[0];
var new_ch = arr_core[1];
if ( corelvis != "" && new_ch == "2" && status.corecv != "" && status.corecv != "0" && corelvis != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+corelvis+"<%:<New>%></font></b>";
}
else if (status.corelv != "" && status.corelv != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+status.corelv+"</font></b>";
else if (corelvis != "" && corelvis != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+corelvis+"</font></b>";
}
else {
core_lv.innerHTML = "<b><font color=red><%:Unknown%></font></b>";
@ -103,11 +107,15 @@
else {
core_cv.innerHTML = "<b><font color=red><%:Unknown%></font></b>";
}
if ( status.corelv != "" && status.corelv != status.corecv && status.corecv != "" && status.corecv != "0" && status.corelv != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+status.corelv+"<%:<New>%></font></b>";
var corelv = status.corelv;
var arr_core = corelv.split(",");
var corelvis = arr_core[0];
var new_ch = arr_core[1];
if ( corelvis != "" && new_ch == "2" && status.corecv != "" && status.corecv != "0" && corelvis != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+corelvis+"<%:<New>%></font></b>";
}
else if (status.corelv != "" && status.corelv != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+status.corelv+"</font></b>";
else if (corelvis != "" && corelvis != "\n" ) {
core_lv.innerHTML = "<b><font color=green>"+corelvis+"</font></b>";
}
else {
core_lv.innerHTML = "<b><font color=red><%:Unknown%></font></b>";

View File

@ -1,12 +1,18 @@
#!/bin/sh
CKTIME=$(date "+%Y-%m-%d-%H")
LAST_OPVER="/tmp/clash_last_version"
LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |awk -F '-' '{print $1$2}' |sed -i "s/v//" |sed -i "s/.//")
CLASH_VERF=$(echo "/etc/openclash/clash -v 2>/dev/null" && awk -F ' ' '{print $2}')
CLASH_VER=$(echo "$CLASH_VERF" 2>/dev/null |awk -F ' ' '{print $2}' |awk -F '-' '{print $1$2}' |sed -i "s/v//" |sed -i "s/.//")
version_url="https://raw.githubusercontent.com/vernesong/OpenClash/master/core_version"
if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{print $2}')" ]; then
curl -sL --connect-timeout 10 --retry 2 "$version_url" -o $LAST_OPVER >/dev/null 2>&1
if [ "$?" -eq "0" ] && [ "$(ls -l $LAST_OPVER 2>/dev/null |awk '{print int($5)}')" -gt 0 ]; then
if [ "$?" -eq "0" ] && [ -s "$LAST_OPVER" ]; then
echo "CheckTime:$CKTIME" >>$LAST_OPVER
else
rm -rf $LAST_OPVER
fi
fi
if [ "$LAST_VER" -gt "$CLASH_VER" ]; then
return 2
fi

View File

@ -8,34 +8,23 @@
fi
RULE_FILE_DIR="/etc/openclash/game_rules/$RULE_FILE_NAME"
TMP_RULE_DIR="/tmp/$RULE_FILE_NAME"
START_LOG="/tmp/openclash_start.log"
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
LOG_FILE="/tmp/openclash.log"
echo "开始下载【$RULE_FILE_NAME】规则..." >$START_LOG
curl -sL --connect-timeout 10 --retry 2 https://raw.githubusercontent.com/FQrabbit/SSTap-Rule/master/rules/"$DOWNLOAD_PATH" -o "$TMP_RULE_DIR" >/dev/null 2>&1
if [ "$?" -eq "0" ] && [ "$(ls -l $TMP_RULE_DIR |awk '{print $5}')" -ne 0 ]; then
echo "$RULE_FILE_NAME】规则下载成功,检查规则版本是否更新..." >$START_LOG
cmp -s $TMP_RULE_DIR $RULE_FILE_DIR
if [ "$?" -ne "0" ]; then
echo "规则版本有更新,开始替换旧规则版本..." >$START_LOG\
&& mv $TMP_RULE_DIR $RULE_FILE_DIR >/dev/null 2>&1\
&& echo "删除下载缓存..." >$START_LOG\
mv $TMP_RULE_DIR $RULE_FILE_DIR >/dev/null 2>&1\
&& rm -rf $TMP_RULE_DIR >/dev/null 2>&1
echo "$RULE_FILE_NAME】规则更新成功!" >$START_LOG
echo "${LOGTIME} Rule File【$RULE_FILE_NAME】 Download Successful" >>$LOG_FILE
sleep 3
echo "" >$START_LOG
return 1
else
echo "$RULE_FILE_NAME】规则版本没有更新,停止继续操作..." >$START_LOG
echo "${LOGTIME} Updated Rule File【$RULE_FILE_NAME】 No Change, Do Nothing" >>$LOG_FILE
rm -rf $TMP_RULE_DIR >/dev/null 2>&1
sleep 3
echo "" >$START_LOG
return 2
fi
else
echo "$RULE_FILE_NAME】规则下载失败,请检查网络或稍后再试!" >$START_LOG
rm -rf $TMP_RULE_DIR >/dev/null 2>&1
echo "${LOGTIME} Rule File【$RULE_FILE_NAME】 Download Error" >>$LOG_FILE
sleep 3
echo "" >$START_LOG
return 0
fi

View File

@ -12,6 +12,6 @@ do
else
GORUP_NAME=$(echo $line |awk -F '#*#' '{print $1}')
NOW_NAME=$(echo $line |awk -F '#*#' '{print $3}')
curl --connect-timeout 5 --retry 2 -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X PUT -d '{"name":"'"$NOW_NAME"'"}' http://"$LAN_IP":"$PORT"/proxies/"$GORUP_NAME" >/dev/null 2>&1
curl -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X PUT -d '{"name":"'"$NOW_NAME"'"}' http://"$LAN_IP":"$PORT"/proxies/"$GORUP_NAME" >/dev/null 2>&1
fi
done >/dev/null 2>&1

View File

@ -18,7 +18,7 @@ if [ "$enable" -eq 1 ]; then
if [ "$CRASH_NUM" -le 3 ]; then
CONFIG_FILE=$(uci get openclash.config.config_path 2>/dev/null)
echo "${LOGTIME} Watchdog: Clash Core Problem, Restart." >> $LOG_FILE
nohup $CLASH -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
nohup "$CLASH" -d "$CLASH_CONFIG" -f "$CONFIG_FILE" >> $LOG_FILE 2>&1 &
sleep 3
/usr/share/openclash/openclash_history_set.sh
else

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,30 +1,33 @@
/** @license React v0.0.0-experimental-f42431abe
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*!
Copyright (c) 2015 Jed Watson.
Based on code that is Copyright 2013-2015, Facebook, Inc.
All rights reserved.
*/
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2015 Jed Watson.
Based on code that is Copyright 2013-2015, Facebook, Inc.
All rights reserved.
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
* Adapted from jQuery UI core
*
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@ -40,6 +43,15 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/** @license React v0.0.0-experimental-241c4467e
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.6.1
* react-cache.production.min.js
*
@ -48,24 +60,3 @@ and limitations under the License.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*!
* Adapted from jQuery UI core
*
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
/** @license React v16.11.0
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@ -29,13 +29,13 @@
<div id="app"></div>
<script src="runtime.ded9d303f4333455472b.js" type="text/javascript"></script>
<script src="runtime.bff50a6a16255f3cd6b4.js" type="text/javascript"></script>
<script src="core-js~app.bee8eb27b94a9dc46ebe.js" type="text/javascript"></script>
<script src="core-js~app.ed5efc5f285120e8ca95.js" type="text/javascript"></script>
<script src="react~app.0e7d4c38821c1ecfbf2f.js" type="text/javascript"></script>
<script src="react~app.71e146262a2c1f21d27e.js" type="text/javascript"></script>
<script src="app.9f29cd9cb7f46e88a014.js" type="text/javascript"></script>
<script src="app.bd4b077ac38d27d94ff2.js" type="text/javascript"></script>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +0,0 @@
._2V-RqIAl7n{border-radius:20px;padding:3px 0;color:#eee;font-size:.6em}@media screen and (min-width:30em){._2V-RqIAl7n{font-size:1em}}
.NpfXwxWAxo{position:relative;padding:5px;border-radius:8px;overflow:hidden;max-width:280px;background-color:var(--color-bg-proxy-selected)}@media screen and (min-width:30em){.NpfXwxWAxo{min-width:150px;border-radius:10px;padding:10px}}.NpfXwxWAxo._2zD7drviYH{background-color:var(--color-focus-blue);color:#ddd}.NpfXwxWAxo._2bylJNYYdN{opacity:.5}._1rVl-Kdmss{font-family:var(--font-mono);font-size:.6em}@media screen and (min-width:30em){._1rVl-Kdmss{font-size:1em}}._3kdi5nima5{width:100%;overflow:hidden;text-overflow:ellipsis;margin-bottom:5px;font-size:.85em}@media screen and (min-width:30em){._3kdi5nima5{font-size:1.1em}}._12JM32OJa5{height:30px;display:-webkit-box;display:flex;-webkit-box-align:end;align-items:flex-end}._3NpxWygDxO{width:12px;height:12px;border-radius:8px}._3NpxWygDxO ._2zD7drviYH{outline:1px solid pink}
._3PCSxT0l14{margin-bottom:12px}._1yYRIyvlRd{display:-webkit-box;display:flex;flex-wrap:wrap;margin-top:8px}._1OcDlvlM5R{margin-right:5px;margin-bottom:5px;-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}@media screen and (min-width:30em){._1OcDlvlM5R{margin-right:10px;margin-bottom:10px}}._1OcDlvlM5R._3oAxPKtZFv{cursor:pointer}._1OcDlvlM5R._3oAxPKtZFv:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px)}
._1cq9WGaZ9s{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;cursor:pointer}._1cq9WGaZ9s ._1cAwPwoPmt{display:-webkit-inline-box;display:inline-flex;-webkit-transform:rotate(0deg);transform:rotate(0deg);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}._1cq9WGaZ9s ._1cAwPwoPmt.sDt5qh1OfE{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._1cq9WGaZ9s ._1cAwPwoPmt:focus{outline:var(--color-focus-blue) solid 1px}._3GVE9k27aM{margin-bottom:12px}._3GVE9k27aM small{color:#777}._1PV2l5z2zN{padding:10px 15px}@media screen and (min-width:30em){._1PV2l5z2zN{padding:10px 40px}}._1b5XrAhEUm{display:-webkit-box;display:flex}._1b5XrAhEUm button{margin:0 5px}._1b5XrAhEUm button:first-child{margin-left:0}._2t6Q6BkZ73{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;cursor:pointer}
._1myfcMimT9{padding:10px 15px}@media screen and (min-width:30em){._1myfcMimT9{padding:10px 40px}}

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,4 @@
/** @license React v0.0.0-experimental-f42431abe
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v0.0.0-experimental-f42431abe
/** @license React v0.0.0-experimental-241c4467e
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@ -15,3 +6,12 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v0.0.0-experimental-241c4467e
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{BVyM:function(e,t,a){"use strict";a.r(t);var r=a("ODXe"),n=a("q1tI"),c=a.n(n),i=a("5Wrh"),l=a("iR1w"),o=a("OAQO"),u=a("WfPo"),s=a("OADI"),f=a("DKqX"),p=a("17x9"),m=a.n(p),d=a("xrux"),v=a.n(d),b={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function y(e){var t=e.type,a=e.payload,r=e.proxy,n=e.id,i=function(e){var t=e.proxy,a=b._default;return b[t]&&(a=b[t]),{color:a}}({proxy:r});return c.a.createElement("div",{className:v.a.rule},c.a.createElement("div",{className:v.a.left},n),c.a.createElement("div",null,c.a.createElement("div",{className:v.a.b},a),c.a.createElement("div",{className:v.a.a},c.a.createElement("div",{className:v.a.type},t),c.a.createElement("div",{style:i},r))))}y.propTypes={id:m.a.number,type:m.a.string,payload:m.a.string,proxy:m.a.string};var O=y,E=a("II4a"),h=a("EwbC"),g=Object(u.a)((function(e){return{searchText:Object(h.d)(e),updateSearchText:h.f}}))(E.a),w=a("Kv4h"),x=c.a.memo,j=c.a.useEffect,k=c.a.useMemo,C=c.a.useCallback;function N(e,t){return t[e].id}var I=x((function(e){var t=e.index,a=e.style,r=e.data[t];return c.a.createElement("div",{style:a},c.a.createElement(O,r))}),l.b);t.default=Object(u.a)((function(e){return{apiConfig:Object(s.b)(e),rules:Object(h.c)(e)}}))((function(e){var t=e.dispatch,a=e.apiConfig,n=e.rules,u=C((function(){t(Object(h.a)(a))}),[a,t]);j((function(){t(Object(h.b)(a))}),[t,a]);var s=Object(w.a)(),p=Object(r.a)(s,2),m=p[0],d=p[1],v=k((function(){return c.a.createElement(o.a,{width:16})}),[]);return c.a.createElement("div",null,c.a.createElement(f.a,{title:"Rules"}),c.a.createElement(g,null),c.a.createElement("div",{ref:m,style:{paddingBottom:30}},c.a.createElement(l.a,{height:d-30,width:"100%",itemCount:n.length,itemSize:80,itemData:n,itemKey:N},I)),c.a.createElement("div",{className:"fabgrp"},c.a.createElement(i.a,{text:"Refresh",start:v,onClick:u})))}))},OAQO:function(e,t,a){"use strict";var r=a("q1tI"),n=a.n(r),c=a("17x9"),i=a.n(c);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},c=Object.keys(e);for(r=0;r<c.length;r++)a=c[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)a=c[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var u=function(e){var t=e.color,a=e.size,r=o(e,["color","size"]);return n.a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),n.a.createElement("polyline",{points:"23 4 23 10 17 10"}),n.a.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))};u.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},u.defaultProps={color:"currentColor",size:"24"},t.a=u},xrux:function(e,t,a){e.exports={rule:"_3eSLieOhVX",left:"_2n1pW09UvV",a:"t1XJIwvW7A",b:"_1fNf8kj0HA",type:"_3yJmN0tON0"}}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{BVyM:function(e,t,a){"use strict";a.r(t);var r=a("ODXe"),n=a("q1tI"),c=a.n(n),i=a("5Wrh"),l=a("iR1w"),o=a("OAQO"),u=a("WfPo"),s=a("OADI"),f=a("DKqX"),p=a("17x9"),m=a.n(p),d=a("xrux"),v=a.n(d),b={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function y(e){var t=e.type,a=e.payload,r=e.proxy,n=e.id,i=function(e){var t=e.proxy,a=b._default;return b[t]&&(a=b[t]),{color:a}}({proxy:r});return c.a.createElement("div",{className:v.a.rule},c.a.createElement("div",{className:v.a.left},n),c.a.createElement("div",null,c.a.createElement("div",{className:v.a.b},a),c.a.createElement("div",{className:v.a.a},c.a.createElement("div",{className:v.a.type},t),c.a.createElement("div",{style:i},r))))}y.propTypes={id:m.a.number,type:m.a.string,payload:m.a.string,proxy:m.a.string};var O=y,E=a("II4a"),h=a("EwbC"),g=Object(u.a)((function(e){return{searchText:Object(h.d)(e),updateSearchText:h.f}}))(E.a),w=a("Kv4h"),x=c.a.memo,j=c.a.useEffect,k=c.a.useMemo,C=c.a.useCallback,N=30;function I(e,t){return t[e].id}var T=x((function(e){var t=e.index,a=e.style,r=e.data[t];return c.a.createElement("div",{style:a},c.a.createElement(O,r))}),l.b);t.default=Object(u.a)((function(e){return{apiConfig:Object(s.b)(e),rules:Object(h.c)(e)}}))((function(e){var t=e.dispatch,a=e.apiConfig,n=e.rules,u=C((function(){t(Object(h.a)(a))}),[a,t]);j((function(){t(Object(h.b)(a))}),[t,a]);var s=Object(w.a)(),p=Object(r.a)(s,2),m=p[0],d=p[1],v=k((function(){return c.a.createElement(o.a,{width:16})}),[]);return c.a.createElement("div",null,c.a.createElement(f.a,{title:"Rules"}),c.a.createElement(g,null),c.a.createElement("div",{ref:m,style:{paddingBottom:N}},c.a.createElement(l.a,{height:d-N,width:"100%",itemCount:n.length,itemSize:80,itemData:n,itemKey:I},T)),c.a.createElement("div",{className:"fabgrp"},c.a.createElement(i.a,{text:"Refresh",start:v,onClick:u})))}))},OAQO:function(e,t,a){"use strict";var r=a("q1tI"),n=a.n(r),c=a("17x9"),i=a.n(c);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},c=Object.keys(e);for(r=0;r<c.length;r++)a=c[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)a=c[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var u=function(e){var t=e.color,a=e.size,r=o(e,["color","size"]);return n.a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),n.a.createElement("polyline",{points:"23 4 23 10 17 10"}),n.a.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))};u.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},u.defaultProps={color:"currentColor",size:"24"},t.a=u},xrux:function(e,t,a){e.exports={rule:"_3eSLieOhVX",left:"_2n1pW09UvV",a:"t1XJIwvW7A",b:"_1fNf8kj0HA",type:"_3yJmN0tON0"}}}]);

View File

@ -1 +1 @@
!function(e){function t(t){for(var n,o,i=t[0],l=t[1],f=t[2],d=t[3]||[],s=0,h=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&h.push(a[o][0]),a[o]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(t),u.push.apply(u,d);h.length;)h.shift()();return c.push.apply(c,f||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=l(l.s=r[0]))}return 0===c.length&&(u.forEach((function(e){if(void 0===a[e]){a[e]=null;var t=document.createElement("link");l.nc&&t.setAttribute("nonce",l.nc),t.rel="prefetch",t.as="script",t.href=i(e),document.head.appendChild(t)}})),u.length=0),e}var n={},o={5:0},a={5:0},c=[],u=[];function i(e){return l.p+""+({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"6cc15bdf1bc70c0d1a8d",4:"32658050e64361773fc6",6:"0775b8169f7ef69511b0",7:"7b8f1dc3f02b17f47fdd",8:"788ab61adcbd1ce75d98"}[e]+".js"}function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{2:1,4:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n=({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"d435411ad74e5f59ce94",4:"f60a65ba29535b87ba96",6:"31d6cfe0d16ae931b73c",7:"31d6cfe0d16ae931b73c",8:"31d6cfe0d16ae931b73c"}[e]+".css",a=l.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var i=(d=c[u]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(i===n||i===a))return t()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){var d;if((i=(d=f[u]).getAttribute("data-href"))===n||i===a)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var n=t&&t.target&&t.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],s.parentNode.removeChild(s),r(c)},s.href=a,document.getElementsByTagName("head")[0].appendChild(s)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,l.nc&&u.setAttribute("nonce",l.nc),u.src=i(e);var f=new Error;c=function(t){u.onerror=u.onload=null,clearTimeout(d);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,r[1](f)}a[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:u})}),12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(t)},l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],d=f.push.bind(f);f.push=t,f=f.slice();for(var s=0;s<f.length;s++)t(f[s]);var p=d;r()}([]);
!function(e){function t(t){for(var n,o,i=t[0],l=t[1],f=t[2],s=t[3]||[],d=0,h=[];d<i.length;d++)o=i[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&h.push(a[o][0]),a[o]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(t),u.push.apply(u,s);h.length;)h.shift()();return c.push.apply(c,f||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=l(l.s=r[0]))}return 0===c.length&&(u.forEach((function(e){if(void 0===a[e]){a[e]=null;var t=document.createElement("link");l.nc&&t.setAttribute("nonce",l.nc),t.rel="prefetch",t.as="script",t.href=i(e),document.head.appendChild(t)}})),u.length=0),e}var n={},o={5:0},a={5:0},c=[],u=[];function i(e){return l.p+""+({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"c47b16ee58ce8279a498",4:"14d9a873af5f71681a8b",6:"7079553c634b376d7c1c",7:"0af997e119f76c516134",8:"3361cb36d32327fae41e"}[e]+".js"}function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{2:1,4:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n=({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"241abbb3a6eecf3d305f",4:"f60a65ba29535b87ba96",6:"31d6cfe0d16ae931b73c",7:"31d6cfe0d16ae931b73c",8:"31d6cfe0d16ae931b73c"}[e]+".css",a=l.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var i=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(i===n||i===a))return t()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){var s;if((i=(s=f[u]).getAttribute("data-href"))===n||i===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.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],d.parentNode.removeChild(d),r(c)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,l.nc&&u.setAttribute("nonce",l.nc),u.src=i(e);var f=new Error;c=function(t){u.onerror=u.onload=null,clearTimeout(s);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,r[1](f)}a[e]=void 0}};var s=setTimeout((function(){c({type:"timeout",target:u})}),12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(t)},l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],s=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var p=s;r()}([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@ if [ "$2" != 0 ]; then
Netease_Music=$(grep '##Netease_Music:' "$4" |awk -F ':' '{print $2}')
Speedtest=$(grep '##Speedtest:' "$4" |awk -F ':' '{print $2}')
Telegram=$(grep '##Telegram:' "$4" |awk -F ':' '{print $2}')
if [ "$2" = "ConnersHua_return" ]; then
if [ "$(uci get openclash.config.Proxy)" != "$Proxy" ]\
|| [ "$(uci get openclash.config.Others)" != "$Others" ];then
@ -60,7 +61,7 @@ if [ "$2" != 0 ]; then
fi
fi
}
if [ "$check_def" -eq 1 ]; then
GlobalTV=$(uci get openclash.config.GlobalTV 2>/dev/null)
AsianTV=$(uci get openclash.config.AsianTV 2>/dev/null)
@ -118,14 +119,25 @@ elif [ "$2" = 0 ]; then
fi
}
fi
sed -i '/^##Custom Rules/,/^##Custom Rules End/d' "$4" 2>/dev/null
sed -i '/^##Custom Rules/d' "$4" 2>/dev/null
sed -i '/^##Custom Rules End/d' "$4" 2>/dev/null
[ "$3" = 1 ] && {
sed -i '/^Rule:/a\##Custom Rules End##' "$4" 2>/dev/null
sed -i '/^Rule:/a\##Custom Rules##' "$4" 2>/dev/null
sed -i '/^##Custom Rules##/r/etc/openclash/custom/openclash_custom_rules.list' "$4" 2>/dev/null
sed -i "s/^ \{0,\}-/-/" "$4" 2>/dev/null #修改参数空格
sed -i "s/^\t\{0,\}-/-/" "$4" 2>/dev/null #修改参数tab
}
if [ "$3" = 1 ]; then
sed -i '/^Rule:/a\##Custom Rules End##' "$4" 2>/dev/null
sed -i '/^Rule:/a\##Custom Rules##' "$4" 2>/dev/null
sed -i '/^##Custom Rules##/r/etc/openclash/custom/openclash_custom_rules.list' "$4" 2>/dev/null
fi
if [ "$5" = 1 ] || [ "$3" = 1 ] || [ -z "$(grep '- IP-CIDR,198.18.0.1/16,REJECT,no-resolve' "$4")" ]; then
sed -i "s/^ \{0,\}-/-/" "$4" 2>/dev/null #修改参数空格
sed -i "s/^\t\{0,\}-/-/" "$4" 2>/dev/null #修改参数tab
fi
if [ -z "$(grep '- IP-CIDR,198.18.0.1/16,REJECT,no-resolve' "$4")" ] && [ "$6" = "fake-ip" ]; then
if [ ! -z "$(grep "^ \{0,\}- IP-CIDR,198.18.0.1/16" "$4")" ]; then
sed -i "/^ \{0,\}- IP-CIDR,198.18.0.1\/16/c\- IP-CIDR,198.18.0.1\/16,REJECT,no-resolve" "$4"
else
sed -i "/^ \{0,\}- GEOIP/i\- IP-CIDR,198.18.0.1\/16,REJECT,no-resolve" "$4"
fi
fi

View File

@ -108,7 +108,7 @@ msgid "fake-ip-vpn(game mode)"
msgstr "Fake-IP游戏模式【依赖kmod-tun】"
msgid "Select Mode For OpenClash Work, Try Flush DNS Cache If Network Error"
msgstr "选择运行模式如客户端的网络异常请尝试清除DNS缓存"
msgstr "选择运行模式,Redir-Host模式下无法代理路由器自身流量如客户端的网络异常请尝试清除DNS缓存"
msgid "Proxy Mode"
msgstr "*代理模式"
@ -304,8 +304,11 @@ msgstr "配置文件订阅地址"
msgid "Auto Update Server subscription"
msgstr "自动更新配置文件"
msgid "You Can Modify config file Here, Except The Settings That Were Taken Over"
msgstr "您可以在下方直接修改配置文件, 仅支持未被接管的设置"
msgid "Modify Your Config file:"
msgstr "您可以在下方直接修改配置文件:"
msgid "Here, Except The Settings That Were Taken Over"
msgstr ",仅支持未被接管的设置"
msgid "Default Config File With Correct General-Settings"
msgstr "参考配置文件,方便您查询各项参数注释和正确的设置、顺序"
@ -750,6 +753,8 @@ msgstr "未下载"
msgid "Order Number"
msgstr "序号"
msgid "Game Rules Manage"
msgstr "管理游戏规则"