Fix hardcoded 8.8.8.8 DNS on Android CGO builds#46
Open
madeye wants to merge 1 commit into
Open
Conversation
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).
|
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/src/main/go/v2ray-pluginto shadowsocks/v2ray-plugin#335 (11c4795), which addsdns_android.goto resetnet.DefaultResolverwhen building with CGO on Android.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 --initsucceeds and checks out11c4795go-build.bash(CGO_ENABLED=1)Depends on: shadowsocks/v2ray-plugin#335 (submodule commit already on that branch and fetchable).