Skip to content

Instantly share code, notes, and snippets.

@insdavm
Last active May 27, 2024 12:49
Show Gist options
  • Save insdavm/90cbeffe76ba4a51251d83af604adf94 to your computer and use it in GitHub Desktop.
Save insdavm/90cbeffe76ba4a51251d83af604adf94 to your computer and use it in GitHub Desktop.
WireGuard over TCP with udptunnel

WireGuard over TCP with udptunnel

udptunnel is a small program which can tunnel UDP packets bi-directionally over a TCP connection. Its primary purpose (and original motivation) is to allow multi-media conferences to traverse a firewall which allows only outgoing TCP connections.

Server

# udptunnel -s 443 127.0.0.1/51820

Client

# udptunnel -c [SERVER PUBLIC IP]/443 127.0.0.1 50001
  • Remember to open TCP port 443 on the server's firewall
  • In the WireGuard client config file, replace the server's public IP (endpoint) with 127.0.0.1:50001
@freecode505
Copy link

Tranks bro 💖

@andrew-aladjev
Copy link

I've made additional work on wireguard routing. You may be interested in it. Question is here, gist with route scripts and configs here.

@freecode505
Copy link

I've made additional work on wireguard routing. You may be interested in it. Question is here, gist with route scripts and configs here.

udp puncher could be added

@ewanlbc
Copy link

ewanlbc commented May 27, 2024

@andrew-aladjev Would it be possible to have a "Howto" for client and server as on this page (once installed or built package) to simply make it work ? Does not work for me on client side : Doing "udptunnel [SERVER PUBLIC IP]:443 127.0.0.1 50001" gives : "Cannot bind to [SERVER PUBLIC IP]:443: Cannot assign requested address". Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment