Proxy routes
Set proxyRoute on the configuration to reach the SSH endpoint through a SOCKS5 proxy, an HTTP CONNECT proxy, or another SSH host (ProxyJump). Pick one route per configuration.
SOCKS5
configuration.proxyRoute = .socks5(SSHProxyEndpoint(
host: "proxy.example",
port: 1080,
username: "u",
password: "p"
))
HTTP CONNECT
configuration.proxyRoute = .httpConnect(SSHProxyEndpoint(
host: "proxy.example",
port: 8080
))
ProxyJump
Connect through another SSH host. The jump host has its own full set of credentials and host-key policy.
configuration.proxyRoute = .proxyJump(SSHJumpHost(
host: "bastion.example",
port: 22,
username: "deploy",
authentication: .agent(),
hostKeyPolicy: .knownHostsFile(
("~/.ssh/known_hosts" as NSString).expandingTildeInPath
)
))