On Windows: Wrong source IP address

Jason A. Donenfeld Jason at zx2c4.com
Sat Sep 14 19:11:00 CEST 2019

To give more detail, a more ideal solution would be to specify the
source address / source if index using WSASendMsg, and retrieve the
incoming destination address / destination if index using WSARecvMsg,
and implement sticky socket semantics. A linux implementation in C is
here: https://git.zx2c4.com/WireGuard/tree/contrib/examples/sticky-sockets/sticky-sockets.c
and in go is here:
https://git.zx2c4.com/wireguard-go/tree/device/conn_linux.go . If you
want to provide conn_windows.go that implements sticky sockets, that
would probably solve 80% of the problem. The remaining part would be
policy routing for the case when we don't have a sender if or when
it's gone stale.

More information about the WireGuard mailing list