tunnel

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 14 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

View Source
var TunnelCmd = &cobra.Command{
	Use:   "tunnel [flags] SERVER [-- COMMAND...]",
	Short: "Create a TCP tunnel (optionally run a command)",
	Long: `
	Create a TCP tunnel that forwards local TCP traffic to a remote server port.
	Use -l/--local and -r/--remote to configure local and remote ports.
	If '-- COMMAND [ARGS...]' is provided, Alpacon runs the local command
	in the same session with the tunnel lifecycle attached.

	Use '--' before the local command so Alpacon parses tunnel flags and forwards
	the rest to the local program exactly as provided.

	Use --work-session to attach this tunnel to a specific work-session. This
	overrides the workspace's active work-session set via 'alpacon work-session use'.

	Requires an active WorkSession when using Browser login (Auth0); Token auth (API token or Service token) bypasses this requirement.
	`,
	Example: `
	# Forward local 9000 to remote 8082
	alpacon tunnel my-server -l 9000 -r 8082

	# Same using long flags
	alpacon tunnel my-server --local 9000 --remote 8082

	# Forward local 2222 to remote SSH port 22
	alpacon tunnel my-server -l 2222 -r 22

	# Specify username and groupname for the tunnel
	alpacon tunnel my-server -l 9000 -r 8082 -u admin -g developers

	# Attach the tunnel to a work-session
	alpacon tunnel my-server -l 9000 -r 8082 --work-session 11111111-2222-3333-4444-555555555555

	# Run psql with attached tunnel session
	alpacon tunnel prod-db -l 5432 -r 5432 -- psql -h 127.0.0.1 -p 5432 -U app appdb

	# Run kubectl with attached tunnel session
	alpacon tunnel prod-k8s -l 6443 -r 6443 -- kubectl --server=https://127.0.0.1:6443 get pods
	`,
	Args: validateTunnelArgs,
	Run:  runTunnel,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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