Metadata-Version: 2.4
Name: portforwarder
Version: 1.0.0
Summary: TUI for managing SSH port forwarding
Project-URL: Homepage, https://github.com/gauraputu/portforwarder
Project-URL: Repository, https://github.com/gauraputu/portforwarder
Project-URL: Issues, https://github.com/gauraputu/portforwarder/issues
Author-email: gaura <gauraputu@gmail.com>
License: MIT
Keywords: cli,port-forwarding,ssh,textual,tui,tunnel
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: textual>=0.80.0
Description-Content-Type: text/markdown

# portforwarder

TUI for managing SSH port forwarding tunnels, built with [Textual](https://textual.textualize.io/).

## Install

```bash
uv tool install .
```

## Dev Run (no install)


```bash
uv run python -m portforwarder
```
## Usage

```bash
portforwarder
```

## Keybindings

| Key              | Action                          |
|------------------|---------------------------------|
| `Space` / `Enter` | Toggle selected tunnel on/off  |
| `a`              | Add new tunnel                  |
| `e`              | Edit selected tunnel            |
| `d`              | Delete selected tunnel          |
| `q`              | Quit                            |

## Configuration

All tunnels are saved to `~/.port-forward/config.json`. Each entry has:

- **Name** — display label
- **Local Port** — port on your machine
- **Remote Host** — SSH destination (`user@host`)
- **Target Host** — host to reach from the remote side
- **Remote Port** — port on the target host

The SSH command run is:

```
ssh -N -L <local_port>:<target_host>:<remote_port> <remote_host>
```

## Port Collision

Turning on a tunnel with the same local port as an active one will auto-stop the old tunnel and start the new one. All tunnels are stopped when the TUI closes.
