npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dweb-webtorrent

v0.0.4

Published

Webtorrent modified tracker and seeder

Downloads

5

Readme

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