Conversation
network.PacketProxy and NewPacketProxyFromPacketListener are deprecated in favor of the flow-based network/packetrelay API. This migrates Intra's UDP handling, mirroring OutlineFoundation/outline-apps#2777. - intraPacketProxy becomes intraPacketRelay, a packetrelay.PacketRelay whose associations share a dohAssociation between their sender and receiver halves. - lwip2transport.ConfigureDevice -> ConfigureDeviceWithRelay. - packetrelay.NewPacketRelayFromPacketListener replaces network.NewPacketProxyFromPacketListener, keeping the same 5 minute write-idle timeout (now a constructor argument). - Add unit tests for DNS interception, packet relaying, byte accounting and sender close semantics. Behavior is unchanged, except that SendPacket on a closed association now returns ErrClosed instead of issuing a DoH query whose response can no longer be delivered.
Replace Intra's own DNS interception in the UDP path with the Outline SDK's dnsintercept relay, composed over a relay that now only relays packets and counts bytes. The swappable DoH resolver moves to the Tunnel, which exposes it to the SDK as a dns.Exchanger. DoH queries no longer block the lwIP callback, and query failures are logged through WithErrorHandler instead of being returned (and dropped) by SendPacket. This pins the SDK to the branch commit of OutlineFoundation/outline-sdk#637, and must not be merged until that PR lands and is released.
fortuna
added this pull request to stack #632
September 16, 2026 20:42
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.
Warning
Do not merge yet. This depends on OutlineFoundation/outline-sdk#637, which is still
a draft.
go.modcurrently pins the SDK to the branch commitv0.1.0-rc1.0.20260915234250-3f66d9c28049; it must be repointed at a released versionbefore this can land.
What
Intra's UDP path used to do its own DNS interception:
intraPacketRelaycompared everydestination against the fake DNS address, and ran the DoH query inline. The Outline SDK now
ships that behavior as a composable decorator, so this PR deletes Intra's copy and composes
the SDK one instead:
Android/app/src/go/intra/packet_relay.gois now nothing but byte accounting andUDPSocketSummaryreporting. The swappable DoH resolver moved from the relay to theTunnel, which exposes it as adns.Exchanger(Tunnel.queryDNS) —doh.Resolver.Queryalready has the wire-format signature the SDK expects.
Why
The interception logic is not Intra-specific; the only thing Intra needed that the SDK
lacked was a way to plug in its own resolver. The SDK PR adds
dns.Exchangerfor exactlythat, so both Intra and the Outline Client can share one implementation — and Intra gets the
SDK's ref-counted association lifetime for free.
Behavior changes
SendPacket, blocking the lwIP callbackSendPacketreturns immediatelySendPacketerror (which lwIP discards)WithErrorHandler→logging.Warnfcontext.AfterFunc)UDPSocketSummarywith zero bytesif isEquivalentAddrPort(...)before the counters)The dropped zero-byte summaries are not a telemetry change:
IntraVpnServicealreadydiscards summaries below 10,000 bytes.
Tests
packet_relay_test.gokeeps the relaying/accounting/close-semantics tests and gainsTestInterceptedDNSIsNotRelayed, which exercises the exact compositionNewTunnelbuilds.The new
tunnel_test.gocovers the exchanger adapter: it always reads the current resolver(so
SetDNStakes effect immediately) and in-flight queries are canceled on disconnect.gofmt -l .— clean (except the pre-existingintra/split/retrier.go)go vet ./...,go test -race ./..../gradlew :app:compileGoBackend