All Projects → subins2000 → P2pt

subins2000 / P2pt

Licence: mit
Simple WebRTC Peer 2 Peer connections using WebTorrent trackers as the signalling server. Use WebTorrent trackers for any kind of WebRTC app ! 🔥 Make WebRTC apps fast & easy ! 🚀⭐

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to P2pt

Instant.io
🚀 Streaming file transfer over WebTorrent (torrents on the web)
Stars: ✭ 2,954 (+1757.86%)
Mutual labels:  webrtc, p2p, webtorrent
Webtorrent Desktop
❤️ Streaming torrent app for Mac, Windows, and Linux
Stars: ✭ 8,587 (+5300.63%)
Mutual labels:  webrtc, p2p, webtorrent
Webtorrent Cli
WebTorrent, the streaming torrent client. For the command line.
Stars: ✭ 633 (+298.11%)
Mutual labels:  webrtc, p2p, webtorrent
Diffy
🎞️💓🍿 Love streaming - It's always best to watch a movie together ! 🤗
Stars: ✭ 37 (-76.73%)
Mutual labels:  webrtc, p2p, webtorrent
Webtorrent
⚡️ Streaming torrent client for the web
Stars: ✭ 25,554 (+15971.7%)
Mutual labels:  webrtc, p2p, webtorrent
P2p Media Loader
An open-source engine for P2P streaming of live and on demand video directly in a web browser HTML page
Stars: ✭ 822 (+416.98%)
Mutual labels:  webrtc, p2p, webtorrent
Wt Tracker
High-performance WebTorrent tracker
Stars: ✭ 144 (-9.43%)
Mutual labels:  webrtc, p2p, webtorrent
Camus
Peer-to-peer group video chat using WebRTC, Python, and Javascript
Stars: ✭ 75 (-52.83%)
Mutual labels:  webrtc, p2p
Libcrtc
WebRTC C++ library built on top of chromium webrtc.
Stars: ✭ 89 (-44.03%)
Mutual labels:  webrtc, p2p
Webrtc Qr
WebRTC Connect Experiment - https://aquigorka.com/webrtc-qr/
Stars: ✭ 154 (-3.14%)
Mutual labels:  webrtc, p2p
Webtorrent.io
The code that runs the WebTorrent website
Stars: ✭ 106 (-33.33%)
Mutual labels:  webrtc, webtorrent
Peerjs
Simple peer-to-peer with WebRTC
Stars: ✭ 9,888 (+6118.87%)
Mutual labels:  webrtc, p2p
Meshenger Android
P2P Audio/Video calls over local networks. No server or Internet access needed.
Stars: ✭ 152 (-4.4%)
Mutual labels:  webrtc, p2p
Bittorrent Tracker
🌊 Simple, robust, BitTorrent tracker (client & server) implementation
Stars: ✭ 1,184 (+644.65%)
Mutual labels:  webrtc, webtorrent
Android P2p Engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 70 (-55.97%)
Mutual labels:  webrtc, p2p
P2p Cdn Sdk Javascript
Free p2p cdn github javascript sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Stars: ✭ 158 (-0.63%)
Mutual labels:  webrtc, p2p
Ca11
Multi-Protocol Webphone
Stars: ✭ 69 (-56.6%)
Mutual labels:  webrtc, p2p
U2web
stream video with p2p
Stars: ✭ 97 (-38.99%)
Mutual labels:  webrtc, p2p
Wave Share
Serverless, peer-to-peer, local file sharing through sound
Stars: ✭ 1,641 (+932.08%)
Mutual labels:  webrtc, p2p
Roll Call
📞 Free and reliable audio calls for everyone w/ browser p2p.
Stars: ✭ 1,563 (+883.02%)
Mutual labels:  webrtc, p2p

P2PT

Simple library to establish P2P connections, communicate messages using WebTorrent Trackers (WebSocket) as the signalling server. Make any kind of WebRTC app using WebTorrent trackers as general-purpose WebRTC signalling servers.

Works in both browser & node environment.

Features

  • Easy to use API
  • Send long messages: Data splitted into chunks, sent, received and reassembled all by the library !
  • Use WebSocket Trackers as signalling servers
  • JSON messaging system
  • Send & Respond to messages in a chain using Promise

How Does It Work ?

The amazing WebTorrent library created a new kind of Torrent Trackers called "WebSocket Trackers" also known as "WebTorrent Trackers". Some torrent clients can use these new trackers to share files.

Browser torrent clients (example: BTorrent) only have the capability to communicate to these WebTorrent trackers and other browser peers (known as web peers). Because, JavaScript in browser can't directly make TCP/IP connections and communicate. Read more about how WebTorrent works here.

WebRTC is the method by which browsers can communicate to other browsers peer to peer (P2P). WebTorrent makes use of WebRTC for sharing Torrents on web.

But, to establish P2P connections, a signalling server is needed. Signalling servers can be made in any way. But, you'll have to host it yourself. In WebTorrent, it's the WebSocket trackers that are the signalling servers. What if we use those trackers to establish P2P connections for our apps ?! That is what P2PT does ! :)

How do we find peers for torrent to download ? We use a magnet link. That magnet link has a unique identifier for our torrent called the Info Hash. This ID will be unique for all torrents.

Similarly, to build our apps, we use a identifier. This identifier is converted to a valid Info Hash and sent to our WebTorrent trackers who will give us a list of web peers. These web peers would be the other users also using our app :

var p2pt = new P2PT(trackersAnnounceURLs, 'myApp')

And that is how P2PT works.

Examples

Apps Built With P2PT

Add yours here ! Send a PR ! 🚀

Simple Example

Open this webpage in two separate browser windows. You'll see the messages. It's a codepen, you can fiddle with the code there.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].