Skip to content

Conversation

@colazcy
Copy link

@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?

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