TCP Wireguard with socat

Matthias Urlichs matthias at
Fri Mar 9 22:45:32 CET 2018

On 09.03.2018 17:41, Gianluca Gabrielli wrote:
> My first thought has been to make use of socat

socat can do either packet streams or byte streams. A UDP socket (or a
tun/tap interface) is a packet stream. TCP is a byte stream. You can't
forward a packet stream into a byte stream. (Well, OK, socat does allow
you to set that up, but it won't work.)

You need wrap your packets in some sort of frame (simplest: precede each
with a length word (but think about byte ordering)). I'm sure there are
programs which do that, or you can write your own. socat can't do it.

-- Matthias Urlichs

More information about the WireGuard mailing list