mullvad / udp-over-tcp

Proxy UDP traffic over a TCP stream
Apache License 2.0
377 stars 61 forks source link

Choose correct address family for UDP socket when `udp-bind` is not specified explicitly #28

Closed dlon closed 2 years ago

dlon commented 2 years ago

udp-bind defaults to 0.0.0.0 for tcp2udp. This means that AF_INET is used as the address family even if the destination is an IPv6 address. This PR fixes this by binding the socket to :: by default if the destination is an IPv6 address.


This change is Reviewable