Skip to content

Tunnel

A running tunnel. Call stop() when done; a garbage-collected handle stops the tunnel and cuts its open connections.

get localAddress(): string;

The local address to connect to, host:port, with the port the OS picked.

string


get running(): boolean;

Whether the tunnel is still serving.

boolean

stop(timeout?: number | null): Promise<TunnelReport>;

Stops accepting, waits for the connections still open to end, and resolves with the report.

With timeout (seconds), connections still open after it are cut and listed as "failed". Without it, a client that keeps its connection open keeps this waiting. Callable again, with the same report.

Parameter Type
timeout? number | null

Promise<TunnelReport>


toString(): string;

The handle without its credentials.

string

This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.