Webhook over WebSocket

Securely forward Webhooks to local environments behind NAT or firewalls.
Receive events securely using your own server and WebSocket connections, without relying on external services like ngrok.

$ go install github.com/nonchan7720/webhook-over-websocket@latest
Get Started
Copied to clipboard!

Why Webhook over WebSocket?

Testing webhooks from services like GitHub or Stripe locally usually requires a public IP. Webhook over WebSocket utilizes a persistent WebSocket connection between a server and client to route HTTP requests seamlessly through NAT.

Bypass NAT

No public IP required for your local machine. Because the client initiates the WebSocket connection to the server, it easily traverses firewalls and NAT.

Self-Hosted

Don't rely on third-party tunneling services. Deploy the server component on your own affordable VPS to keep your traffic completely under your control.

Clustering & HA

Integrates Memberlist gossip protocol and Traefik HTTP Provider, seamlessly supporting High Availability in multi-replica environments.

Architecture Explorer

Click on the components below to explore the traffic flow.

External Service
Webhook Source
HTTP POST
Server
/webhook/{id}
WebSocket
Client
Local Machine
HTTP POST
Local App
localhost:3000

How it works

Webhook over WebSocket creates a secure tunnel between the client and server. HTTP requests received by the server are instantly forwarded to the client via WebSocket.

Click a component on the diagram to learn more

Setup Guide

Start routing in three simple steps.

terminal

Live Forwarding Monitor

Mock Data Visualization

Last 60s Now
Real-time

Seamless Data Flow

Leverage WebSockets to eliminate polling latency. The moment a webhook is fired, the event is streamed to your local environment with near-zero overhead.

  • Low Latency

    Persistent connection means instant delivery.

  • Secure Tunnel

    No need to expose local ports to the internet.

Deployment & Usage

Flexible deployment options available.

Deployment with Docker

Use the official Docker image to quickly spin up the server. The repository also includes a docker-compose.yml for local development.

# Pull the image
docker pull ghcr.io/nonchan7720/webhook-over-websocket:latest

# Run the server with Docker
docker run --rm -p 8080:8080 \
  ghcr.io/nonchan7720/webhook-over-websocket:latest \
  server --port 8080