Skip to content

Commit

Permalink
Fix public IP detection: ip.seeip.org has been changed to api.seeip.o…
Browse files Browse the repository at this point in the history
…rg (#1252)
  • Loading branch information
xiahare authored Nov 7, 2024
1 parent 2ce1ee7 commit 56660ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -627,11 +627,11 @@ function installOpenVPN() {
# Behind NAT, we'll default to the publicly reachable IPv4/IPv6.
if [[ $IPV6_SUPPORT == "y" ]]; then
if ! PUBLIC_IP=$(curl -f --retry 5 --retry-connrefused https://ip.seeip.org); then
if ! PUBLIC_IP=$(curl -f --retry 5 --retry-connrefused https://api.seeip.org); then
PUBLIC_IP=$(dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')
fi
else
if ! PUBLIC_IP=$(curl -f --retry 5 --retry-connrefused -4 https://ip.seeip.org); then
if ! PUBLIC_IP=$(curl -f --retry 5 --retry-connrefused -4 https://api.seeip.org); then
PUBLIC_IP=$(dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')
fi
fi
Expand Down

0 comments on commit 56660ee

Please sign in to comment.