NullVoxPopuli / mesh-relay

relay server for mesh-chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated

Replacement: https://github.com/NullVoxPopuli/mesh-relay-phoenix this also means the websocket protocol has changed (it's similar, but slightly different from action cable)

MeshRelay

This is a public relay server for mesh-chat

See these test scripts for how to interact with the relay.

How to Deploy

  • push to new heroku app
  • add the redis-cloud addon
  • point your clients at ws://you-heroku-app-name.herokuapp.com?uid=your_users_id

Otherways to run the server:

Sending messages

You may use any websocket client as long as it adheres to action_cable message formatting, such as action_cable_client (ruby)

Messages should be sent with the chat command and with a payload of { to: recipient_uid, message: encrypted_data }

client.perform('chat', {
  to: 'user1',
  message: 'hello from user2'
})

Receiving messages

Received messages will look like this:

{ message: encrypted_data }

Errors

{
  status: 404,
  detail: 'uid....'
  error: 'message about not being found'
}

Current Relays

US

  • mesh-relay-in-us-1.herokuapp.com
  • mesh-relay-us-2.herokuapp.com

EU

  • mesh-relay-eu-1.herokuapp.com
  • mesh-relay-eu-2.herokuapp.com

Note: all the examples are in ruby. All messages sent and received should be JSON formatted.

About

relay server for mesh-chat

License:MIT License


Languages

Language:Ruby 88.6%Language:HTML 11.4%