Skip to content

Commit

Permalink
fix ping host ip type
Browse files Browse the repository at this point in the history
  • Loading branch information
233boy committed Jul 12, 2023
1 parent 5c6f48d commit 67387eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,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"
Expand Down
2 changes: 1 addition & 1 deletion v2ray.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

args=$@
is_sh_ver=v4.11
is_sh_ver=v4.12

. /etc/v2ray/sh/src/init.sh

0 comments on commit 67387eb

Please sign in to comment.