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 d6ec52c commit 047bf2b
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 @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion xray.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

args=$@
is_sh_ver=v1.12
is_sh_ver=v1.13

. /etc/xray/sh/src/init.sh

0 comments on commit 047bf2b

Please sign in to comment.