Skip to content

ServeIrohTcpUpstreamOptions

Defined in: src/launcher/serve-iroh.ts:11

Options for the raw loopback upstream consumed by vgi-iroh-bridge.

  • Omit<ServeTcpOptions, | "host" | "peerIdentityProviders" | "peerAuthenticationPolicy" | "proxyProtocolV2Required" | "trustedProxyAddresses" | "irohProxyIssuer">
optional announcementSink?: WritableStream;

Defined in: src/launcher/serve-tcp.ts:100

Override the stream used for the TCP:<host>:<port> line. Defaults to process.stdout.

ServeTcpOptions.announcementSink


readonly optional authenticate?: boolean;

Defined in: src/launcher/serve-iroh.ts:28

Promote the verified EndpointId to AuthContext. Defaults to true.


optional backlog?: number;

Defined in: src/launcher/serve-tcp.ts:93

Maximum listen backlog. Default: 128.

ServeTcpOptions.backlog


optional dispatchHook?: DispatchHook;

Defined in: src/launcher/serve-tcp.ts:87

Optional dispatch hook for observability.

ServeTcpOptions.dispatchHook


optional enableDescribe?: boolean;

Defined in: src/launcher/serve-tcp.ts:85

Host vgi_rpc.Reflection.v1. Default: true.

Named for the __describe__ method it used to switch on. What it gates is introspection, which is now a co-hosted protocol rather than a reserved method answered before dispatch.

ServeTcpOptions.enableDescribe


optional externalLocation?: ExternalLocationConfig;

Defined in: src/launcher/serve-tcp.ts:89

Optional external-storage config for large-batch externalisation.

ServeTcpOptions.externalLocation


readonly optional host?: "localhost" | "127.0.0.1" | "::1";

Defined in: src/launcher/serve-iroh.ts:24

Loopback bind address. Defaults to 127.0.0.1.


optional identityResolutionTimeoutMs?: number;

Defined in: src/launcher/serve-tcp.ts:109

Total provider-resolution budget per accepted connection. Default: 1000 ms.

ServeTcpOptions.identityResolutionTimeoutMs


optional idleTimeout?: number;

Defined in: src/launcher/serve-tcp.ts:71

Self-terminate after this many seconds with zero connected clients. Default: 300. 0 disables the timer (server runs until killed).

ServeTcpOptions.idleTimeout


readonly issuer: string;

Defined in: src/launcher/serve-iroh.ts:22

Operator-controlled identity namespace.


optional maximumProxyPreambleBytes?: number;

Defined in: src/launcher/serve-tcp.ts:119

Maximum complete PROXY v2 preamble size, including bounded unknown TLVs. Default: 536.

ServeTcpOptions.maximumProxyPreambleBytes


optional onBound?: (host, port) => void;

Defined in: src/launcher/serve-tcp.ts:97

Called after listen() returns successfully but before TCP:<host>:<port> is printed. Invoked with the bound host and the actual bound port (resolved when port=0).

Parameter Type
host string
port number

void

ServeTcpOptions.onBound


optional onServeStart?: ServeStartHook;

Defined in: src/launcher/serve-tcp.ts:91

Lifecycle hook fired once before the first dispatched request.

ServeTcpOptions.onServeStart


optional peerProviderConcurrency?: number;

Defined in: src/launcher/serve-tcp.ts:111

Maximum provider calls that may remain active after connection deadlines. Default: 64.

ServeTcpOptions.peerProviderConcurrency


optional peerServiceName?: string;

Defined in: src/launcher/serve-tcp.ts:107

Logical service destination supplied to destination-aware providers.

ServeTcpOptions.peerServiceName


optional port?: number;

Defined in: src/launcher/serve-tcp.ts:68

TCP port to bind. Defaults to 0, which lets the OS pick a free port (reported via the TCP:<host>:<port> line and onBound).

ServeTcpOptions.port


optional protocolVersion?: string;

Defined in: src/launcher/serve-tcp.ts:77

Optional logical-service / protocol-contract version label.

ServeTcpOptions.protocolVersion


optional proxyPreambleTimeoutMs?: number;

Defined in: src/launcher/serve-tcp.ts:117

Independent deadline for the complete PROXY v2 preamble. Default: 1000 ms.

ServeTcpOptions.proxyPreambleTimeoutMs


optional serverId?: string;

Defined in: src/launcher/serve-tcp.ts:79

Custom server identifier.

ServeTcpOptions.serverId


optional startupGraceSeconds?: number;

Defined in: src/launcher/serve-tcp.ts:75

Grace period after listen() succeeds before the idle timer starts ticking. Default: 5 — gives the first launcher caller a chance to connect after the TCP:<host>:<port> announcement.

ServeTcpOptions.startupGraceSeconds


readonly optional trustedProxyAddresses?: readonly string[];

Defined in: src/launcher/serve-iroh.ts:26

Exact immediate bridge addresses. Defaults to IPv4 loopback.