Open
Conversation
Introduce a TCP relay implementation (relay/tcp_relay.go) that accepts framed TCP packets, handles relay registration messages and encrypted hole-punch/WireGuard frames, and forwards traffic to UDP destinations via the existing UDP proxy logic. Integrates the new TCPProxyServer into main.go (new proxyTCPRelay variable, tcp-relay-port flag, start/stop lifecycle and cleanup). Also add a key file and normalize the go.mod version string (go 1.25 -> go 1.25.0).
Introduce a TCP relay implementation (relay/tcp_relay.go) that accepts framed TCP packets, handles relay registration messages and encrypted hole-punch/WireGuard frames, and forwards traffic to UDP destinations via the existing UDP proxy logic. Integrates the new TCPProxyServer into main.go (new proxyTCPRelay variable, tcp-relay-port flag, start/stop lifecycle and cleanup). Also add a key file and normalize the go.mod version string (go 1.25 -> go 1.25.0).
This was referenced Apr 11, 2026
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.
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
What does this PR do?
You can read about the discussion related to this topic here: Transport flexiblity
As discussed, in more restrictive networks UDP connections may be completely blocked and clients are unable to connect to resources. To get around this we use a commonly allowed protocol: HTTPS, or more specifically websockets.
Description
OLM will try its normal direct UDP/hole punch and UDP relay. If OLM receives a relayEndpointWss (sent with relay info) it starts an 8s timer. Once that timer is up it switches from the shared UDP bind to a websocket bind. Traffic then flows OLM-(wss)->Pangolin-(tcp relay port)->Gerbil->Newt. Now since we are using a websocket the RTT is more than just raw wireguard, and it might be something to look into.
Note: the only thing changed is olm's connection to the gerbil relay, to newt nothing changes.
How to test?
Setup Pangolin, Gerbil, and Olm from companion PRs mentioned below and regular newt. Have to spin up pangolin, gerbil, newt, and olm to test this. Ideally checking, regular connections, restricted networks, and the force relay flag
Companion PRs
Pangolin: fosrl/pangolin#2831
Olm: fosrl/olm#112