Update wireguard.sh
fix getting external ipv4
This commit is contained in:
parent
a66c631e16
commit
03c90e8f1e
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ DNS = 8.8.8.8
|
|||
[Peer]
|
||||
PublicKey = $(cat /etc/wireguard/publickey)
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = $(ip -br a s | grep -e '^en' | sed 's/\/32 metric.*//;s/.* //'):78
|
||||
Endpoint = $(ip route get 8.8.8.8 | head -n 1 | sed 's/.*src //' | sed 's/ .*//'):78
|
||||
PEERINFO
|
||||
done
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue