Repository navigation
feature/wgcf/custom-dns-generation - #638
Open
michaelik1 wants to merge 6 commits into
Open
michaelik1 wants to merge 6 commits into
michaelik1 wants to merge 6 commits into
Conversation
Contributor
Author
|
The same question I raised here(#634 (comment)) also applies to this PR. Should we preserve the current default DNS behavior for backward compatibility, or make DNS configuration explicit? |
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.
Motivation
Resolves #394.
Currently, wgcf always generates WireGuard profiles with fixed Cloudflare DNS servers. While these are suitable defaults, some users may prefer alternative DNS providers, such as NextDNS or AdGuard, or manage DNS settings themselves.
This change allows users to customize or omit the DNS setting without manually editing the generated profile, while preserving the existing behavior by default.
Description
Adds support for custom IPv4 and IPv6 DNS servers when generating WireGuard profiles.
Usage:
The
--dnsflag accepts comma-separated IP addresses or can be specified multiple times.The
--dnsand--no-dnsflags are mutually exclusive and cannot be used together.The default Cloudflare DNS servers remain unchanged for backward compatibility. Specifying custom DNS servers replaces these defaults.
Added tests for DNS validation, flag parsing, and generated profile output.
@ViRb3