Axum HTTP tracker: scrape request in private mode#199
Merged
josecelano merged 2 commits intotorrust:developfrom Mar 1, 2023
Merged
Conversation
…cannot be parsed Returns an specific authentication error when the peer uses a key with an invalid format.
da2ce7
reviewed
Feb 28, 2023
| #[tokio::test] | ||
| async fn should_return_the_zeroed_file_when_the_authentication_key_provided_by_the_client_is_invalid() { | ||
| // There is not authentication error | ||
| // code-review: should this really be this way? |
Member
Author
There was a problem hiding this comment.
I don't know. I think all responses have status 200 and errors are just an special bencoded dictionary. But in this case this is not even an error in the current Warp implementation. @WarmBeer do you know it?. Where can we find the specification for private trackers?
Member
Author
There was a problem hiding this comment.
@WarmBeer I think the Axum fork returns an error when the tracker runs in private mode, and the key is missing, invalid or unknown.
- For
announce: https://github.com/Power2All/torrust-axum/blob/master/src/http_service.rs#L97-L125 - For
scrape: https://github.com/Power2All/torrust-axum/blob/master/src/http_service.rs#L240-L268
I can't find any official documentation:
- Bep 48. Tracker Protocol Extension: Scrape: https://www.bittorrent.org/beps/bep_0048.html
- BEP 33. DHT Scrapes: https://www.bittorrent.org/beps/bep_0033.html
- https://wiki.theory.org/BitTorrentSpecification#Unofficial_extensions_to_scrape
- https://wiki.vuze.com/w/Scrape
For me, it makes sense to change this behaviour. I will merge the PR because it's the actual Warp implementation behavior but let me know if we should change it.
This file contains hidden or 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
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.
scraperequest implementation for tracker inprivatemode.