1
0
mirror of synced 2024-11-22 13:06:02 +03:00

Update IKEv2 script

- Advanced users can specify the server's IP address using variable
  VPN_PUBLIC_IP instead of auto-detect
This commit is contained in:
hwdsl2 2021-05-11 09:59:29 -05:00
parent 293e5d999a
commit 3014143e15

View File

@ -345,7 +345,8 @@ get_export_dir() {
get_server_ip() {
bigecho2 "Trying to auto discover IP of this server..."
public_ip=$(dig @resolver1.opendns.com -t A -4 myip.opendns.com +short)
public_ip=${VPN_PUBLIC_IP:-''}
check_ip "$public_ip" || public_ip=$(dig @resolver1.opendns.com -t A -4 myip.opendns.com +short)
check_ip "$public_ip" || public_ip=$(wget -t 3 -T 15 -qO- http://ipv4.icanhazip.com)
}