mShell mShelldocs
← 返回首页← Home

端口转发 · 隧道Port Forwarding & Tunnels

把远端服务安全地映射到本地,或反向打通。

三种类型

类型说明典型场景
-L 本地本地端口经 SSH 转到目标本地访问内网数据库
-R 远程远端端口经 SSH 回到本地 / 内网把本地服务暴露给服务器
-D 动态本地 SOCKS5 代理整机流量经跳板出网

新建隧道

  1. 进入「隧道」面板,点新建。可内联新建主机,无需先去建主机。
  2. 填监听地址 / 端口与目标地址 / 端口。
  3. 开启「自动启动」后,连接该主机时会自动建立隧道。
独立隧道断线会自动重连;入口角标实时显示当前活动隧道数。

Map remote services safely to local — or punch through in reverse.

Three kinds

TypeWhat it doesTypical use
-L LocalLocal port forwarded over SSH to a targetReach an internal DB locally
-R RemoteRemote port forwarded back to local / LANExpose a local service to the server
-D DynamicLocal SOCKS5 proxyRoute traffic out via a jump host

Create a tunnel

  1. Open the “Tunnels” panel and tap New. You can create a host inline — no need to set one up first.
  2. Enter the listen address / port and the destination address / port.
  3. Enable “Auto-start” to bring the tunnel up automatically when you connect to that host.
Standalone tunnels auto-reconnect on drop; a badge shows the live active-tunnel count.