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

The tracker is ignoring the num_want param in the announce request. #569

Closed
josecelano opened this issue Jan 2, 2024 · 1 comment · Fixed by #1035
Closed

The tracker is ignoring the num_want param in the announce request. #569

josecelano opened this issue Jan 2, 2024 · 1 comment · Fixed by #1035
Assignees
Labels
Easy Good for Newcomers Enhancement / Feature Request Something New good first issue Good for newcomers
Milestone

Comments

@josecelano
Copy link
Member

josecelano commented Jan 2, 2024

It seems the tracker is also ignoring the num_want param in the announce request.

num_want is the number of peers the client wants in the announce response (peer list).

See https://www.bittorrent.org/beps/bep_0015.html

Right now:

  • We always return less than 74.
  • We ignore the num_want.

Originally posted by @josecelano in #262 (comment)

@josecelano josecelano added Enhancement / Feature Request Something New Easy Good for Newcomers good first issue Good for newcomers labels Jan 2, 2024
@cgbosse cgbosse added this to the v3.1.0 milestone Jan 16, 2024
@josecelano josecelano modified the milestones: v3.1.0, v3.0.0 Jun 12, 2024
@josecelano josecelano modified the milestones: v3.0.0, v3.1.0 Jul 10, 2024
@josecelano josecelano self-assigned this Sep 10, 2024
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Sep 10, 2024
The UDP tracker announce response always include all peers available up to a
maxium of 74 peers, ignoring the `num_want` param in the request
described in:

https://www.bittorrent.org/beps/bep_0015.html

This change applies that limit only when is lower than then
TORRENT_PEERS_LIMIT (74).
@josecelano josecelano linked a pull request Sep 10, 2024 that will close this issue
2 tasks
@josecelano
Copy link
Member Author

josecelano commented Sep 10, 2024

I don't see in any BEP a reference to the numwant param in the HTTP request. Only:

https://www.bittorrent.org/beps/bep_0008.html

However, I've found other resources that apply this limit to the HTTP tracker.

I will add it also to the HTTP tracker but with the name numwant instead of num_want (https://www.bittorrent.org/beps/bep_0015.html)

image

josecelano added a commit to josecelano/torrust-tracker that referenced this issue Sep 10, 2024
The UDP tracker announce response always include all peers available up to a
maxium of 74 peers, ignoring the `num_want` param in the request
described in:

https://www.bittorrent.org/beps/bep_0015.html

This change applies that limit only when is lower than then
TORRENT_PEERS_LIMIT (74).
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Sep 10, 2024
It allows HTTP clients to limit peers in the announce response with the
`numwant` GET param.
josecelano added a commit that referenced this issue Sep 11, 2024
084879e feat: [#569] numwant HTTP tracker announce param (Jose Celano)
481d413 feat: [#569] allow UDP clients to limit peers in response (Jose Celano)

Pull request description:

  The UDP tracker announce response always include all peers available up to a maxium of 74 peers, ignoring the `num_want` param in the request described in:

  https://www.bittorrent.org/beps/bep_0015.html

  This change applies that limit only when is lower than then TORRENT_PEERS_LIMIT (74).

  It also adds the `numwant` GET param to the announce request for the HTTP tracker for the same purpose.

  - [x] UDP tracker (`num_want`, positional param in the UDP packet).
  - [x] HTTP tracker (`numwant` GET param).

ACKs for top commit:
  josecelano:
    ACK 084879e

Tree-SHA512: 6e3a7a672d393852d8655c4e2732910dbf2a5beecb3f92a39b251e127e05d3a5ae068962ec1577189ed397b2529201558c971e8c050c2763d8781efd8441f540
josecelano added a commit that referenced this issue Sep 23, 2024
beb56d3 release: version 3.0.0-rc.1 (Jose Celano)
bdb0419 chore(deps): update dependencies (Jose Celano)
faee02f feat: [#675] tracker checker (HTTP tracker) supports more service address formats (Jose Celano)
520026d feat: [#675] tracker checker supports more service address formats (Jose Celano)
dbee825 fix: [#1037] wrong req type name in tracker checker outout (Jose Celano)
c49438f fix: remove debugging print (Jose Celano)
084879e feat: [#569] numwant HTTP tracker announce param (Jose Celano)
481d413 feat: [#569] allow UDP clients to limit peers in response (Jose Celano)
ff836ed fix: clippy error (Jose Celano)
1f64cc9 chore(deps): udpate dependencies (Jose Celano)
b88cc61 develop: bump to version 3.0.0-rc.1-develop (Jose Celano)

Pull request description:

  Release Version 3.0.0-rc.1

ACKs for top commit:
  josecelano:
    ACK beb56d3

Tree-SHA512: fb923cb93948123fe4af4f144aaedd72f33aabde1428aac5f14d15eec3b0779b0663c6b1e2580e32c920e343529d1bdbd472b4a1f58592126bb12188bfe4ae7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Good for Newcomers Enhancement / Feature Request Something New good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants