From 3018f210e2d635437439a97ea443554d9c82e9c7 Mon Sep 17 00:00:00 2001 From: fangdingjun Date: Fri, 20 Jan 2017 10:28:30 +0800 Subject: [PATCH] add debug log for proxy --- obfssh_client/ssh.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/obfssh_client/ssh.go b/obfssh_client/ssh.go index 36b1a48..ca4e300 100644 --- a/obfssh_client/ssh.go +++ b/obfssh_client/ssh.go @@ -165,10 +165,16 @@ func main() { if cfg.Proxy.Scheme != "" && cfg.Proxy.Host != "" && cfg.Proxy.Port != 0 { switch cfg.Proxy.Scheme { case "http": + obfssh.Log(obfssh.DEBUG, "use http proxy %s:%d to connect to server", + cfg.Proxy.Host, cfg.Proxy.Port) c, err = dialHTTPProxy(host, cfg.Port, cfg.Proxy) case "https": + obfssh.Log(obfssh.DEBUG, "use https proxy %s:%d to connect to server", + cfg.Proxy.Host, cfg.Proxy.Port) c, err = dialHTTPSProxy(host, cfg.Port, cfg.Proxy) case "socks5": + obfssh.Log(obfssh.DEBUG, "use socks proxy %s:%d to connect to server", + cfg.Proxy.Host, cfg.Proxy.Port) c, err = dialSocks5Proxy(host, cfg.Port, cfg.Proxy) default: err = fmt.Errorf("unsupported scheme: %s", cfg.Proxy.Scheme)