Closed
Description
Similar to #17759, it would be useful for ssh.Client
to provide a DialContext
method next to its Dial
method. We use SSH tunnels for connecting to domain registries that use IP allowlists.
Note: per some confusion in the comments below, this does not refer to the top-level Dial
func that opens an SSH connection. This proposal specifically refers to adding a (*ssh.Client).DialContext
method that opens a TCP/IP tunnel, (returning a net.Conn
), useful for proxying connections across an SSH connection.
An implementation can be found here: CL 504735
Original context from 2017:
We’ve been progressively consolidating our timeout and deadline code to use context.Context
throughout, implementing workarounds for dialers in APIs that lack Context
support.