# Bridge Protocol (Legacy)

## Overview

The Bridge Protocol represents a **legacy node transport mechanism** utilizing TCP JSONL communication. New node clients should use the unified Gateway WebSocket protocol instead.

## Key Characteristics

### Transport Details

- TCP-based with one JSON object per line (JSONL format)
- Optional TLS encryption when enabled
- Legacy default port: 18790
- Certificate pinning available via discovery TXT records

### Security Features

The protocol maintains distinct advantages including a small allowlist instead of the full gateway API surface and node admission controlled through per-node tokens tied to gateway management.

## Technical Components

### Handshake Sequence

The pairing process involves the client sending metadata with an optional token, followed by gateway validation, pair-request submission, and approval confirmation returning server identity information.

### Frame Types

- Client-to-gateway: RPC requests, node signals, event emissions
- Gateway-to-client: node commands, session updates, keepalive signals

### Exec Lifecycle

Nodes can emit completion or denial events with optional metadata including session identifiers, command details, and exit information.

## Current Status

Current OpenClaw builds no longer ship the TCP bridge listener; this document is kept for historical reference.
