(network string, address string, config *ssh.ClientConfig)
| 18 | } |
| 19 | |
| 20 | func (secureDialer) Dial(network string, address string, config *ssh.ClientConfig) (SecureClient, error) { |
| 21 | conn, err := proxy.FromEnvironment().Dial(network, address) |
| 22 | if err != nil { |
| 23 | return secureClient{}, err |
| 24 | } |
| 25 | |
| 26 | c, chans, reqs, err := ssh.NewClientConn(conn, address, config) |
| 27 | if err != nil { |
| 28 | return secureClient{}, err |
| 29 | } |
| 30 | client := ssh.NewClient(c, chans, reqs) |
| 31 | |
| 32 | return secureClient{client: client}, nil |
| 33 | } |