VPN: skip connecting when the host is reachable directly (TCP check of the SSH/RDP port, option per VPN, on by default); optionally disconnect a VPN started by MrTerm when the last session using it is closed by the user (terminal, SFTP, RDP, port forward, admin tabs; 3 s grace for reconnect/duplicate); README

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-21 22:20:57 +02:00
1 parent c853d13191
commit ac7be8e6af
5 files changed
+87 -26

No files matched your search

+6
View File
@@ -207,6 +207,12 @@ Under **VPN** in the sidebar you can add WireGuard (`.conf`) and OpenVPN (`.ovpn
When you open an assigned host (terminal, SFTP, RDP or port forwarding), MrTerm connects the VPN first if it isn't already connected. You can also connect and disconnect manually. By default, MrTerm disconnects the VPNs it started when you close it.
Each VPN has these options:
- **Only connect if the host is not reachable directly** (on by default): before connecting the VPN, MrTerm briefly tries to reach the host's SSH or RDP port. If the host answers, for example because you are in the same network, the VPN is skipped.
- **Disconnect when the last connection using it is closed**: when you close the last tab, SFTP window or port forward that uses the VPN, MrTerm disconnects it. This only applies to VPNs that MrTerm connected itself. VPNs you connected yourself stay connected.
- **Disconnect when MrTerm closes** (on by default).
- **Linux**: uses NetworkManager, so no root password is needed. For OpenVPN, install the plugin with `sudo pacman -S networkmanager-openvpn`.
- **Windows**: WireGuard requires [WireGuard for Windows](https://www.wireguard.com/install/) and asks for administrator permission when connecting. OpenVPN requires the [OpenVPN GUI](https://openvpn.net/community-downloads/).
- OpenVPN certificates and keys must be embedded in the `.ovpn` file.