style: format code

This commit is contained in:
Sofia
2026-01-15 15:35:19 +08:00
committed by GitHub
parent 281595f79f
commit a5668dd94b

View File

@@ -525,13 +525,13 @@ testcommand(){
netstat -ntulp | grep 53
echo "-----------------------------------------------"
echo -e "可以使用\033[44m netstat -ntulp |grep xxx \033[0m来查询任意(xxx)端口"
exit;
exit
;;
3)
echo "-----------------------------------------------"
openssl speed -multi 4 -evp aes-128-gcm
echo "-----------------------------------------------"
exit;
exit
;;
4)
if [ "$firewall_mod" = "nftables" ]; then
@@ -582,20 +582,26 @@ testcommand(){
echo "----------------本机防火墙---------------------"
iptables -L INPUT --line-numbers
fi
exit;
exit
;;
5)
echo "-----------------------------------------------"
sed -n '1,40p' ${config_path}
echo "-----------------------------------------------"
exit;
exit
;;
6)
echo "注意依赖curl(不支持wget),且测试结果不保证一定准确!"
delay=`curl -kx ${authentication}@127.0.0.1:$mix_port -o /dev/null -s -w '%{time_starttransfer}' 'https://google.tw' & { sleep 3 ; kill $! >/dev/null 2>&1 & }` > /dev/null 2>&1
delay=`echo |awk "{print $delay*1000}"` > /dev/null 2>&1
delay=$(
curl -kx ${authentication}@127.0.0.1:$mix_port -o /dev/null -s -w '%{time_starttransfer}' 'https://google.tw' &
{
sleep 3
kill $! >/dev/null 2>&1 &
}
) >/dev/null 2>&1
delay=$(echo | awk "{print $delay*1000}") >/dev/null 2>&1
echo "-----------------------------------------------"
if [ `echo ${#delay}` -gt 1 ];then
if [ $(echo ${#delay}) -gt 1 ]; then
echo -e "\033[32m连接成功响应时间为"$delay" ms\033[0m"
else
echo -e "\033[31m连接超时请重试或检查节点配置\033[0m"
@@ -608,6 +614,7 @@ testcommand(){
;;
esac
}
debug() {
echo "$crashcore" | grep -q 'singbox' && config_tmp="$TMPDIR"/jsons || config_tmp="$TMPDIR"/config.yaml
echo "-----------------------------------------------"
@@ -635,7 +642,10 @@ debug(){
"$CRASHDIR"/start.sh bfstart
if echo "$crashcore" | grep -q 'singbox'; then
"$TMPDIR"/CrashCore run -D "$BINDIR" -C "$TMPDIR"/jsons &
{ sleep 4 ; kill $! >/dev/null 2>&1 & }
{
sleep 4
kill $! >/dev/null 2>&1 &
}
wait
else
"$TMPDIR"/CrashCore -t -d "$BINDIR" -f "$TMPDIR"/config.yaml
@@ -684,4 +694,3 @@ debug(){
;;
esac
}