WireGuard/Tailscale + HTTPS filtering coexistence: fork prototype, is this a direction you'd accept? #283
satoru2727
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
I use BlockAds as my only
VpnService, together with WireGuard (and sometimes Tailscale). Today HTTPS filtering and WireGuard are mutually exclusive:GoTunnelAdapter.start()computesand the engine then picks either the WireGuard path (
Engine.start) or the direct full-tunnel + MITM path (Engine.startFull). The same limitation applies to userspace VPNs such as Tailscale: there is no seam for sending decoded upstream TCP through anything other than the direct/proxy dialer.What I prototyped in a fork
This is not a patch for review yet — I'd like to know whether the direction is acceptable before taking up maintainer time with PRs.
DialContextfrom it.Engine.DialUpstream(ip, port), that prefers the active stream-capable outbound (with an optional CIDR allowlist) and otherwise falls back to today's direct/proxy/Shadowsocks behaviour.mitm.ErrNoOutboundpreserves the existing fallback semantics.tsnet-backed outbound (behind a Go build tag) for Tailscale: TCP-first, CIDR split tunnel, DNS stays inside BlockAds, no MagicDNS takeover.Code and design notes live in my fork, branch
feat/wireguard-https-coexistence(https://github.com/satoru2727/blockads-android), with
docs/integration-audit.md(current-state audit, file/function level) and
docs/integration-design.md.Verification status (honest)
go build,go vet,go testpass, including new unit tests for the stream transport and the dial seam. (TestDoTErrors/TestDoQErrorsare excluded: they assume the host resolver rejects*.invalid, which is not true on every machine.)compileFdroidDebugKotlin,testFdroidDebugUnitTest(865 tests),lintFdroidDebugandassembleFdroidDebugpass in CI.Questions
tailscale.com/tsnet, flag/experimental policy, or a minimum of on-device evidence?mainis currently red —DnsStampParserTestandDnsLeakTestViewModelTestfail because plain JVM tests reachandroid.util.Base64. I have a small Robolectric-based fix and can send it as a separate one-file PR if that helps.Happy to drop any part of this (for example keep only the WireGuard half and leave Tailscale out entirely) if that is what fits the project.
All reactions