Docs
From your own code
To build Connectivitizer into your own software, use the SDK for your language. An SDK runs the agent inside your device software, or opens sessions from your app with an ordinary HTTP and WebSocket interface; most do both. Each guide shows how to install it and the code for each side:- ESP32: C/C++ for the Arduino core, PlatformIO and ESP-IDF. Makes the ESP32’s web server reachable, and can call other devices.
- TypeScript: Node.js programs, on either side.
- React Native: Phone apps that call devices, with direct connections on Wi-Fi and mobile data.
- Plugins in other apps (relay only): A backup for web pages and plugins where nothing else can run: always through the relay, so all their traffic counts as relayed.
- Python: Python 3.10 or newer with asyncio, on either side.
- Java and Kotlin: The JVM (Java 11 or newer) and Android apps (Android 9 or newer), on either side.
- C# / .NET: .NET 10, on either side, with shared keys or with certificates and pairing.
- cz: For every other language, or software you cannot change: cz runs next to it, and the software keeps talking plain HTTP or TCP on a local port.
C#
await using var client = new ConnectivitizerClient(new ConnectivitizerClientOptions
{
ApiUrl = new Uri("<api url>"),
ApiKey = apiKey,
Identity = identity, // created locally; the private key stays here
Trust = trust, // the device identities this application accepts
});
await using TunnelSession session = await client.ConnectAsync("home-pc", ["api"]);
using var http = new HttpClient(session.CreateHttpHandler("api")) { BaseAddress = new Uri("http://api") };
Console.WriteLine(session.Info.Mode); // direct | e2e-relay | compatibility
Console.WriteLine(session.Info.EndToEndEncrypted); // verified by this endpoint
Console.WriteLine(session.Info.DirectFailureReason); // why not direct, if relayed