chore: delete dead Kotlin dns/, BootReceiver stub, unused Go bindings - #38
Merged
Conversation
Removes ~517 lines of unreferenced code that has been superseded by the Go-side FakeDNS path (mobile/tun/fakedns_proxy.go) since commit 80d78aa. Kotlin side: - Delete the legacy dns/ package (FakeDnsServer.kt, FakeDnsInterceptor.kt). The active FakeDNS path is Go-side through Mobile.startTunBridge(...). - Delete service/BootReceiver.kt (15-line comment-only stub). The matching commented-out RECEIVE_BOOT_COMPLETED permission block and <receiver> entry are removed from AndroidManifest.xml. Auto-connect can be restored from git history when an explicit Settings UI lands. Go side (mobile bridge surface shrink): - mobile/mobile.go: remove GetVersion, GetListenAddress, IsTunBridgeRunning, GetDNSMapping, GetDNSMappingCount, GetTunVersion. None of these are called from Kotlin (verified by grep). The unused internal/version import is dropped. Preserved: StartClient, StopClient, IsRunning, StartTun, StopTun, StartTunBridge, StopTunBridge, GetTunBandwidth (the live one reading trackedUp/trackedDown that VpnManager.kt:277,288 calls). - mobile/tun/tun_api.go: remove the dummy GetTunBandwidth (shadowed by the mobile.go version that Kotlin actually calls) and GetVersion (would collide with mobile.go's binding export; never reachable from Kotlin once mobile.go:GetTunVersion is gone). Verification: - go build ./mobile/tun/... exits 0 - go test ./mobile/tun/... (plan 006 tests) passes - git diff --quiet -- go.mod go.sum (unchanged; AGENTS.md invariant held) - 0 Android references to FakeDnsServer|FakeDnsInterceptor|BootReceiver - 0 Kotlin Mobile.* callers reference any deleted symbol Local top-level `go build ./mobile/...` and the gradle/AAR build are gated by .github/workflows/android-ci.yml on push (pre-existing syscall.Dup-undefined-on-Windows blocks the top-level Go build locally, independent of this commit's edits).
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.
Removes ~517 lines of unreferenced code that has been superseded by the Go-side FakeDNS path (mobile/tun/fakedns_proxy.go) since commit 80d78aa.
Kotlin side:
Go side (mobile bridge surface shrink):
Verification:
Local top-level
go build ./mobile/...and the gradle/AAR build are gated by .github/workflows/android-ci.yml on push (pre-existing syscall.Dup-undefined-on-Windows blocks the top-level Go build locally, independent of this commit's edits).