Skip to content

Add Android VPN-aware DNS resolver#139

Merged
yiguodev merged 1 commit into
mainfrom
dev-26.7-8
Jul 20, 2026
Merged

Add Android VPN-aware DNS resolver#139
yiguodev merged 1 commit into
mainfrom
dev-26.7-8

Conversation

@yiguodev

Copy link
Copy Markdown
Collaborator

Summary

  • add Android-only SetDNS and ResetDNS APIs for configuring Go's process-wide resolver
  • route resolver sockets through the existing Android ProtectFd controller
  • validate IP endpoints and restore the previous resolver after Xray stops
  • document the lifecycle and add resolver coverage

Why

Android VPN sessions can expose a loopback DNS endpoint to Go's resolver, causing outbound server hostname resolution to loop back into the TUN. This provides an explicit protected bootstrap resolver for Android without changing other platform artifacts.

Validation

  • go test ./... -count=1
  • git diff --check

@yiguodev
yiguodev marked this pull request as ready for review July 20, 2026 08:06
Copilot AI review requested due to automatic review settings July 20, 2026 08:06

Copilot AI left a comment

Copy link
Copy Markdown

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 has reached their quota limit.

@yiguodev
yiguodev merged commit cd6ccaf into main Jul 20, 2026
3 checks passed
@yiguodev
yiguodev deleted the dev-26.7-8 branch July 20, 2026 08:08
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