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.
# udptunnel -s 443 127.0.0.1/51820
# 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
I've been facing the same issues with "Address already in use". Other projects did not work for me as well.... So, I've created https://github.com/arkq/wg-tcp-tunnel which handles everything properly. Also, one does not need root privilege to run it. I'm using it on RPi4 (behind NAT using ngrok) and not-rooted Android phone (via Termux). On Android the wg-tcp-tunnel is compiled in Termux as well, since it only depends on Boost and STL. The README explains how to use it.