Replying to Avatar fiatjaf

Some ideas that would be interesting to explore:

- A file provider like https://nostr.build but offering torrent seeding instead of direct downloads

- A platform for turning torrent magnet links into images (caching them briefly)

- Nostr clients uploading stuff (small images) to these torrent providers and inserting the magnet links in the notes

- Nostr clients that download render magnet links as images (if file size and content-type are applicable)

- Nostr clients that don't want to download torrents directly can turn the magnet links into normal image links from the aforementioned platform

I had started a proof-of-concept of this for Astral. Wasn’t sure if the community wanted this. Can pick it back up. Devs, check out https://webtorrent.io ...

My main concern is whether it’s feasible to implement a torrent client inside a Swift app (Damus). Any iOS devs know / have an educated guess?

Reply to this note

Please Login to reply.

Discussion

It probably wouldn't be good for performance in a phone app, that's why I suggested the other more indirect approach of using a third-party image provider.

Would you recommend a NIP to standardize how clients can integrate with various torrent-based image hosts? They should expose a single API that clients can code to, then a user can just choose which host they want to use by entering the API endpoint URL.

Wouldn’t it also be an issue that the amount of people wanting to leech using phone data would vastly outnumber those willing to seed?

That’s what those caching servers would be for. As soon as a new file is seeded (to the magnet tracker), the caching server would download it and start seeding it. So P2P-capable with a server backstop.