[go] Simple dialer(socks) always return EOF


(ext) #1
func dialSocks(socks string) (Dial proxy.Dialer, err error) {
    Dial, err = proxy.SOCKS5("tcp", socks, nil, proxy.Direct)
    return
}
func checkError(err error) {
if err != nil {
	fmt.Fprintf(os.Stderr, "Fatal error: %s", err.Error())
	os.Exit(1)
}
}
func main(){

    dialSocksProxy, err := dialSocks("202.79.50.167:44926")
    checkError(err)

    dialer, err := dialSocksProxy.Dial("tcp", "smtp.gmail.com:587")
    checkError(err)
}

get this error in any addr…

Fatal error: socks connect tcp 202.79.50.167:44926->smtp.gmail.com:587: EOF