Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Diffing of configuration data #136

Merged

Conversation

gertdreyer
Copy link
Contributor

These changes will prevent a full reload of the Wireguard interface (due to ReplacePeers: true) as that breaks active VPN sessions. The improvement is achieved by using the UpdateOnly and Removed attributes of wgtypes.PeerConfig
flags to manage peers.

The breaking of sessions can be tested with ssh while connected to the VPN. The current main branch will cause the ssh session to lag or close while WireGuard handshakes the connection. With the changes no new handshake takes places as connections are persevered.

Prevent full reload of wireguard (ReplacePeers: true,) as that can
break active sessions. This is done with the UpdateOnly and Removed
flags to manage peers.
@gertdreyer gertdreyer requested a review from suom1 as a code owner July 19, 2021 13:50
Copy link
Member

@suom1 suom1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and thank you for the fix! :)

@suom1 suom1 merged commit 67ca506 into EmbarkStudios:main Jul 19, 2021
@gertdreyer gertdreyer deleted the features/KeepActiveSessionsOpen branch July 19, 2021 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants