NIC starting up with configured IP rather than an automatic 169.x.x.x#212
Merged
micahmo merged 1 commit intomicahmo:mainfrom Mar 2, 2026
Merged
NIC starting up with configured IP rather than an automatic 169.x.x.x#212micahmo merged 1 commit intomicahmo:mainfrom
micahmo merged 1 commit intomicahmo:mainfrom
Conversation
…e [Interface] Address=... line to wg_server.config) - added WireGuardCommand.StripConfigFile() to remove WireGuard.exe specific settings from a config file which aren't supported by the wg.exe command (e.g. with "wg syncconf")
There was a problem hiding this comment.
Pull request overview
Updates WireGuard server configuration generation and sync behavior so the tunnel starts with the configured interface IP (instead of an APIPA 169.x.x.x) while still allowing wg.exe syncconf to work by stripping unsupported config keys from the sync input.
Changes:
- Enable emitting
[Interface] Address=...for the server configuration. - Add
WireGuardCommand.StripConfigFile()to removewg.exe-unsupported settings (currentlyAddress=) beforewg syncconf. - Use a distinct
*.tmpfile for syncconf input to avoid modifying/overwriting the original config.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| WgServerforWindows/Models/ServerConfigurationPrerequisite.cs | Syncconf now operates on a temporary *.tmp copy and strips unsupported keys before calling wg.exe. |
| WgServerforWindows/Models/ServerConfiguration.cs | Server config now includes AddressProperty in the generated [Interface] section. |
| WgServerforWindows/Models/ClientConfigurationsPrerequisite.cs | Same *.tmp + strip flow applied when client changes trigger a server syncconf update. |
| WgAPI/Commands/WireGuardCommand.cs | Introduces StripConfigFile() helper to remove unsupported config directives for wg.exe usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Hey thanks a ton for the contribution!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bring up the network interface with the configured IP (by adding the [Interface] Address=... line to wg_server.config)
added WireGuardCommand.StripConfigFile() to remove WireGuard.exe specific settings from a config file which aren't supported by the wg.exe command (e.g. with "wg syncconf")