mirror of
https://github.com/TheyCallMeSecond/sing-box-manager.git
synced 2024-11-16 11:42:39 +08:00
Update Install.sh
This commit is contained in:
parent
3eed1e21d4
commit
4d7e623ef9
|
@ -978,6 +978,11 @@ function get_domain() {
|
|||
|
||||
resolved_ipv4=$(dig +short A "$domain" 2>/dev/null)
|
||||
resolved_ipv6=$(dig +short AAAA "$domain" 2>/dev/null)
|
||||
echo "输入的域名:$domain"
|
||||
echo "本地IPv4地址:$local_ip_v4"
|
||||
echo "本地IPv6地址:$local_ip_v6"
|
||||
echo "解析的IPv4地址:$resolved_ipv4"
|
||||
echo "解析的IPv6地址:$resolved_ipv6"
|
||||
|
||||
if [[ -z $domain ]]; then
|
||||
echo -e "${RED}错误:域名不能为空,请重新输入。${NC}"
|
||||
|
@ -986,6 +991,7 @@ function get_domain() {
|
|||
break
|
||||
else
|
||||
resolved_ip=$(ping "$domain" -c 1 | sed '1{s/[^(]*(//;s/).*//;q}')
|
||||
echo "解析的IP地址(ping):$resolved_ip"
|
||||
if [[ ("$resolved_ipv4" == "$local_ip_v4" && ! -z "$resolved_ipv4") || ("$resolved_ipv6" == "$local_ip_v6" && ! -z "$resolved_ipv6") ]]; then
|
||||
break
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user