feat: support jump hosts

This commit is contained in:
hstyi
2025-01-15 15:11:26 +08:00
committed by hstyi
parent 45ea822fd6
commit 1476368673
7 changed files with 247 additions and 4 deletions

View File

@@ -34,6 +34,15 @@ class EditHostOptionsPane(private val host: Host) : HostOptionsPane() {
terminalOption.heartbeatIntervalTextField.value = host.options.heartbeatInterval
tunnelingOption.tunnelings.addAll(host.tunnelings)
if (host.options.jumpHosts.isNotEmpty()) {
val hosts = HostManager.getInstance().hosts().associateBy { it.id }
for (id in host.options.jumpHosts) {
jumpHostsOption.jumpHosts.add(hosts[id] ?: continue)
}
}
jumpHostsOption.filter = { it.id != host.id }
}
override fun getHost(): Host {