Skip to main content

Crate meerkly_sdk

Crate meerkly_sdk 

Source
Expand description

Runtime-agnostic meerkly exit-node core.

This crate is the single implementation of the exit node, wrapped by every platform binding (client-napi for Node, client-ffi for Kotlin/Go/Swift/Python). It holds exactly one QUIC connection to one gateway, opens outbound TCP sockets on demand, and reconnects automatically.

Runtime ownership. Unlike a Node addon, the FFI bindings have no ambient async runtime, so ProxyClient takes an explicit tokio::runtime::Handle and runs the supervisor on it. The endpoint driver and every connection task therefore share one runtime regardless of which runtime drives start().

Ephemeral-session lifecycle. Built for host apps that cannot run in the background: fast start(), clean fast stop(), and no assumption that a session lasts more than seconds.

Structs§

ClientConfig
ProxyClient
A handle to a single exit-node client.
Supervisor

Enums§

CaCert
Where the gateway CA comes from.
State
What the client is currently doing. Surfaced to host apps so they can show connection state without polling the gateway.

Constants§

DEFAULT_CONNECT_TIMEOUT
How long to wait when dialling a target on the gateway’s behalf.
DEFAULT_GATEWAY_ADDRESSES
The production gateway, used when a host does not name one itself.
DEFAULT_KEEP_ALIVE
QUIC keepalive interval — a fallback, not a second heartbeat.
DEFAULT_MAX_BACKOFF
DEFAULT_MAX_IDLE
How long silence is tolerated before the connection is considered dead.
DEFAULT_MIN_BACKOFF
Reconnect backoff bounds.
DEFAULT_START_TIMEOUT
How long start waits for the first connection.
VERSION
Semantic version of the client core, surfaced to bindings for the register handshake’s client_version.

Functions§

default_ca_cert_path
Default CA path, overridable by environment so a deployment does not have to thread the path through application code.

Type Aliases§

RejectionSlot
The reason the gateway gave the last time it refused this client, shared between the supervisor that hears it and the crate::ProxyClient that reports it. Cleared once a gateway accepts the client again.