-
Notifications
You must be signed in to change notification settings - Fork 81
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
[Work in progress] Listen on TCP and publish ports over Upnp #42
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to the live torrent
ikatson
force-pushed
the
external-listen
branch
from
December 5, 2023 20:52
f68bcc3
to
80df2c1
Compare
…oaded yet, it says they have it fully
ikatson
force-pushed
the
external-listen
branch
from
December 5, 2023 22:37
3bd90a1
to
156f83d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is quite a big change. On Hacker News Rqbit post someone noted we don't upload which isn't great for the network.
I wondered what would it take to make this work without implementing uTP protocol.
So this change changes the default behavior of "rqbit server start" to work similar to other torrent clients - to upload by default.
Here's how it works:
--disable-tcp-listen
. There's also--tcp-listen-min(max)-port
.--disable-upnp
The default listen port is 4240, it tries 20 more if it can't bind.
This actually works pretty well in the end, and the moment we publish on DHT, there's lots of peers who start connecting.
Also found bugs in upload code which recently broke, so in fact since some latest updates it likely wasn't uploading anything at all.
I was scratching my head on how to test this during dev, eventually just ran another client like this:
So that one instance listens on 4240, and we force connect to it from another instance. This helped fix a couple bugs.