magic-wormhole / magic-wormhole-transit-relay

Transit Relay server for Magic-Wormhole
MIT License
169 stars 42 forks source link

listen on IPv6 #12

Closed warner closed 5 years ago

warner commented 5 years ago

https://github.com/warner/magic-wormhole/issues/354 points out that we're not currently listening on a v6-capable socket. We're using endpoints.serverFromString("tcp:4001") to create the listening socket, but maybe there's a different form we should use to get a v4+v6 listening socket.

warner commented 5 years ago

Ugh, nope, tcp:4001:interface=\:\:1 listens only on IPv6. The IReactorTCP.listenTCP docs say that you have to use two separate listenTCP() calls to listen on both v4 and v6 at the same time, which is a drag.

We'll need to have --port= and --port2= options to set both. Or use a single one, but make the default some distinctive string (like DEFAULT), and if we see that, we create two separate endpoints (both sharing the same factory).

warner commented 5 years ago

nope, simpler than that, a single endpoint with interface=\:\: is sufficient.

warner commented 5 years ago

fixed in release 0.2.1