Skip to content

finwo/gun-private

Repository files navigation

gun-private

quick attempt at making a private gun network

Setup

  • git clone https://github.com/finwo/gun-private
  • npm install
  • npm run server
  • browse to localhost:3000

Where is what

application code:

How does it work

Based on gun/examples/http-external-ws, we set up a regular GUN server with a custom websocket library (namely ws-rc4, allowing that as the only external communication). All clients wanting to connect to this server are now required to use rc4 encryption with the same key as the server is using.

If a client without the correct key attempts to connect to the server (or any other node), it will only see jibberish on the connection, preventing it from joining the network and accessing data.

TL;DR;

let gun = Gun({
  WebSocket: require('ws-rc4')("ENCRYPTION KEY")
})

About

Private gun network

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published