// proxySSH returns true iff both c.proxy and // the proxy-ssh environment configuration // are true. func (c *SSHCommon) proxySSH() (bool, error) { if !c.proxy { return false, nil } if _, err := c.ensureAPIClient(); err != nil { return false, err } var cfg *config.Config attrs, err := c.apiClient.EnvironmentGet() if err == nil { cfg, err = config.New(config.NoDefaults, attrs) } if err != nil { return false, err } logger.Debugf("proxy-ssh is %v", cfg.ProxySSH()) return cfg.ProxySSH(), nil }