Marketplace

Tunnels

Other4 providers

Expose a local app to a public URL — dev sharing & webhook testing.

togo-framework
bash
togo install togo-framework/tunnel

Install

bash
togo install togo-framework/tunnel

togo's public-tunnel subsystem: a single Tunnel contract over very different exposers — Cloudflare Tunnel (cloudflared), ngrok, Tailscale Funnel and frp — that publish a local togo app to the public internet for dev sharing, webhook testing and demos. The safe dev default log driver records intent without opening anything. Real drivers ship as plugins that call tunnel.RegisterDriver; pick one with TUNNEL_DRIVER.

It pairs with the togo deploy and dns subsystems: deploy ships the app, dns/tunnel make it reachable.

bash
togo install togo-framework/tunnel             # the base
togo install togo-framework/tunnel-cloudflare  # a driver

Drivers: tunnel-cloudflare, tunnel-ngrok, tunnel-tailscale, tunnel-frp.

Configure

env
TUNNEL_DRIVER=cloudflare   # or ngrok | tailscale | frp | log (default)
# + the selected driver's env (e.g. NGROK_AUTHTOKEN)

Use

go
svc, _ := tunnel.FromKernel(k)
url, err := svc.Start(ctx, "8080")   // → https://something.trycloudflare.com
defer svc.Stop(ctx)

Start accepts a bare port ("8080"), ":8080", or host:port. A driver that doesn't support an operation returns tunnel.ErrUnsupported.

Write a driver

go
func init() {
    tunnel.RegisterDriver("mytunnel", func(k *togo.Kernel) (tunnel.Tunnel, error) {
        return &myTunnel{ /* env */ }, nil
    })
}

Implement Start/Stop/Status. See tunnel-ngrok for a pure-Go example and tunnel-cloudflare for a binary-wrapping one.


<div align="center"> <h3>Premium sponsors</h3> <p> <a href="https://id8media.com"><strong>ID8 Media</strong></a> &nbsp;·&nbsp; <a href="https://one-studio.co"><strong>One Studio</strong></a> </p> <p><sub>Support togo — <a href="https://github.com/sponsors/fadymondy">become a sponsor</a>.</sub></p> </div>