> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# fly sprites proxy

Forward TCP ports on localhost to ports in a sprite, for as long as the
command runs. This works with any TCP protocol, such as databases or dev
servers. For always-on HTTP access, use the sprite's URL instead: see
'fly sprites url'.

Each argument is a port, forwarded to the same port in the sprite, or
\<local>:\<remote> to use different ports.

\--stdio connects stdin and stdout to a single port in the sprite. --ssh serves
an SSH session with the sprite over stdin and stdout, for use as an OpenSSH
ProxyCommand:

Host my-sprite
ProxyCommand fly sprites proxy --ssh -s my-sprite

## Usage

```
fly sprites proxy [flags] <port|local:remote>...
```

## Examples

```
  fly sprites proxy 8080
  fly sprites proxy 3001:3000 8081:8080
  fly sprites proxy -W :22
  fly sprites proxy --ssh -s my-sprite
```

## Options

```
  -h, --help            help for proxy
  -o, --org string      The target Fly.io organization
  -s, --sprite string   The target sprite. Defaults to the one set with 'fly sprites use'
      --ssh             Serve an SSH session with the sprite over stdio, for use as an ssh ProxyCommand
  -W, --stdio string    Forward stdin and stdout to [host]:port in the sprite
```

## Global Options

```
  -t, --access-token string   Fly.io API token to use, overriding FLY_ACCESS_TOKEN, FLY_API_TOKEN and the saved login
      --debug                 Print additional logs and traces
      --verbose               Verbose output
```

## See Also

* [fly sprites](https://docs.fly.io/flyctl/cmd/fly_sprites)	 - Manage Sprites: persistent Linux environments for development and agents
