ProductPromotion
Logo

Node.JS

made by https://0x3d.site

GitHub - mafintosh/webcat: Mad science p2p pipe across the web using webrtc that uses your Github private/public key for authentication and a signalhub for discovery
Mad science p2p pipe across the web using webrtc that uses your Github private/public key for authentication and a signalhub for discovery - mafintosh/webcat
Visit Site

GitHub - mafintosh/webcat: Mad science p2p pipe across the web using webrtc that uses your Github private/public key for authentication and a signalhub for discovery

GitHub - mafintosh/webcat: Mad science p2p pipe across the web using webrtc that uses your Github private/public key for authentication and a signalhub for discovery

webcat

Mad science p2p pipe across the web using webrtc that uses your Github private/public key for authentication and a signalhub for discovery

We also want to support other key hosts beyond Github. If you have suggestions or want to help implement this check out this issue.

npm install -g webcat

If you have trouble getting it to compile try following the wrtc install instructions

Usage

webcat lets you establish a p2p pipe to other github users over the web. Let's say I wanted to connect to @maxogden

First I need to configure webcat once

webcat --configure
Enter your github username: mafintosh

Then on my machine I run

webcat maxogden
hello max

On Max's machine he runs

webcat mafintosh
hi mathias

webcat will create a p2p pipe between connect me and max by using a signalhub to exchange webrtc metadata and Github private/public keys to authenticate that Max is actually @maxogden and that I am actually @mafintosh

On my machine my prompt now looks like

webcat maxogden
hello max
hi mathias

And on Max's machine it now looks like

webcat mafintosh
hi mathias
hello max

How it works

webcat works the following way

  1. First you sign a message that says you want to connect to another user using your Github private key
  2. You post this message to a known signalhub in the channel /{another-username}
  3. The other user does the same thing only they posts it to the channel /{my-username}
  4. One of you receives the connect message and verifies that it came from the right person by looking up the other users public key using https://github.com/{another-username}.keys (and this will work in the browser if Github adds CORS GET to this API!)
  5. You then create a webrtc signal handshake, sign it and post it to the other user's lobby
  6. The other user receives this and posts back a signed version of their signaling data
  7. You use this data to establish a secure webrtc connection between eachother that is encrypted using DTLS
  8. You are now connected :)

warning. we invented the first 6 parts of this scheme. it has not been properly peer reviewed so use at your own risk :)

we use the following crypto dependencies:

  • openssl from node core (rsa signing and https for fetching public keys)
  • dtls from webrtc

Use cases

You can use webcat to pipe files across the internet!

On my machine

webcat maxogden < some-file

On Max's machine

webcat mafintosh > some-file

Pipe to yourself

Assuming you have your github key on two different machines you can also open and pipe between them by using the same username.

On one machine connected to the internet that has your Github key

echo machine one | webcat mafintosh

On another machine connected to the internet that has your Github key

echo machine two | webcat mafintosh

Programmatic usage

You can use webcat from node as well.

var webcat = require('webcat')

var stream = webcat('mafintosh') // put in the name of the person you want to talk to
process.stdin.pipe(stream).pipe(process.stdout)

License

MIT

Articles
to learn more about the nodejs concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about NodeJS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory