Skip to content

ekoby/mqziti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQTT => MQZiti

This project shows how to easily Zitify(run dark on zero trust overlay network) your Golang MQTT server and clients.

Setup

  1. Get your code -- clone this repo
  2. Get yourself an OpenZiti network and Ziti identities
  3. build this project
    $ mkdir build && go build -o build ./...
    this creates mqziti_server and mqziti_client in your build directory

This following is assumed for the rest of this document:

  • 'mqziti' - the name of the service we are going to use
  • server.json - Ziti identity file for the server
  • client.json - Ziti identity for the client

Server

We use Mochi MQTT as base and implement a Listener that binds to the Ziti service.

Run the server

$ ./build/mqziti_server -identity server.json -service mqziti

You can check that the process has no listening sockets. This means that you need to open your firewall.

Client

We use Paho MQTT and implement a connector that connects to Ziti service.

You will need to run mqziti_client twice for this test: one instance to subscribe, and one instance to publish.

Subscriber:

$ ./build/mqziti_client -identity client.json -service mqziti -topic /openziti

Publish something:

$ ./build/mqziti_client -identity client.json -service mqziti -topic /openziti -pub "Hello OpenZiti!"

You should see the message printed on the subscriber console.

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages