Skip to main content

Desktop SDK

The Kape Desktop SDK is the .NET member of the Platform SDK family. It provides the same client types as the iOS and Android SDKs — KapeSdkHandle, KapeAuthClient, KapeVpnManager, KapeLocationService — for building VPN-enabled desktop applications on Windows, macOS, and Linux.

Unlike the mobile SDKs, the desktop library embeds no VPN logic. It connects to the Kape daemon — a privileged system service that owns all VPN operations — receives a live stream of state updates, and issues control commands. Your application never touches network interfaces, firewall rules, or kernel drivers.

Status: In active development. The API is taking shape but some areas — including daemon installation and platform-specific configuration — are still being finalised. Guidance on those topics will be added as it is ready.

How It Works​

Your Application (C# / .NET)
│
▼
Kape.PlatformSdk
(IPC client)
│ Named Pipe (Windows) · Unix socket (macOS, Linux)
▼
Kape Daemon (system service)
- manages the VPN tunnel
- handles firewall rules and kill switch
- owns and configures platform drivers
- tracks and broadcasts connection state

Namespaces​

NamespacePurpose
Kape.CoreKapeSdkHandle (the daemon connection) and KapeError
Kape.AuthKapeAuthClient — login, logout, authentication state
Kape.VpnKapeVpnManager, KapeLocationService and the VPN models

They mirror the mobile modules (KapeCore, KapeAuth, KapeVPN); all three ship in the one Kape.PlatformSdk package.

Platforms​

PlatformTransport
WindowsNamed Pipe
macOSUnix socket
LinuxUnix socket
info

Building a native Swift macOS or iOS app? Use the iOS SDK instead — it embeds VPN logic directly via the Low Level SDK and NetworkExtension. The Desktop SDK is for non-Apple-framework apps (.NET / MAUI, etc.).

Quick Example​

using Kape.Auth;
using Kape.Core;
using Kape.Vpn;

await using var handle = await KapeSdkHandle.CreateAsync();

var auth = new KapeAuthClient(handle);
if (auth.AuthState == KapeAuthState.Unauthenticated)
await auth.LoginAsync(activationCode);

var locations = new KapeLocationService(handle);
var location = (await locations.FetchLocationsAsync()).First(l => !l.Offline);

var vpn = new KapeVpnManager(handle);
vpn.ConnectionStatusChanged += status => Console.WriteLine($"VPN: {status}");

await vpn.ConnectAsync(location);

Guides​

  • Installation — requirements, daemon prerequisite, package setup
  • Getting Started — connect to the daemon and control the VPN
  • Authentication — daemon-owned login
  • VPN — connecting, protocols, server locations, network protection, split tunnel