Skip to content

Conversation

@wojcik91
Copy link
Contributor

@wojcik91 wojcik91 commented Jun 3, 2025

This adds following events to the audit log:

  • VPN client connected
  • VPN client disconnected

In order to achieve that we implemented a system to track clients connected to VPN gateways and determine when a client connects or disconnects.
This is still done based on WireGuard peer stats we receive from each gateway, but instead of a database view we utilize an in-memory hashmap and update client status as soon as stats are received.

Detecting disconnected devices is also done when a stats update is received, which could possibly lead to a disconnect not being logged if we lose contact with a gateway.

@wojcik91 wojcik91 requested a review from moubctez June 3, 2025 12:27
@wojcik91 wojcik91 self-assigned this Jun 3, 2025
@wojcik91 wojcik91 requested a review from j-chmielewski June 4, 2025 07:21
@wojcik91 wojcik91 marked this pull request as ready for review June 4, 2025 07:21
@wojcik91 wojcik91 merged commit abab64b into dev Jun 4, 2025
5 checks passed
@wojcik91 wojcik91 deleted the vpn_client_events branch June 4, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants