更新 web_save 适配 clash meta 1.5.1 报文格式
This commit is contained in:
committed by
GitHub
parent
36fe66a489
commit
8346c10b6d
@@ -1043,7 +1043,7 @@ stop_firewall(){
|
|||||||
#面板配置保存相关
|
#面板配置保存相关
|
||||||
web_save(){
|
web_save(){
|
||||||
#使用get_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
|
while read line ;do
|
||||||
def=$(echo $line | awk -F "[[,]" '{print $2}')
|
def=$(echo $line | awk -F "[[,]" '{print $2}')
|
||||||
now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')
|
now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')
|
||||||
|
|||||||
Reference in New Issue
Block a user