Localhost to the edge.
Secure, fast, and frictionless edge tunnels. Powered by Cloudflare Workers.
hostc is a modern, lightweight, and zero-configuration tool to instantly expose your local HTTP and WebSocket services to the public internet. Built entirely on top of Cloudflare Workers and Durable Objects for global low-latency edge networking.
ws:// -> wss://) out of the box.You don't even need to install anything if you have Node.js. Just run:
npx hostc 3000
Or, install it globally for frequent use:
npm install -g hostc hostc 3000
Public URL: You'll instantly get a URL like
https://t-a1b2c3d4.hostc.devthat routes traffic directly to yourhttp://127.0.0.1:3000.
This project is a Monorepo managed by pnpm.
| Package / App | Description |
|---|---|
apps/cli | The Node.js command-line interface tool. |
apps/workers | The Cloudflare Worker and Durable Object handling the tunnel connections. |
packages/tunnel-protocol | Shared protocol and WebSocket message types. |
pnpm v8+Install dependencies
pnpm install
Run the Cloudflare Worker locally
pnpm dev:workers
Run the CLI locally against your local worker
cd apps/cli
pnpm dev
# Or using the environment variable with the built CLI:
HOSTC_SERVER_URL=http://127.0.0.1:8787 hostc 3000
Apache License 2.0. Made with ❤️ by akazwz.