Request stuck at ReadAll
firstrow opened this issue · comments
firstrow commented
For some reason code got freeze on method
func readAll(conn net.Conn) (resp []byte, err error)
I tested my proxy, and also bunch of others - same result.
Here is my code:
package main
import (
"h12.me/socks"
"log"
)
func main() {
server := "x.x.x.x:9999"
proxyServer := "x.x.x.x:8888" // TinyProxy, Socks5
f := socks.DialSocksProxy(socks.SOCKS5, proxyServer)
conn, err := f("tcp", server)
if err != nil {
log.Println("err", err)
}
conn.Write([]byte("Hello")) # This line is never reached
defer conn.Close()
}
Any ideas? Thanks.
firstrow commented
Also tested socks4 - it just works fine.
Hǎi-Liàng "Hal" Wáng commented
I have tested the code of SOCK5 again using the example in README.md, and it just works as I have expected. Just make sure you have a SOCK5 proxy with anonymous authentication.
firstrow commented
Thanks for the answer. socks uses "Allow x.x.x.x". and have no idea why at your machine it worked.
firstrow commented
Ok, looks like this is my and a bunch of others tinyproxy issue. connectiong to TOR network worked well.