Port Forwarding Manager
PhanTerm provides a built-in port forwarding manager, helping you securely pierce through internal networks to access restricted services via SSH tunnels, without leaving the TUI to memorize complex ssh -L command line parameters.
Supported Forwarding Modes
Section titled “Supported Forwarding Modes”- Local Forward: Maps a port on your local computer to an address in the remote internal network. For example, mapping local
8080to a remote database at127.0.0.1:3306. - Remote Forward: Maps a port on the remote server to an address on your local area network. For example, allowing the remote server to access an API service in your local development environment.
- Dynamic Forward (SOCKS5): Opens a local SOCKS5 proxy port. All traffic directed to this proxy is forwarded through the remote server. This is highly suitable for cross-domain network testing.
Managing Port Forwarding
Section titled “Managing Port Forwarding”When you are in Terminal Mode or Normal Mode, press F to summon the port forwarding panel in the center of the screen.
- Add a New Rule: Press
awhile in the panel.- Use
Ctrl+Tto toggle the tunnel type quickly (Local/Remote/Dynamic). - Press
Tabto jump between input boxes and fill in the corresponding port numbers. - Press
Enterto submit, and the tunnel will be established in the background immediately.
- Use
- Delete a Rule: Select a rule you no longer need from the list and press
dto delete it and instantly free up the port.
Automatic Persistence & Restoration
Section titled “Automatic Persistence & Restoration”All configured port forwarding rules are automatically persisted in your local configuration (connections.yaml), bound to the current host definition.
The next time you reconnect to this server, PhanTerm will silently and automatically restore all previously saved forwarding tunnels in the background, truly achieving a “configure once, worry-free forever” experience.