New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@someping/somepingd

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@someping/somepingd

My goal is to create a fully encrypted and decentralized message network. A message sent from one user to another must be fully anonymous and sent without the need of any parties knowing each others identity or destination. To solve this, all sent message

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Someping - decentralized chat application

My goal is to create a fully encrypted and decentralized message network. A message sent from one user to another must be fully anonymous and sent without the need of any parties knowing each others identity or destination. To solve this, all sent messages can be encrypted with the recepients public key and broadcasted to all users over the network. Only the user whom owns the matching private key will be able to read the message - all other nodes will help by forwarding the message to their network. To reduce the problem with spam and flood, nodes will only broadcast messages that has an id generated with proof of work.

I have some other ideas that could make this work to. But I'll add them here later.

v1.0.0-alpha (current - not stable)

  • Host a node and listen for peers
  • Broadcast messages to peers (clients)
  • Connect to other nodes

v1.0.1 todo

  • CLI: List connected peers
  • CLI: Connect to new node
  • Save all available nodes in a list.
  • CLI: List connected nodes
  • Broadcast messages to all nodes.

v1.0.2 todo

  • Encrypt messages with recepients public key before broadcasting them.
  • Decode base64, check if recepient matches with owned public key and decrypt message with private key.

v1.0.3 todo

  • Sign each relaying nodes identifier in a blockchain to track number of relays.
  • Stop broadcasting message when blockchain have X relayblocks.
  • Split message into 3 chunks and send via different nodes.

Installation

Install latest stable (cooming soon)

$ npm install -g someping

Install development version (master branch)

$ git clone git@github.com:kjellberg/someping.git
$ cd someping && npm install
$ npm link # link binaries

Start server daemon

$ somepingd [--port 44545] [--host 127.0.0.1]

API console

Open the api console by browsing to http://217.0.0.1:44555

Connect to a node

#! http://217.0.0.1:45555
# Command: CONNECT <host[:port]>

$ connect 51.15.78.19
03:40:10 Connected to node: 51.15.78.19:44545

Generate a public key for receiving messages

#! http://217.0.0.1:45555
# Command: GENERATEPUBKEY

$ generatepubkey
03:40:14 Generating a new public key:
03:40:14 LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZ3d0RRWUpLb1pJaHZjTkFR
RUJCUUFEU3dBd1NBSkJBS3pvOUt3WDFPbThNcjE2bWkyTnpHc0xMOTZIRFlJawpYTR0ST
BHSGcxTFJsNEI5VHNXSGxsMVFaa3dBRUg1dGZWK1AvRU5QUHhVajdpdlZnZW12aGRzQ0F
3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==
03:40:14 Give your public key the users you want to receive messages from.

Send an encrypted message to a public key

#! http://217.0.0.1:45555
# Command: SENDMSG <pubkey> message...

$ sendmsg LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZ3d0RRWUpLb1pJaHZjTkFRRUJCUUFEU3dBd1NBSkJBTmxkbnAxa285V0NmYVNMWlpWby9qRktFbnhQYUtuLwpZandLNjlBeUhScmhxYUNZRFNHMHN1VXFYbEtkdjhHYnF4cFZ1SG43T0RSTlJYZ0ZLNkNaRTU4Q0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ== Hello, my friend!

List peers

#! http://217.0.0.1:45555
# Command: PEERS

$ peers
03:46:25 Total number of connected peers: 1
03:46:25 [{"address":"82.243.23.231","port":null,"public":false}]

List nodes

#! http://217.0.0.1:45555
# Command: NODES

$ nodes
03:40:25 Total number of connected nodes: 1
03:40:25 [{"address":"51.15.78.19","port":44545}]

FAQs

Package last updated on 21 Feb 2018

Related posts