Skip to content

feature/wgcf/optional-keepalive-generation - #620

Merged
ViRb3 merged 6 commits into
ViRb3:masterfrom
michaelik1:feature/wgcf/optional-keepalive-generation
Sep 18, 2026
Merged

ViRb3 merged 6 commits into
ViRb3:masterfrom
michaelik1:feature/wgcf/optional-keepalive-generation

Conversation

@michaelik1

@michaelik1 michaelik1 commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Clients behind NAT may lose their port mapping after a period of inactivity. When that happens, the wg peer can no longer receive traffic until it sends a new packet itself.

This adds an optional --keepalive flag to generated profiles so users behind NAT can enable wireguard's PersistentKeepalive setting when needed, while preserving the existing output by default.

Description

Adds optional persistent keepalive support when generating WireGuard profiles.

Usage:

wgcf generate --keepalive      # defaults to 25 seconds
wgcf generate --keepalive=60   # uses the specified interval

PersistentKeepalive is omitted when the flag is not used.
Tests added for the flag parsing and generated profile output.

Side note

To be clear don't know what style and other things should be used in a PRs and code, did not find it in a readme. Tried to follow your commit naming convention and code habits.

@ViRb3

@ViRb3
ViRb3 force-pushed the feature/wgcf/optional-keepalive-generation branch from 498c2b1 to 0cce359 Compare September 18, 2026 17:36
@ViRb3
ViRb3 merged commit 90dc323 into ViRb3:master Sep 18, 2026
@ViRb3

ViRb3 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Thank you!

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.

2 participants