tsnet-proxy

command
v1.104.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

The tsnet-proxy command exposes a local port on the tailnet under a chosen hostname. By default it proxies raw TCP; pass --http to reverse proxy as HTTP, or --https to reverse proxy as HTTPS with an auto-issued Tailscale cert. Both HTTP modes inject Tailscale-User-* identity headers from WhoIs.

Arguments are <name> <local> [tailnet]: local is the port on localhost to proxy to and tailnet is the port to expose on the tailnet. If tailnet is omitted, it defaults to 443 for --https, 80 for --http, and the local port otherwise.

go run ./cmd/tsnet-proxy myapp 8080           # raw TCP, tailnet :8080
go run ./cmd/tsnet-proxy myapp 22 2222        # raw TCP, tailnet :2222
go run ./cmd/tsnet-proxy --http myapp 8080    # tailnet :80
go run ./cmd/tsnet-proxy --https myapp 8080   # tailnet :443

Or run directly from the module, no checkout required:

go run tailscale.com/cmd/tsnet-proxy@latest myapp 8080

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL