Inbox makes it easy to setup a WebRTC HTTPS signaling server
Table of Contents
You can download the latest version from releases for your system/architecture
git clone [email protected]:emad-elsaid/inbox.git
cd inbox
go install cmd/inbox.go
docker run --rm -it -p 3000:3000 emadelsaid/inbox ./inbox --https=false
docker run --rm -it -v /path/to/cert/directory:/cert -p 3000:3000 emadelsaid/inbox ./inbox --server-cert=/cert/server.crt --server-key=/cert/server.key
The following are public instances you can use instead of running your own:
-bind string
a bind for the http server (default "0.0.0.0:3000")
-cleanup-interval int
Interval in seconds between server cleaning up inboxes (default 1)
-cors
Allow CORS
-https
Run server in HTTPS mode or HTTP (default true)
-inbox-capacity int
Maximum number of messages each inbox can hold (default 100)
-inbox-timeout int
Number of seconds for the inbox to be inactive before deleting (default 60)
-long-polling
Allow blocking get requests until a message is available in the inbox (default true)
-max-body-size int
Maximum request body size in bytes (default 1048576)
-max-header-size int
Maximum request body size in bytes (default 1048576)
-public string
Directory path of static files to serve (default "public")
-server-cert string
HTTPS server certificate file (default "server.crt")
-server-key string
HTTPS server private key file (default "server.key")
If you’re new to writing WebRTC application I recommend you make yourself familiar with the basic concepts from google, For a tutorial about how to use Inbox I got you covered from installation to Javascript communication Read more
-https=false
passed to it.server.key
and server.crt
:
openssl genrsa -des3 -passout pass:secretpassword -out server.pass.key 2048
openssl rsa -passin pass:secretpassword -in server.pass.key -out server.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
./public
directory/inbox
for the sender and receiver to signal each
other the webRTC offer and answer.Inbox acts as a temporary mailbox between peers, the server creates the inbox upon the first interaction with the user and deletes it after a duration of inactivity which is 1 minute by default Read more
/public
in current working directory as static filesgit clone [email protected]:emad-elsaid/inbox.git
go run ./cmd/inbox.go
https://your-ip-address:3000/send.html
on the camera machinehttps://your-ip-address:3000/receive.html
on the receiver machinestart
buttonInbox inherits the high speed of Go and as it uses the RAM as storage its mostly a CPU bound process, the project comes with go benchmarks you can test it on your hardware yourself, You can checkout my CPU specs and benchmark numbers on my machine here Read more
Expected contribution flow will be as follows:
MIT License (c) Emad Elsaid