-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #494: Overhaul tracker keys in torrents and magnet links
9b7c5c8 feat: [#488] panic starting the app when tracker config is invalid (Jose Celano) 36e46fe chore(deps): add cargo dependency url to parse URLs (Jose Celano) b8624a8 feat!: [#488] return 503 instead of 500 when tracker is offline (Jose Celano) d100b5b fix: [#488] broken test after removing duplicate tracker urls from magnet links (Jose Celano) c1fd866 feat: [#488] return an error in the torrent details endpoint when user tracker keys can't be generated (Jose Celano) b41488b fix: [#488] torrent without tracker keys for open tracker (Jose Celano) Pull request description: ``` 1. Tracker running in `Public` or `Whitelisted` mode. Downloaded torrents should never include any tracker key. 3. Tracker running in `Private` or `PrivateListed` mode. 2.1 Guest user. Downloaded torrents should never include any tracker key. 2.2 Authenticated user 2.2.1 Index can get the tracker user's key (from the Index database or generate new ones). - We should include the user's tracker key. - We should change the download torrent button label from `download torrent` to `download private torrent` (this is an Idex GUI issue). 2.2.2 The user's tracker key is expired and the tracker API is unavailable (can't generate a new one). Return a `503 Service Unavailable` response with the text `Can't generate user's tracker key`. ``` ### Subtasks - [x] Never include keys in the downloaded torrent file when the tracker is open (public or public-whitelisted). - [x] Never include keys in the magnet link when the tracker is open (public or public-whitelisted). - [x] Return an error when we can't connect to the tracker to generate the user's keys. Both for the download torrent endpoint and torrent details endpoint (magnet link). - [x] Return 503 instead of 500 when the tracker is offline and for example we can not generate the user's tracker keys. - [x] Removed duplicate URLs in the tracker lists. Both torrent file and torrent info endpoints. - [x] Force the main tracker URL (the one in the tracker config) to be the first in the tracker lists, both in the tracker torrent file endpoint and the torrent details endpoint. - [x] Panic starting the application with an invalid racker configuration. For example: private UDP tracker. ### Subtasks in the Index GUI - Rename de download torrent button from `download torrent` to `download private torrent` when the tracker is not open. ACKs for top commit: josecelano: ACK 9b7c5c8 Tree-SHA512: d98baaf62a1643519712706a7cd4db436826a1b931e6e9172af21ac13001ac3fcad1e2d3d861b52286e8660b92b5b19bfe8206aacabe8e24024d050ffde3bd90
- Loading branch information
Showing
9 changed files
with
145 additions
and
81 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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