mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 22:42:48 +03:00
6b93ee19e7
This commit expands the set of data that we track for each client to include the SSH_AUTH_SOCK. This defaults to the value of that env var on the machine where the ClientId is constructed, which may be remote from the mux server. For the proxy scenario, a remote SSH_AUTH_SOCK path is not addressable, and what we really want is the local SSH_AUTH_SOCK path from that SSH session, so we introduce awareness of whether the current session is a proxy session. Proxy sessions register the mux-local-proxy-id during the setup of the proxy, but we don't apply the identity to the mux. Instead, we wait for the remote client to send their identity and that is annotate to show that it has been routed via a proxy and, crucially, has the SSH_AUTH_SOCK replaced with the mux-local-proxy-id SSH_AUTH_SOCK. ``` ; wezterm cli list-clients USER HOST PID CONNECTED IDLE WORKSPACE FOCUS SSH_AUTH_SOCK wez foo 336500 86.944834352s 944.834352ms default 3 /home/wez/.1password/agent.sock wez foo (via proxy pid 337457) 337314 1.944834352s 944.834352ms 4 /tmp/ssh-XXXXTfGSp7/agent.337456 ``` For the SSH_AUTH_SOCK to be populated, ssh agent forwarding also needs to be enabled for SSH exec() calls; previously it was enabled only for pty channels. Since this commit changes the ABI of the mux protocol, the codec version has been bumped. |
||
---|---|---|
.. | ||
sftp | ||
auth.rs | ||
channelwrap.rs | ||
config.rs | ||
dirwrap.rs | ||
filewrap.rs | ||
host.rs | ||
lib.rs | ||
pty.rs | ||
session.rs | ||
sessioninner.rs | ||
sessionwrap.rs | ||
sftpwrap.rs |