MCPcopy Index your code
hub / github.com/ekoby/mqziti

github.com/ekoby/mqziti @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
10 symbols 30 edges 3 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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. follow quickstart or, use Ziti Edge Developer Sandbox
  4. create a Ziti service that will be used to for MQTT communication
  5. add/enroll Ziiti identities
  6. build this project console $ 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

Core symbols most depended-on inside this repo

zitiConnector
called by 1
mqziti_client/client.go
Serve
called by 1
mqziti_server/ziti_listener.go
Close
called by 1
mqziti_server/ziti_listener.go
NewZitiListener
called by 1
mqziti_server/ziti_listener.go
main
called by 0
mqziti_client/client.go
main
called by 0
mqziti_server/server.go
SetConfig
called by 0
mqziti_server/ziti_listener.go
Listen
called by 0
mqziti_server/ziti_listener.go

Shape

Method 5
Function 4
Struct 1

Languages

Go100%

Modules by API surface

mqziti_server/ziti_listener.go7 symbols
mqziti_client/client.go2 symbols
mqziti_server/server.go1 symbols

For agents

$ claude mcp add mqziti \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact