Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose a specific network interface #20

Closed
ehrlich-b opened this issue Aug 2, 2017 · 5 comments
Closed

Choose a specific network interface #20

ehrlich-b opened this issue Aug 2, 2017 · 5 comments
Milestone

Comments

@ehrlich-b
Copy link

For example, if you want to force all torrent traffic through a VPN on a specific network interface.

@atomashpolskiy
Copy link
Owner

Good point, and should allow changing the default port as well. E.g. -i for interface, -p for port. Maybe something like -r for random free port.

@atomashpolskiy
Copy link
Owner

Done (except random listening port, I'll leave it for the future):

  • Config#getAcceptorAddress() and Config#getAcceptorPort() are now respected throughout the library, and not just in the incoming connections acceptor
  • CLI client received two new options: -i and -p (see README)

Specifically, the changes should affect:

  • incoming connections acceptor
  • outgoing peer connections
  • http tracker requests
  • udp tracker requests

I haven't been able to investigate how DHT performs socket binding yet. Need to address it later, so I'll leave this open for now.

It would be great if somebody has access to VPN (or multiple NICs) and can check this out.

@atomashpolskiy atomashpolskiy added this to the 1.4 milestone Aug 2, 2017
@ehrlich-b
Copy link
Author

Confirmed this is working. Turned on VPN -> start downloading with -i [VPN ip] -> download starts as expected -> kill VPN -> download dies, confirming that the VPN was being used. Started again with the VPN off -> exception.

Not sure if this is expected to work, but I tried with "-i eth1" and I get "Failed to parse the acceptor's internet address". It would be convenient if it could resolve iface name -> ip address.

Thanks for doing this!

@atomashpolskiy
Copy link
Owner

Need to also take advantage of new config option in mldht

@sunkejava
Copy link

Hello, Daniel, I am a novice, just touch BT, now want to deploy will not, not English, read some days of the document, do not understand, maven deployment has been given, pray for help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants