mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 19:55:57 +08:00
Merge pull request #479 from RikudouPatrickstar/patch-1
更新 web_save 适配 clash meta 1.5.1 报文格式
This commit is contained in:
commit
08cafce182
|
@ -1043,7 +1043,7 @@ stop_firewall(){
|
|||
#面板配置保存相关
|
||||
web_save(){
|
||||
#使用get_save获取面板节点设置
|
||||
get_save http://127.0.0.1:${db_port}/proxies | awk -F ':\\{"' '{for(i=1;i<=NF;i++) print $i}' | grep -aE '^all".*"Selector"' > $TMPDIR/clash_web_check_$USER
|
||||
get_save http://127.0.0.1:${db_port}/proxies | awk -F ':\\{"' '{for(i=1;i<=NF;i++) print $i}' | grep -aE '(^all|^alive)".*"Selector"' > $TMPDIR/clash_web_check_$USER
|
||||
while read line ;do
|
||||
def=$(echo $line | awk -F "[[,]" '{print $2}')
|
||||
now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')
|
||||
|
|
Loading…
Reference in New Issue
Block a user