1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +02:00

debugging

This commit is contained in:
Zack Scholl 2021-10-02 12:20:18 -07:00
parent ff4307c3c6
commit ce628ea604

View file

@ -40,11 +40,13 @@ func NewConnection(address string, timelimit ...time.Duration) (c *Comm, err err
socks5ProxyURL, urlParseError := url.Parse(Socks5Proxy)
if urlParseError != nil {
err = fmt.Errorf("Unable to parse socks proxy url: %s", urlParseError)
log.Debug(err)
return
}
dialer, err = proxy.FromURL(socks5ProxyURL, proxy.Direct)
if err != nil {
err = fmt.Errorf("proxy failed: %w", err)
log.Debug(err)
return
}
connection, err = dialer.Dial("tcp", address)
@ -53,6 +55,7 @@ func NewConnection(address string, timelimit ...time.Duration) (c *Comm, err err
}
if err != nil {
err = fmt.Errorf("comm.NewConnection failed: %w", err)
log.Debug(err)
return
}
c = New(connection)