CLI and controllers
Infrastructure-managed tunnels
Run tunnels from the CLI, or reconcile YAML, Docker labels, and Kubernetes resources with run and watch controllers.
rstream SDKs
Create published endpoints, dial private services, and own the connection lifecycle from Go, JavaScript, Python, Java, or C++. Every client uses the same project, identity, and zero-trust policy model.
Integration surfaces
Add rstream at the layer your stack already owns, from infrastructure and application code to automation and agent workflows. Every path uses the same project and identity model.
Works with the frameworks your applications already use
Keep tunnel lifecycle with your infrastructure tooling or with the application process that owns the workload.
CLI and controllers
Infrastructure-managed tunnels
Run tunnels from the CLI, or reconcile YAML, Docker labels, and Kubernetes resources with run and watch controllers.
Client SDKs
Application-owned tunnel lifecycle
Create, serve, dial, and close tunnels from the process that already owns the workload.
Use standard APIs and live watch streams, or give agents scoped access through MCP and Agent Skills.
APIs and watch streams
Control-plane automation and live state
Use the Control plane API for managed projects and the Engine API for project-scoped inventory, events, and operations.
MCP and Agent Skills
Scoped workflows for AI agents
Agents discover rstream, request scoped permissions, and operate managed or local workflows through product-native tools.
Explore implementation details for tunnel controllers, APIs, and agent workflows.
Language runtimes
rstream provides open-source clients for Go, JavaScript, Python, Java, and C++. Each follows its ecosystem's native server and concurrency model and is designed with performance and security as first-class concerns.
Runtime
Best fit
Source
Full protocol runtime, services, and devices
Node.js products, managed APIs, and browser tooling
Async services, workers, and inference workloads
JVM services and framework-managed applications
Native services, gateways, and embedded software
Code samples
Inspect complete, runnable projects with source, manifests, dependencies, and build files. Each example resolves the project, opens a published HTTP tunnel, serves through its native runtime, and shuts down cleanly with the process.
package main
import (
"context"
"errors"
"fmt"
"log"
"net"
"net/http"
"os"
"os/signal"
"syscall"
"time"
"github.com/rstreamlabs/rstream-go"
"github.com/rstreamlabs/rstream-go/config"
)
func main() {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
client, err := config.NewClientFromEnv()
if err != nil {
log.Fatal(err)
}
ctrl, err := client.Connect(ctx, nil)
if err != nil {
log.Fatal(err)
}
defer ctrl.Close()
tunnel, err := ctrl.CreateTunnel(ctx, rstream.TunnelProperties{
Protocol: rstream.ProtocolPtr(rstream.ProtocolHTTP),
HTTPVersion: rstream.HTTPVersionPtr(rstream.HTTP1_1),
Publish: rstream.BoolPtr(true),
})
if err != nil {
log.Fatal(err)
}
defer tunnel.Close()
addr, _ := tunnel.ForwardingAddress()
fmt.Printf("Server accessible at: %s\n", addr)
hostname, err := os.Hostname()
if err != nil {
hostname = "unknown"
}
listener, ok := tunnel.(net.Listener)
if !ok {
log.Fatal("tunnel does not implement net.Listener")
}
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprint(w, hostname)
})
server := &http.Server{Handler: handler}
errCh := make(chan error, 1)
go func() {
errCh <- server.Serve(listener)
}()
select {
case <-ctx.Done():
shutdownCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
if err := server.Shutdown(shutdownCtx); err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatal(err)
}
case err := <-errCh:
if err != nil && !errors.Is(err, http.ErrServerClosed) && !errors.Is(err, net.ErrClosed) {
log.Fatal(err)
}
}
}
Capability coverage
All five SDKs cover published bytestream tunnels, private dialing, and mTLS identity. Native server integrations and advanced runtime or platform surfaces vary by ecosystem and remain explicit below.
The Go SDK is the reference runtime. Other SDKs prioritize the workflows native to their ecosystems; their documentation defines the current API boundaries.
Production systems
Explore working architectures that combine SDK code with identity, discovery, routing, TURN, and operational state across local, cloud, and device environments.
Connect an agent application to OpenAI-compatible workers across laptops, workstations, and GPU servers with scoped access and application-owned routing.
JavaScript · API · private tunnel
Split capture and inference across remote devices and Python workers with service discovery, private dialing, and live failover.
Python · private tunnel · discovery
A Next.js control plane provisions identity and TURN credentials, tracks live sessions, and supports adaptive real-time video streaming from Go producers in private environments.
JavaScript · Go · WebRTC
CLI installation · View all methods
/bin/sh -i -c "$(curl -fsSL https://rstream.io/scripts/install.sh)"