1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-06-05 04:50:49 +00:00

add public ip addr to client conf file

This commit is contained in:
BlackcatRs 2021-03-25 21:44:40 +01:00
parent 6ced764318
commit 85f251cc81

View File

@ -219,7 +219,7 @@ net.ipv6.conf.all.forwarding = 1" >/etc/sysctl.d/wg.conf
}
function newClient() {
ENDPOINT="${SERVER_PUB_IP}:${SERVER_PORT}"
ENDPOINT="$(grep -m 1 -oE '^[0-9]{1,3}(\.[0-9]{1,3}){3}$' <<< "$(wget -T 10 -t 1 -4qO- "http://ip1.dynupdate.no-ip.com/" || curl -m 10 -4Ls "http://ip1.dynupdate.no-ip.com/")"):${SERVER_PORT}"
echo ""
echo "Tell me a name for the client."