433 B
433 B
$ wg genkey
aMz2AWIQIkyAUhs7b7UU7fEBHCeD3OBvMJFSfaNvq34=
$ docker run -it -d --name wg --cap-add NET_ADMIN --device /dev/net/tun:/dev/net/tun -v wg-access-server-data:/data -e "WG_ADMIN_PASSWORD=ds4810" -e "WG_WIREGUARD_PRIVATE_KEY=aMz2AWIQIkyAUhs7b7UU7fEBHCeD3OBvMJFSfaNvq34=" -p 8000:8000/tcp -p 51820:51820/udp place1/wg-access-server
#客户端
sudo mv wg.conf /etc/wireguard/
wg-quick up wg