Authenticated websockets -> ZMQ bridge
Go Python Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

compiling (on ubuntu):

Obviously, you'll need the basic Go compiler installed and your GOPATH environment variable set up. Then you just need the ZMQ libraries available.

 $ sudo aptitude install libzmq-dev
 $ make install_deps
 $ make

running the broker:

 $ ./broker -config=broker.json

running windsock:

 $ ./windsock -config=windsock.json

The included .json should get you started for configuring them. windsock_ssl.json is an example of SSL/WSS config. If the 'Certificate' and 'Key' fields are both present, windsock will use SSL/WSS. Otherwise, it will be plain WS.

Obviously, you will want to make sure your configs agree on the Req + Pub/Sub ports, and you will want to make a new "Secret" for windsock and your client application to share. If you're using SSL, point the Certificate and Key fields at your .pem and .key files.

These are both available on the public Docker Hub: thraxil/windsock and thraxil/windsock-broker

The 'generate_cert.goprogram is included to help you make a self-signed certificate (for testing). It's just copied from the Go standard library ( Compile it withgo build generate_cert.goand run./generate_cert`. Don't use self-signed certificates in production though.

The and programs are included as examples of how you might interact with windsock and the broker. just subscribes to the broker and prints every message that comes across to STDOUT (handy for debugging). lets you type into STDIN and sends whatever you type to the broker.

Known issues:

If you're using go version 1.4.2 with windsock, you might get this "invalid heap pointer" error:

There are a few workarounds for this:

  • Use a different Go version.
  • Or, use libzmq version 4, with In order to do this, you need to install the libzmq3-dev (sic) package in ubuntu, and switch pebbe/zmq2 to pebbe/zmq4 in the source files.