mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 228 forks source link

Allow downloading through an alternate IP address #87

Open epascal opened 9 years ago

epascal commented 9 years ago

I use two network cards but I'd like to use the second rather than the default network ip to exchange torrents (UDP, TCP). Could you add the ability to change the interface like in transmission ?

Thank you

mafintosh commented 9 years ago

How do I support this using the net core module? http://nodejs.org/api/net.html

bsuh commented 9 years ago

You can specify a host address to listen on in server.listen call.

You can get the host address like so os.networkInterfaces().tun0[0].address