Skip to content

Commit 88aa4ac

Browse files
committed
fix get ip err
1 parent 8eb73d4 commit 88aa4ac

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

install.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ download() {
189189

190190
# get server ip
191191
get_ip() {
192-
export "$(_wget -4 -qO- https://cloudflare-dns.com/cdn-cgi/trace | grep ip=)" &>/dev/null
193-
[[ -z $ip ]] && export "$(_wget -6 -qO- https://cloudflare-dns.com/cdn-cgi/trace | grep ip=)" &>/dev/null
192+
export "$(_wget -4 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=)" &>/dev/null
193+
[[ -z $ip ]] && export "$(_wget -6 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=)" &>/dev/null
194194
}
195195

196196
# check background tasks status

src/core.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ get_uuid() {
125125

126126
get_ip() {
127127
[[ $ip || $is_no_auto_tls || $is_gen ]] && return
128-
export "$(_wget -4 -qO- https://cloudflare-dns.com/cdn-cgi/trace | grep ip=)" &>/dev/null
129-
[[ ! $ip ]] && export "$(_wget -6 -qO- https://cloudflare-dns.com/cdn-cgi/trace | grep ip=)" &>/dev/null
128+
export "$(_wget -4 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=)" &>/dev/null
129+
[[ ! $ip ]] && export "$(_wget -6 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=)" &>/dev/null
130130
[[ ! $ip ]] && {
131131
err "获取服务器 IP 失败.."
132132
}
@@ -1383,7 +1383,7 @@ get() {
13831383
# is_host_dns=$(ping $host $is_ip_type -c 1 -W 2 | head -1)
13841384
is_dns_type="a"
13851385
[[ $(grep ":" <<<$ip) ]] && is_dns_type="aaaa"
1386-
is_host_dns=$(_wget -qO- --header="accept: application/dns-json" "https://cloudflare-dns.com/dns-query?name=$host&type=$is_dns_type")
1386+
is_host_dns=$(_wget -qO- --header="accept: application/dns-json" "https://one.one.one.one/dns-query?name=$host&type=$is_dns_type")
13871387
;;
13881388
log | logerr)
13891389
msg "\n 提醒: 按 $(_green Ctrl + C) 退出\n"

xray.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

33
args=$@
4-
is_sh_ver=v1.14
4+
is_sh_ver=v1.15
55

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

0 commit comments

Comments
 (0)