Public beta · 100% free to use

Tunnels, proxies, and stable IPs. No accounts. No API keys.

Open HTTP/TCP tunnels to local services, route outbound traffic through forward and reverse proxies, lease stable IP addresses for whitelisted gateways, and run metered WebSocket sessions — settled over x402.

$ npm i @canister-software/consensus-cli
The CLI & TUI

The whole network, from the terminal.

A CLI and a full-screen TUI, built with OpenTUI. Four primitives, one binary: tunnels, deduplicated proxies, leased IPs, and metered sockets.

01

TUNNELS: Expose local services natively via the CLI

$ consensus tunnel http localhost:3000

✓ Tunnel online
  https://amber-otter.tunnel.canister.software → localhost:3000
  
One command to Live

An HTTP tunnel puts a local port or device on a public HTTPS URL in seconds — the same job as an ngrok or Cloudflare tunnel, without the account. No signup, monitor every request in real time.

Read the tunnels guide →
02

PROXIES: Forward and reverse proxying. Wrap fetch(), ship secured.

import { ProxyClient, createPaymentFetch } from '@canister-software/consensus-cli'

const proxy = ProxyClient(await createPaymentFetch(), {
  node_region: 'east-us',
  cache_ttl:   60,
  limit_usd:   0.05,   // stands down to direct fetch when hit
})

// routed through a node: deduplicated and cached
const res = await proxy.fetch('https://external.com')
Drop-in SDK

Wrap fetch() once and every outbound call routes through the Consensus proxy: protected, deduplicated, and cached. Works as a forward proxy for outbound calls and a reverse proxy in front of your own services. Existing route handlers stay untouched.

Read the proxy guide →
03

STABLE IPs: Verify and pin traffic to a static IP address

$ consensus ip list --region east-us
NODE ID        DOMAIN                                    REGION    SCORE
a3f1c94b2e07   a3f1c94b2e07.consensus.canister.software  east-us   96

$ consensus ip lease a3f1c94b2e07
✓ Leased: a3f1c94b2e07.consensus.canister.software (traffic pinned)
Pin the IP

Lease a verified, performant node and pin every tunnel, proxy, and WebSocket to one static IP address. Whitelist the IP once with an upstream API, reconnect automatically, and stop fighting dynamic firewalls.

Read the static IP guide →
04

WEBSOCKETS: Prepaid, metered WebSocket sessions for stateless apps

import { SocketClient } from '@canister-software/consensus-cli'

const client = SocketClient(fetchWithPayment)

// prepay a bounded, metered session
const auth = await client.requestToken({
  model: 'hybrid', minutes: 60, megabytes: 500,
})

const session = await client.connect(auth)
session.on('message', (m) => console.log('recv', m))
Prepaid & metered

Prepay time, data, or both with a single x402 payment. Each persistent WebSocket session is metered by the protocol and closed cleanly once the budget runs out. No accounts, no state.

Read the WebSockets guide →

Pay on any of three networks.

one facilitator · the exact scheme
Ethereum
Ethereum Mainnet
Solana
Solana Mainnet
Internet Computer
Internet Computer Mainnet

Pure application-level routing with a Cache.

Wire native proxy handlers directly into your JavaScript/TypeScript processes using clean dependency injection, and manage parameters locally via secure profiles.

Integration 01
Drop-in SDK, or dependency injection

Two ways to wire into a codebase. Import the SDK and call ProxyClient or SocketClient as middleware directly in application code, or hand the protocol native handlers through dependency injection. Both paths run at the application level and never decrypt HTTPS, so existing request logic and TLS stay exactly as written.

Configuration 02
No accounts. Local profiles.

Nothing to sign up for and no keys to rotate. Configuration lives in local profiles on the machine. Create named profiles, customize defaults and spend limits per project, and switch between them instantly, with nothing held on a remote server.

Security 03
Vetted nodes, encrypted channels

Every node earns its place. Before serving any traffic a node passes an encrypted performance test, and only nodes that stay connected and healthy remain in rotation. Traffic between the runtime and each node travels over encrypted channels, so data in transit stays protected across every hop.

Built for JavaScript & TypeScript runtimes JavaScript TypeScript
Common questions

Tunnels, proxies, IPs, and sockets — answered.

What is x402?

x402 is an open payment protocol that revives the HTTP 402 Payment Required status code. A server answers an unpaid request with 402 and a price quote; the client signs a stablecoin payment and retries the same request with the proof attached. Consensus uses x402 for every billable action — a proxied request, a tunnel, an IP lease, a WebSocket session — so there is nothing to sign up for and no API key to rotate.

How do I expose a localhost server on a public HTTPS URL?

Run consensus tunnel http localhost:3000. The CLI opens an HTTP tunnel through a vetted node and returns a public HTTPS URL that forwards straight to your local port. It covers the same ground as an ngrok or Cloudflare tunnel, without an account, and every request through the tunnel is visible in the terminal in real time.

What is the difference between the forward proxy and the reverse proxy?

The forward proxy handles traffic leaving your application: wrap fetch() with ProxyClient and outbound calls route through the network, deduplicated and cached. The reverse proxy handles traffic arriving at a service you run, sitting in front of it and forwarding requests in. Both run at the application level in your own JavaScript or TypeScript process, so HTTPS is never decrypted.

How do I get a static IP address for API whitelisting?

Run consensus ip list to see verified nodes with their regions and health scores, then lease one. Traffic is pinned to that node's static IPv4 address, so you whitelist the IP once with an upstream provider and every tunnel, proxy request, and WebSocket from your app arrives from the same address.

How are WebSocket sessions metered and paid for?

A client prepays a bounded session with a single x402 payment, specifying minutes, megabytes, or both. The protocol meters the persistent WebSocket connection as it runs and closes it cleanly once the budget is spent. Nothing is billed after the fact and no balance is held on your behalf.

Do I need an account or an API key?

No. There is no signup, no dashboard, and no key to rotate. Configuration lives in local profiles on your machine and authorization is the x402 payment attached to each request. Payment settles on Ethereum, Solana, or the Internet Computer through the Consensus facilitator.

Who runs the nodes, and can I run one?

Anyone with a qualifying machine can run a node, and admission is permissionless but not automatic. Before it can register, a node passes an encrypted admission test: it must hold steady throughput under sustained load on a full CPU core, stay responsive, and have enough memory. Once admitted, a node keeps an encrypted tunnel open to the network, and only connected, healthy nodes receive traffic.

Built for speed · shipped via the CLI

One command. You're on the network.

$ npm i -g @canister-software/consensus-cli

100% free while in beta

Looking to host infrastructure? Join the network as a node operator →