dweb
Mitra's DWeb build, test, deploy repo
TODO will need something on 5000
Webtorrent tracker / super-seeder
Actors: client (on users' machine); metadata service (Gateway or GUN); Tracker and Seeder (in K8 on K8-IP-ADDRESS)
- UI retrieves metadata for a file
- Gateway or GUN delivers metadata to client including a magnet link (see ipfs or nginx as well)
- UI -> dweb-transports:Transports -> dweb-transports:TransportWEBTORRENT
- The magnet link includes a number of trackers, including "wss://dweb.archive.org:6969"
- A webtorrent client contacts the tracker
- Calls https://www-dweb-webtorrent.dev.archive.org:6969
- Ingress proxies it to tracker (maybe on 5000)
- client upgrades that connection to WSS - proxied to WS (Websockets)
- Tracker is responding WSS on 6969
- Bittorrent clients can also use https or wss or udp calls to dweb.archive.org:6969,
- I'm not sure if UDP connections ignored or proxied
- Client asks Tracker for BTIH
- Tracker responds with:
- Any other tracked clients,
- webrtc:K8-IP-ADDRESS:6881 which is the seeder.
- Optionally Tracker can deny tracking unless BTIH is present on Archive - presently turned off (BK decision)
- The client sends the BTIH to the seeder
- Client uses WebRTC to contact seeder at K8-IP-ADDRESS:6881
- The seeder is complex, if I understand how it works then ...
- Seeder is split into two parts (front & back)
- Front side thinks it has all the blocks, sitting in the back side, and tells the client it has
- Front side then asks the back side for the blocks
- Back side (initially) thinks it has no blocks, but that there is a store on IA URL
- Back side calls https://www-dev-cors.dev.archive.org/btih/$INFOHASH?output=torrent to get torrentfile
-
https://www-dev-cors.dev.archive.org/btih/$INFOHASH?output=torrent
- Searches for btih: https://archive.org/advancedsearch.php?fl=identifier,btih&output=json&rows=1&q=btih:
- Uses result to find itemid
- Retrieves https://archive.org/download/$ITEMID/$ITEMID_archive.torrent
- Modifies torrent to correct IA torrent legacy issues and returns torrent to Seeder back side
- Seeder Backside
- Gets blocks from store using https://archive.org/download... with range request, and passes to front side
TODO - obtain test URLS for all of - there are some in email from Feross for webtorrrent