Skip to content

Comments

Wireguard: Decouple server endpoint DNS from address option#5417

Merged
yuhan6665 merged 2 commits intoXTLS:mainfrom
Meo597:fix-wireguard-domainStrategy
Dec 14, 2025
Merged

Wireguard: Decouple server endpoint DNS from address option#5417
yuhan6665 merged 2 commits intoXTLS:mainfrom
Meo597:fix-wireguard-domainStrategy

Conversation

@Meo597
Copy link
Collaborator

@Meo597 Meo597 commented Dec 13, 2025

Previously, Wireguard server endpoint's domain resolution was incorrectly constrained by the local address option. For example, ForceIPv6v4 might fail to resolve AAAA records for the server domain if no IPv6 was explicitly configured in the address option.

This commit decouples the server endpoint's domain resolution from the local address configuration. It ensures the Wireguard server address is resolved independently, allowing its domainStrategy to function correctly without being limited by the client's local network or address settings.

Previously, Wireguard server endpoint's domain resolution was incorrectly constrained by the local `address` option. For example, `ForceIPv6v4` might fail to resolve AAAA records for the server domain if no IPv6 was explicitly configured in the `address` option.

This commit decouples the server endpoint's domain resolution from the local `address` configuration. It ensures the Wireguard server address is resolved independently, allowing its `domainStrategy` to function correctly without being limited by the client's local network or `address` settings.
@Meo597 Meo597 requested a review from yuhan6665 December 13, 2025 11:49
Meo597 added a commit to XTLS/Xray-docs-next that referenced this pull request Dec 13, 2025
Clarified the constraints of the 'address' option in relation to the 'domainStrategy' for Wireguard.

XTLS/Xray-core#5417
@yuhan6665
Copy link
Member

Yeah I think you are right. I was copying this piece from the process() and didn't pay too much attention. Thanks for the fix!
You can remove the code instead of comment out

yuhan6665 pushed a commit to XTLS/Xray-docs-next that referenced this pull request Dec 14, 2025
* Wireguard: domainStrategy

* PR#5417

Clarified the constraints of the 'address' option in relation to the 'domainStrategy' for Wireguard.

XTLS/Xray-core#5417
@Meo597
Copy link
Collaborator Author

Meo597 commented Dec 14, 2025

You can remove the code instead of comment out

done

@Meo597 Meo597 linked an issue Dec 14, 2025 that may be closed by this pull request
5 tasks
@yuhan6665 yuhan6665 merged commit a3ba3ee into XTLS:main Dec 14, 2025
39 checks passed
@Meo597 Meo597 deleted the fix-wireguard-domainStrategy branch December 14, 2025 15:15
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.

Wireguard outbound ignores sockopt:domainStrategy setting

2 participants