angristan / wireguard-install

WireGuard VPN installer for Linux servers
https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
MIT License
7.58k stars 1.27k forks source link

Invalid client QR code after WG reinstallation #319

Closed cipo-cipollino closed 1 year ago

cipo-cipollino commented 2 years ago

Due to the change of the WG endpoint, WG was uninstalled using the script and, with the changed endpoint, reinstalled.

The same username was used during the reinstallation.

When scanning the client QR code with the iPhone Xs (latest FW and WG client app), an error message appeared like read "invalid QR code".

Apparently, in the course of the reinstallations in the wg0-client-user.conf file further [Peer] sections with the new endpoints are added and taken over in the QR code, and this obviously leads to the invalidity of the code or the information to be transmitted.

Question: Shouldn't the original [Peer] section in the wg0-client-user.conf file be replaced with a new section or should wg0-client-user.conf be deleted during the uninstallation?

angristan commented 1 year ago

Fixed with https://github.com/angristan/wireguard-install/commit/258eb9441b81f4bb35922fa6cf43fbbf3cf2241e