Skip to content

Overhaul tracker keys in torrents and magnet links #488

@josecelano

Description

@josecelano

Relates to: torrust/torrust-index-gui#417

When you download a torrent the Index always includes the user's tracker key if the user is logged in. The user's tracker key should only be included if the user is logged in and the tracker is running in private mode.

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`.

Metadata

Metadata

Assignees

Labels

BugIncorrect Behavior

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions