Skip to content

Fix hardcoded 8.8.8.8 DNS on Android CGO builds#46

Open
madeye wants to merge 1 commit into
masterfrom
fix/android-cgo-dns-reset
Open

Fix hardcoded 8.8.8.8 DNS on Android CGO builds#46
madeye wants to merge 1 commit into
masterfrom
fix/android-cgo-dns-reset

Conversation

@madeye

@madeye madeye commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why not bump v2ray-core?

Upstream fixed this correctly in v2fly/v2ray-core#3755 (//go:build android && !cgo), shipped in v5.52.0. That release requires Go 1.25.5+, beyond the current plugin toolchain (go 1.22 / toolchain go1.23.2). This is a minimal workaround until core can be upgraded.

Replaces

Supersedes draft #45 (pointed at an unpublished submodule SHA).

Test plan

  • git submodule update --init succeeds and checks out 11c4795
  • Android ABIs build with existing go-build.bash (CGO_ENABLED=1)
  • Device/VPN: domain server address, protect mode — no DNS loopback to 8.8.8.8

Depends on: shadowsocks/v2ray-plugin#335 (submodule commit already on that branch and fetchable).

Points the submodule at shadowsocks/v2ray-plugin#335, which resets
net.DefaultResolver when building with CGO on Android. Fixes DNS
loopback/poisoning under VPN protect (issue #44).
@dyhkwong

dyhkwong commented Jul 9, 2026

Copy link
Copy Markdown

I workaround the issue like this on my own build too, but what is the point of maintaining the minimal compatibility of Go 1.22? Isn't v1.3.4 already compiled with Go 1.25.6?

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.

v1.3.4 hardcoded 8.8.8.8 as the DNS resolver

2 participants