diff --git a/src/core.sh b/src/core.sh index 0293cd4..69f0130 100644 --- a/src/core.sh +++ b/src/core.sh @@ -1378,7 +1378,9 @@ get() { [[ $? != 0 ]] && err "无法生成 Shadowsocks 2022 密码, 请安装 openssl." ;; ping) - is_host_dns=$(ping $host -c 1 -W 2 | head -1) + is_ip_type="-4" + [[ $(grep ":" <<<$ip) ]] && is_ip_type="-6" + is_host_dns=$(ping $host $is_ip_type -c 1 -W 2 | head -1) ;; log | logerr) msg "\n 提醒: 按 $(_green Ctrl + C) 退出\n" diff --git a/xray.sh b/xray.sh index 6402d63..6d3793a 100644 --- a/xray.sh +++ b/xray.sh @@ -1,6 +1,6 @@ #!/bin/bash args=$@ -is_sh_ver=v1.12 +is_sh_ver=v1.13 . /etc/xray/sh/src/init.sh \ No newline at end of file