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

Initial support for interface binding #309

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Quackdoc
Copy link

@Quackdoc Quackdoc commented Jan 20, 2025

Currently a draft, this is "working" sort of when you pass the interface to the tracker, without passing the interface and binding to it, it announces the wrong thing. As such setting initial-peer will work, but no trackers will see the client.

I haven't really proof read any of the changes yet, this is just so I can get help with the main issue.

Additionally this PR makes changes to how tcp port binding works. if a user wishes to select a single port (IE. port forwarding) we can easily do this by passing the port..port + 1 due to how ranges work. the changes are purely convenience. Min port being greater then max port will give a range with nothing in it, so doing this will at least pass a single port, but perhaps throwing a warning or even an error would be better.

  • don't clone so much
  • figure out how pass interface to tracker

the second one I am really struggling with as it seems like it may require quite a bit of things to change.

addresses #304

@ikatson
Copy link
Owner

ikatson commented Jan 20, 2025

"Don't clone as much" - I wouldn't worry about it before it all works

"Figure out how to pass interface to tracker" - by a quick look there's nothing to "refactor", just extend. The only reasons to refactor would be growing code complexity but that can be addressed on top.

There's 2 things: the "reqwest::Client" passed for HTTP trackers - that needs to be extended with "interface". The second is for UDP trackers need to pass down interface.

I would also resolve interface to index was early as possible and use that instead of name everywhere (if that works)

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

Successfully merging this pull request may close these issues.

2 participants