obfs4proxy doesn't listen on both 0.0.0.0 and [::]
I'm using a system that has native IPv6 support and also IPv4
If obfs4proxy is started with the following configuration: TOR_PT_SERVER_BINDADDR="obfs4-0.0.0.0:1234,obfs4-[::]:1234" then obfs4proxy fails to bind to both ipv4 and ipv6.
Instead, the first call to Net.Listen will cause it to listen on [::], and the second call will fail with "bind: port 1234 is already in use".
I found some discussions around the behavior of the Net, and it seems that it tries to some automatic decisions which aren't perfect. I've seen a recommendation that it's best to specifically request which tcp family is requested.
I've implemented a patch that will request either tcp4 or tcp6, which makes it work correctly for me, with the patch obfs4proxy will listen on both 0.0.0.0 and [::]
Trac:
Username: kaie