For my use-case I wanted to download torrents over a specific device (a TUN OpenVPN device, more precisely)
Because of the modular approach to torrent-stream I had to for fork the torrent-stream, bittorrent-dht, peer-wire-swarm and utp repositories and make modifications to each of them.
I haven't created any pull requests for those in case you're not interested.
I also have noticed in the code that utp connections are currently not made in torrent-stream, but maybe that was by design because when I did enable it performance wasn't that stellar, especially not over the vpn device.
I also have not yet made modifications to the bittorrent-tracker repository, right now the actual downloading of chunks over the vpn device is more important than detecting peers.
As you can see: the localAddress option can be a string (an ip address) or a function.
I went for this because the ip address of a vpn connection is prone to change.
For my use-case I wanted to download torrents over a specific device (a TUN OpenVPN device, more precisely)
Because of the modular approach to torrent-stream I had to for fork the
torrent-stream
,bittorrent-dht
,peer-wire-swarm
andutp
repositories and make modifications to each of them.I haven't created any pull requests for those in case you're not interested.
I also have noticed in the code that utp connections are currently not made in
torrent-stream
, but maybe that was by design because when I did enable it performance wasn't that stellar, especially not over the vpn device.I also have not yet made modifications to the
bittorrent-tracker
repository, right now the actual downloading of chunks over the vpn device is more important than detecting peers.As you can see: the localAddress option can be a string (an ip address) or a function. I went for this because the ip address of a vpn connection is prone to change.