mesh-chat
Chat protocol for secure communication over a mesh network over the internet.
Topics / Reference
Routing Across the Mesh Network
Message Types
Server/Node List Sync
Require Commands
mesh-chat
Clients
Recognized Clients have been built in multiple languages. Interpretations between these clients are very unique, but the mesh-chat
protocol is always consistent.
- PyÑa Colada v0.9.0 (Python 3.4)
- Spiced Rumby (Ruby 2.3), based on MeshChat Core (Ruby 2.3)
mesh-chat
Clients
Planned - Otra Vez Gose (Go 1.6.2)
- Untitled NodeJS client (NodeJS)
- Emberclear (Ember 2.5)
mesh-chat
Relay
There is currently only one server-side relay. All clients can connect to this server. Many instances of this server across the internet are vital to the survival of a mesh-network and allow p2p communication across the globe.
- mesh-relay (Ruby on Rails 5)
Responsibility Breakdown
The client is responsible for sending all messages to servers. It is only permitted to send messages on its own behalf, and not for any other party. It will keep track of the active list of authorized servers.
The server is responsible for configuration of authorized servers and handling of all message receipts. When a message arrives, it is then relayed to the local client for display. In Milestone 2, the server will also handle authorization and server exchange.
Mesh-Chat Protocol
Each message will be a serialized JSON hash. Every hash must include:
{
type: <MessageClassName>, # This will tell each client how to read the rest of the keys
client: <String>, # name of the client that sent the message
client_version: <String>, # version of the client that sent the message
time_sent: <UTC DateTime String>, # time at the packaging of this message
sender: {
name: <String>,
location: <IpAddress>,
uid: <String> # Uinque ID generated by your client
},
message: <Indeterminant> # Variable type, can be string or json object (see below)
}
A receiving client deserializes the JSONized hash, and can do whatever with it.
Encryption
mesh-chat
applications should use dual RSA (PKCS1 v1.5) and AES-512 for encryption and decryption. Nodes which are new to the system must generate a set of RSA keys and provide at least one other node with the public key before it can begin participating in the mesh network.