Giter Club home page Giter Club logo

smoke-signals's Introduction

Smoke Signals

This is a simple WebRTC signaling server.

Usage

Infos:

$ curl -X GET http://localhost:7665/
{
  "name": "smoke-signals",
  "description": "A simple WebRTC signaling server",
  "version":"0.0.1",
  "endpoint":"http://localhost:7665"
}

Create a room:

$ curl -X POST http://localhost:7665/rooms --header "Content-Type: application/json"
{"room": "3d56a9d9b2b8709fa5874d2907542e4a"}

$ curl -X POST http://localhost:7665/rooms --header "Content-Type: application/json" --data '{"room": "foo"}'
{"room": "foo"}

Listen for events in a room:

$ curl -X GET http://localhost:7665/rooms/3d56a9d9b2b8709fa5874d2907542e4a

event: uid
data: {"uid": "3d56a9d9b2b8709fa5874d2907542e4a", "token": "0ca598dd0627a091342705f05d38124d"}

event: newbuddy
data: {"peer": "3d56a9d9b2b8709fa5874d2907542e4a"}

Send an event to someone (here it sends an event bar to user xoo:

$ curl -X POST http://localhost:7665/rooms/3d56a9d9b2b8709fa5874d2907542e4a --header "Content-Type: application/json" " --data '
{
  "type": "bar",
  "token": "my token",
  "peer": "xoo",
  "payload": {
    "arbitrary": "data"
  }
}'

License

Smoke Signals are released under the Mozilla Public License 2.0

smoke-signals's People

Contributors

almet avatar tokeshu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

smoke-signals's Issues

Send an associated secret token with the UID

For now we send an UID to each user when they open an Server-Sent Events connection.
This UID is both used to identify the user in later requests and to forward events from another user.

As the UID is public, everyone can impersonate anyone. To fix that I propose to send an associated secret token with the UID. It would replace the current SMOKE-UID header.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.