Skip to content

feat: Introduce Domain Resolve Strategy#181

Merged
windtf merged 2 commits intowindtf:masterfrom
colazcy:dev
Mar 5, 2026
Merged

feat: Introduce Domain Resolve Strategy#181
windtf merged 2 commits intowindtf:masterfrom
colazcy:dev

Conversation

@colazcy
Copy link
Contributor

@colazcy colazcy commented Nov 15, 2025

Current Problem

Currently, Wireproxy resolves domains by randomly selecting an IP address from the DNS results, without differentiating between A (IPv4) and AAAA (IPv6) records. This behavior may cause issues in certain scenarios.

For instance, some websites, such as Google, are sensitive to the request's source IP address. Wireproxy does not prioritize IPv4 or IPv6 address, which can cause the source IP address to switch between the interface's IPv4 and IPv6 address during a single session. This may trigger security checks.

clipboard_2025-11-08_19-40

Solution

This PR introduces a configurable DNS resolution strategy to give users control over this behavior.

[Resolve]
ResolveStrategy = auto / ipv4 / ipv6
  • ipv4: Prioritize A records.
  • ipv6: Prioritize AAAA records .
  • auto (Default): If the WireGuard interface has IPv4 address only, it's equivalent to ipv4, otherwise it's equivalent to ipv6.

This PR also corrects indentation in some files as a minor cleanup,

@Neustradamus
Copy link

@whyvl: Have you seen this @colazcy PR?

Copilot AI review requested due to automatic review settings March 5, 2026 03:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@windtf windtf merged commit bceb167 into windtf:master Mar 5, 2026
9 of 10 checks passed
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