torrust-tracker icon indicating copy to clipboard operation
torrust-tracker copied to clipboard

Feature requests and code improvement

Open dev1z opened this issue 3 years ago • 2 comments

@Power2All, @WarmBeer Here are some ideas to improve tracker usability which I have in mind. Would like to know if this is out of scope or it is possible to be added without hurting performance.

  1. Add prefix config option for mysql/sqlite table names to avoid duplication (eg. prefix_peers, prefix_torrents, prefix_keys)
  2. Add private key in peers api when tracker is in private mode.
  3. Add more methods for API so it can interact better with common torrent tracker scripts 3.1. GET /api/peers/:peer_id - Return all peers with selected peer_id and include info_hash + peers stats for easier data manipulation. 3.2. GET /api/peers/:ip - Return all peers with selected ip and include info_hash + peers stats for easier data manipulation. 3.3. GET /api/peers/:priv_key - Return all peers with selected priv_key and include info_hash + peers stats for easier data manipulation. 3.4. GET /api/key_status/:priv_key - Check if priv_key is used by multiple IP addresses and return number | false to check if someone is sharing key
  4. Separate ip and port from peers or rename ip to be ip_addr = ip:port and include separate ip + port fields.

Those are current ideas to make private tracker more advanced and easier to use.

dev1z avatar May 15 '22 16:05 dev1z

API will be dealt with when the basic announce and scrape system works on the new core I'm rewriting now. I'm currently in the process of handling the query data and do a validation on it. When this all works, I can work it further out, but since I'm not in my home right now (on vacation right now), I haven't gotten around it very much yet, since 38 celcius every day doesn't make it fun to program haha.

Power2All avatar May 15 '22 17:05 Power2All

I was about to open an issue with the sames things, when i saw this feature request. Indeed it would be convenient to have these kind of endpoints for private mode, particularly getting stats for a private key (downloaded/uploaded).

iloveyourwife avatar May 18 '22 08:05 iloveyourwife