WebTorrent

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • webtorrent

    ⚡️ Streaming torrent client for the web

  • Progress is coming along on that!

    https://github.com/webtorrent/webtorrent/issues/369

  • stun

    A Go implementation of STUN (by pion)

  • This isn't true.

    In 2017 appear.in published some numbers. They saw ~15% were not able to do P2P. https://medium.com/@fippo/what-kind-of-turn-server-is-being-...

    Reading your stackoverflow link my guess is that you aren't using STUN. A P2P connection can't be established without a NAT hole punch.

    Also if possible I would avoid the terms `Full-cone NAT` and `Symmetric NAT` they don't do a good job of describing what is actually happening. NAT Mapping/NAT Filtering is the best way to describe it. I wrote a little bit about it here [0]. To see what type of NAT you have try stun-nat-behaviour[1]

    [0] https://webrtcforthecurious.com/docs/03-connecting/#nat-mapp...

    [1] https://github.com/pion/stun/tree/master/cmd/stun-nat-behavi...

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • node-datachannel

    Easy to use WebRTC data channels and media transport. libdatachannel node bindings.

  • trystero

    🤝 Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, and Firebase

  • WebTorrent is obviously well suited for p2p file distribution, but using a minimal subset of the protocol also provides a nice hack for easily bootstrapping peer connections between web app users. Piggybacking on public mediums already designed to do peer exchange can let you rapidly prototype a WebRTC project without the hassle of running your own server anywhere.

    I built a library that explores this idea: https://github.com/dmotz/trystero

  • werift-webrtc

    WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4

  • Lots of great WebRTC implementations exist. Do you want to stick with node.js?

    I am a big fan of https://github.com/shinyoshiaki/werift-webrtc it is pure Typescript.

    Check out https://github.com/sipsorcery/webrtc-echoes for all the other implementations.

  • webrtc-echoes

    Simple useful interoperability tests for WebRTC libraries. If you are a WebRTC library developer we'd love to include you!

  • Lots of great WebRTC implementations exist. Do you want to stick with node.js?

    I am a big fan of https://github.com/shinyoshiaki/werift-webrtc it is pure Typescript.

    Check out https://github.com/sipsorcery/webrtc-echoes for all the other implementations.

  • buffer

    The buffer module from node.js, for the browser.

  • Disclosure: I'm the author of WebTorrent.

    It'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, and writing hundreds of npm packages including buffer (https://github.com/feross/buffer), simple-peer (https://github.com/feross/simple-peer), and StandardJS (https://standardjs.com/).

    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. 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.

    WebTorrent never got as much attention as the cryptocurrency projects selling tokens throughout the mid-2010s, even though WebTorrent actually worked and had more real users than almost all of them :) I was never tempted to add a crypto-token to WebTorrent, despite many well-meaning friends telling me to do it. Nonetheless, WebTorrent served as an accessible on-ramp to the world of decentralized tech, along with other projects like Dat (https://dat-ecosystem.org/) and Secure Scuttlebutt (https://scuttlebutt.nz/).

    But WebTorrent is more than a protocol extension to BitTorrent. We built a popular desktop torrent client, WebTorrent Desktop (https://webtorrent.io/desktop/), which supports powerful features like instant video streaming.

    We also build a `webtorrent` JavaScript package (see https://socket.dev/npm/package/webtorrent) which implements the full BitTorrent/WebTorrent protocol in JavaScript. This implementation uses TCP, UDP, and/or WebRTC for peer-to-peer transport in any environment – whether Node.js (TCP/UDP), Electron (TCP/UDP/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 (https://webtorrent.github.io/workshop/) 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.

    Now that WebTorrent is fully supported in nearly all the most popular torrent clients, including uTorrent, dare I say that we succeeded? It's been a long and winding journey, but I'm glad to have played a role in making this happen. Special shoutouts to all the open source contributors over the years, especially Diego R Baquero, Alex Morais,

    P.S. If you're curious what I'm up to now, I'm building Socket (https://socket.dev). And there's actually a WebTorrent connection, too. Socket came out of a prior product we built called Wormhole (https://wormhole.app), an end-to-end encrypted file transfer application built using WebTorrent under-the-hood (Show HN thread: https://news.ycombinator.com/item?id=26666142). Like Firefox Send before it, security was a primary goal of Wormhole (see security details here: https://wormhole.app/security). But one area where we were lacking was in how we audited our open source dependencies. Like most teams building a JavaScript app, 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 our visitors coming from China. As most teams do, we enforced code review for all our first-party code. But similar to most teams, we were pulling in third-party dependencies and dependency updates without even glancing at the code (this is something that almost every company does today). We knew we needed to do better for our users. We looked around for a solution to analyze the risk of open source packages but none existed. So we decided to build Socket.

    Socket helps developers ship faster and spend less time on security busywork by helping them safely find, audit, and manage OSS. Socket provides a comprehensive open source risk analysis. By analyzing the full picture – from maintainers and how they behave, to open-source codebases and how they evolve – we enable developers and security teams to identify risk from malware, hidden code, typo-squatting, misleading packages, permission creep, unmaintained or abandoned packages, and poor security practices. For one quick example, take a look at the risks we identified in this Angular.js calendar library: https://socket.dev/npm/package/angular-calendar/issues/0.30....

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • webtorrent-desktop

    ❤️ Streaming torrent app for Mac, Windows, and Linux

  • Disclosure: I'm the author of WebTorrent.

    It'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, and writing hundreds of npm packages including buffer (https://github.com/feross/buffer), simple-peer (https://github.com/feross/simple-peer), and StandardJS (https://standardjs.com/).

    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. 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.

    WebTorrent never got as much attention as the cryptocurrency projects selling tokens throughout the mid-2010s, even though WebTorrent actually worked and had more real users than almost all of them :) I was never tempted to add a crypto-token to WebTorrent, despite many well-meaning friends telling me to do it. Nonetheless, WebTorrent served as an accessible on-ramp to the world of decentralized tech, along with other projects like Dat (https://dat-ecosystem.org/) and Secure Scuttlebutt (https://scuttlebutt.nz/).

    But WebTorrent is more than a protocol extension to BitTorrent. We built a popular desktop torrent client, WebTorrent Desktop (https://webtorrent.io/desktop/), which supports powerful features like instant video streaming.

    We also build a `webtorrent` JavaScript package (see https://socket.dev/npm/package/webtorrent) which implements the full BitTorrent/WebTorrent protocol in JavaScript. This implementation uses TCP, UDP, and/or WebRTC for peer-to-peer transport in any environment – whether Node.js (TCP/UDP), Electron (TCP/UDP/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 (https://webtorrent.github.io/workshop/) 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.

    Now that WebTorrent is fully supported in nearly all the most popular torrent clients, including uTorrent, dare I say that we succeeded? It's been a long and winding journey, but I'm glad to have played a role in making this happen. Special shoutouts to all the open source contributors over the years, especially Diego R Baquero, Alex Morais,

    P.S. If you're curious what I'm up to now, I'm building Socket (https://socket.dev). And there's actually a WebTorrent connection, too. Socket came out of a prior product we built called Wormhole (https://wormhole.app), an end-to-end encrypted file transfer application built using WebTorrent under-the-hood (Show HN thread: https://news.ycombinator.com/item?id=26666142). Like Firefox Send before it, security was a primary goal of Wormhole (see security details here: https://wormhole.app/security). But one area where we were lacking was in how we audited our open source dependencies. Like most teams building a JavaScript app, 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 our visitors coming from China. As most teams do, we enforced code review for all our first-party code. But similar to most teams, we were pulling in third-party dependencies and dependency updates without even glancing at the code (this is something that almost every company does today). We knew we needed to do better for our users. We looked around for a solution to analyze the risk of open source packages but none existed. So we decided to build Socket.

    Socket helps developers ship faster and spend less time on security busywork by helping them safely find, audit, and manage OSS. Socket provides a comprehensive open source risk analysis. By analyzing the full picture – from maintainers and how they behave, to open-source codebases and how they evolve – we enable developers and security teams to identify risk from malware, hidden code, typo-squatting, misleading packages, permission creep, unmaintained or abandoned packages, and poor security practices. For one quick example, take a look at the risks we identified in this Angular.js calendar library: https://socket.dev/npm/package/angular-calendar/issues/0.30....

  • Standard

    🌟 JavaScript Style Guide, with linter & automatic code fixer

  • Disclosure: I'm the author of WebTorrent.

    It'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, and writing hundreds of npm packages including buffer (https://github.com/feross/buffer), simple-peer (https://github.com/feross/simple-peer), and StandardJS (https://standardjs.com/).

    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. 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.

    WebTorrent never got as much attention as the cryptocurrency projects selling tokens throughout the mid-2010s, even though WebTorrent actually worked and had more real users than almost all of them :) I was never tempted to add a crypto-token to WebTorrent, despite many well-meaning friends telling me to do it. Nonetheless, WebTorrent served as an accessible on-ramp to the world of decentralized tech, along with other projects like Dat (https://dat-ecosystem.org/) and Secure Scuttlebutt (https://scuttlebutt.nz/).

    But WebTorrent is more than a protocol extension to BitTorrent. We built a popular desktop torrent client, WebTorrent Desktop (https://webtorrent.io/desktop/), which supports powerful features like instant video streaming.

    We also build a `webtorrent` JavaScript package (see https://socket.dev/npm/package/webtorrent) which implements the full BitTorrent/WebTorrent protocol in JavaScript. This implementation uses TCP, UDP, and/or WebRTC for peer-to-peer transport in any environment – whether Node.js (TCP/UDP), Electron (TCP/UDP/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 (https://webtorrent.github.io/workshop/) 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.

    Now that WebTorrent is fully supported in nearly all the most popular torrent clients, including uTorrent, dare I say that we succeeded? It's been a long and winding journey, but I'm glad to have played a role in making this happen. Special shoutouts to all the open source contributors over the years, especially Diego R Baquero, Alex Morais,

    P.S. If you're curious what I'm up to now, I'm building Socket (https://socket.dev). And there's actually a WebTorrent connection, too. Socket came out of a prior product we built called Wormhole (https://wormhole.app), an end-to-end encrypted file transfer application built using WebTorrent under-the-hood (Show HN thread: https://news.ycombinator.com/item?id=26666142). Like Firefox Send before it, security was a primary goal of Wormhole (see security details here: https://wormhole.app/security). But one area where we were lacking was in how we audited our open source dependencies. Like most teams building a JavaScript app, 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 our visitors coming from China. As most teams do, we enforced code review for all our first-party code. But similar to most teams, we were pulling in third-party dependencies and dependency updates without even glancing at the code (this is something that almost every company does today). We knew we needed to do better for our users. We looked around for a solution to analyze the risk of open source packages but none existed. So we decided to build Socket.

    Socket helps developers ship faster and spend less time on security busywork by helping them safely find, audit, and manage OSS. Socket provides a comprehensive open source risk analysis. By analyzing the full picture – from maintainers and how they behave, to open-source codebases and how they evolve – we enable developers and security teams to identify risk from malware, hidden code, typo-squatting, misleading packages, permission creep, unmaintained or abandoned packages, and poor security practices. For one quick example, take a look at the risks we identified in this Angular.js calendar library: https://socket.dev/npm/package/angular-calendar/issues/0.30....

  • simple-peer

    📡 Simple WebRTC video, voice, and data channels

  • Disclosure: I'm the author of WebTorrent.

    It'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, and writing hundreds of npm packages including buffer (https://github.com/feross/buffer), simple-peer (https://github.com/feross/simple-peer), and StandardJS (https://standardjs.com/).

    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. 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.

    WebTorrent never got as much attention as the cryptocurrency projects selling tokens throughout the mid-2010s, even though WebTorrent actually worked and had more real users than almost all of them :) I was never tempted to add a crypto-token to WebTorrent, despite many well-meaning friends telling me to do it. Nonetheless, WebTorrent served as an accessible on-ramp to the world of decentralized tech, along with other projects like Dat (https://dat-ecosystem.org/) and Secure Scuttlebutt (https://scuttlebutt.nz/).

    But WebTorrent is more than a protocol extension to BitTorrent. We built a popular desktop torrent client, WebTorrent Desktop (https://webtorrent.io/desktop/), which supports powerful features like instant video streaming.

    We also build a `webtorrent` JavaScript package (see https://socket.dev/npm/package/webtorrent) which implements the full BitTorrent/WebTorrent protocol in JavaScript. This implementation uses TCP, UDP, and/or WebRTC for peer-to-peer transport in any environment – whether Node.js (TCP/UDP), Electron (TCP/UDP/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 (https://webtorrent.github.io/workshop/) 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.

    Now that WebTorrent is fully supported in nearly all the most popular torrent clients, including uTorrent, dare I say that we succeeded? It's been a long and winding journey, but I'm glad to have played a role in making this happen. Special shoutouts to all the open source contributors over the years, especially Diego R Baquero, Alex Morais,

    P.S. If you're curious what I'm up to now, I'm building Socket (https://socket.dev). And there's actually a WebTorrent connection, too. Socket came out of a prior product we built called Wormhole (https://wormhole.app), an end-to-end encrypted file transfer application built using WebTorrent under-the-hood (Show HN thread: https://news.ycombinator.com/item?id=26666142). Like Firefox Send before it, security was a primary goal of Wormhole (see security details here: https://wormhole.app/security). But one area where we were lacking was in how we audited our open source dependencies. Like most teams building a JavaScript app, 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 our visitors coming from China. As most teams do, we enforced code review for all our first-party code. But similar to most teams, we were pulling in third-party dependencies and dependency updates without even glancing at the code (this is something that almost every company does today). We knew we needed to do better for our users. We looked around for a solution to analyze the risk of open source packages but none existed. So we decided to build Socket.

    Socket helps developers ship faster and spend less time on security busywork by helping them safely find, audit, and manage OSS. Socket provides a comprehensive open source risk analysis. By analyzing the full picture – from maintainers and how they behave, to open-source codebases and how they evolve – we enable developers and security teams to identify risk from malware, hidden code, typo-squatting, misleading packages, permission creep, unmaintained or abandoned packages, and poor security practices. For one quick example, take a look at the risks we identified in this Angular.js calendar library: https://socket.dev/npm/package/angular-calendar/issues/0.30....

  • Pion WebRTC

    Pure Go implementation of the WebRTC API

  • I originally went the same route as you, and found that https://github.com/pion/webrtc is probably the best package out there for webrtc. I learned go just for it, and it paid off tenfold. Less memory, more connections, lower latency.

  • aquatic

    High-performance open BitTorrent tracker (UDP, HTTP, WebTorrent)

  • If you run your tracker on Linux and an info hash whitelist approach would work for your use case, it might be worthwhile having a look at aquatic_ws [0]. It relies on tungstenite [1] for websockets and achieves around 20x the throughput of the reference implementation when running with four threads.

    [0] https://github.com/greatest-ape/aquatic

  • tungstenite-rs

    Lightweight stream-based WebSocket implementation for Rust.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts