WebTorrent
Disclosure: I&#x27;m the author of WebTorrent.<p>It&#x27;s so fulfilling to see WebTorrent still popping up on Hacker News after all these years. I started the project in 2013 and devoted most of my 20s to working on it, ultimately becoming a full-time open source maintainer. I started WebTorrent with the goal of extending the BitTorrent protocol to become more web-friendly, allowing any browser to become a peer in the torrent network. Within less than a year of starting the project, I got WebTorrent fully working (see <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8317441" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8317441</a>). And it worked _well_, beating many native torrent apps in terms of raw download speed and the ability to stream videos within seconds of adding a torrent.<p>WebTorrent never got as much attention as the cryptocurrency projects selling tokens throughout the mid-2010s, even though WebTorrent _actually worked_, and it had more users than almost all of them :) I was never tempted to add a cryptotoken to WebTorrent, despite many well-meaning friends telling me to do it and cash in. Nonetheless, WebTorrent served as an accessible on-ramp to the world of decentralized tech, along with other projects like Dat (<a href="https:&#x2F;&#x2F;dat-ecosystem.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dat-ecosystem.org&#x2F;</a>) and Secure Scuttlebutt (<a href="https:&#x2F;&#x2F;scuttlebutt.nz&#x2F;" rel="nofollow">https:&#x2F;&#x2F;scuttlebutt.nz&#x2F;</a>), playing a role in getting people excited about decentralization.<p>But WebTorrent is more than a protocol extension to BitTorrent. We also built a popular desktop torrent client, WebTorrent Desktop (<a href="https:&#x2F;&#x2F;webtorrent.io&#x2F;desktop&#x2F;" rel="nofollow">https:&#x2F;&#x2F;webtorrent.io&#x2F;desktop&#x2F;</a>), which supports powerful features like instant video streaming.<p>We also built a `webtorrent` JavaScript package (<a href="https:&#x2F;&#x2F;socket.dev&#x2F;npm&#x2F;package&#x2F;webtorrent" rel="nofollow">https:&#x2F;&#x2F;socket.dev&#x2F;npm&#x2F;package&#x2F;webtorrent</a>) which implements the full BitTorrent&#x2F;WebTorrent protocol in JavaScript. This implementation uses TCP, UDP, and&#x2F;or WebRTC for peer-to-peer transport in any environment – whether Node.js (TCP&#x2F;UDP), Electron (TCP&#x2F;UDP&#x2F;WebRTC), or the web browser (WebRTC). In the browser, the `webtorrent` package uses WebRTC which doesn’t require a browser plugin, extension, or any kind of installation to work. If you’re building a website and want to fetch files from a torrent, you can use `webtorrent` to do that directly client-side, in a decentralized manner. The WebTorrent Workshop (<a href="https:&#x2F;&#x2F;webtorrent.github.io&#x2F;workshop&#x2F;" rel="nofollow">https:&#x2F;&#x2F;webtorrent.github.io&#x2F;workshop&#x2F;</a>) is helpful for getting started and teaches you how to download and stream a torrent into an HTML page in just 10 lines of code.<p>Now that WebTorrent is fully supported in nearly all the most popular torrent clients, including uTorrent, dare I say that we succeeded?<p>Not only that, but we helped the JavaScript ecosystem a ton by writing hundreds of npm packages including buffer (<a href="https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;buffer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;buffer</a>), simple-peer (<a href="https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;simple-peer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;simple-peer</a>), and StandardJS (<a href="https:&#x2F;&#x2F;standardjs.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;standardjs.com&#x2F;</a>).<p>It&#x27;s been a long and winding journey, but I&#x27;m glad to have played a role in making WebTorrent happen. Huge shoutouts to all the open source contributors to WebTorrent over the years, but especially Diego R Baquero and Alex Morais who were critical to WebTorrent&#x27;s success.<p>If you&#x27;re curious what I&#x27;m up to now... I&#x27;m building Socket (<a href="https:&#x2F;&#x2F;socket.dev" rel="nofollow">https:&#x2F;&#x2F;socket.dev</a>) with an awesome team of open source folks. And there&#x27;s actually a WebTorrent connection, too! Before Socket, we built an end-to-end encrypted file transfer app, Wormhole (<a href="https:&#x2F;&#x2F;wormhole.app" rel="nofollow">https:&#x2F;&#x2F;wormhole.app</a>), using WebTorrent under-the-hood (Show HN thread: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26666142" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26666142</a>). Like Firefox Send before it, security was a primary goal of Wormhole (see security details here: <a href="https:&#x2F;&#x2F;wormhole.app&#x2F;security" rel="nofollow">https:&#x2F;&#x2F;wormhole.app&#x2F;security</a>). But one area where we felt we could improve the security of Wormhole was in how we audited our open source dependencies.<p>Like most teams building apps with JavaScript, we had a large `node_modules` folder filled with lots of constantly-updating third-party code. The risk of a software supply chain attack was huge, especially with 30% of Wormhole visitors coming from China. As most teams do, we enforced code review for our first-party code; but as most teams do, we pulled in third-party dependencies and dependency updates from npm without even glancing at the code. It&#x27;s too much work to read every line of code of all dependencies. But the status quo would leave our users open to supply chain attack and we wanted to do better for our users. We looked around for a solution to detect signs of attack and to analyze the risk of various open source packages, but none existed.<p>So we built Socket to help developers ship faster and spend less time on security busywork by helping them safely find, audit, and manage OSS. By analyzing the full picture – from maintainers and how they behave, to open-source codebases and how they evolve – we help developers and security teams to identify risk from malware, hidden code, typo-squatting, misleading packages, and more.