Skip to content

refactor(nmrs): unify connection builder pattern#161

Merged
cachebag merged 1 commit intomasterfrom
refactor/builder
Jan 6, 2026
Merged

refactor(nmrs): unify connection builder pattern#161
cachebag merged 1 commit intomasterfrom
refactor/builder

Conversation

@cachebag
Copy link
Owner

@cachebag cachebag commented Jan 6, 2026

This PR refactors connection builders to use a unified architecture that should help us expand upon new types in the future.

Changes

  • ConnectionBuilder - Core builder for common sections (connection, ipv4, ipv6)
  • WifiConnectionBuilder - Type-safe WiFi builder with Open/WPA-PSK/WPA-EAP
    support
  • WireGuardBuilder - Comprehensive VPN builder with validation

Also worth noting:

  • build_wifi_connection() - delegates to WifiConnectionBuilder
  • build_ethernet_connection() - uses ConnectionBuilder directly
  • build_wireguard_connection() - delegates to WireGuardBuilder

Existing API's are of course, unchanged and thus, fully backward compatible.

@cachebag cachebag self-assigned this Jan 6, 2026
@cachebag cachebag added feature New feature or request nmrs Changes to nmrs refactor Change or improve code labels Jan 6, 2026
@cachebag cachebag merged commit b3f250e into master Jan 6, 2026
6 checks passed
@cachebag cachebag deleted the refactor/builder branch January 6, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request nmrs Changes to nmrs refactor Change or improve code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant