SOCKS5 UDP implementation

This commit is contained in:
Toby
2020-04-24 19:47:56 -07:00
parent 6b5fc2862a
commit e02ede3076
6 changed files with 207 additions and 402 deletions

View File

@@ -96,7 +96,7 @@ func proxyServer(args []string) {
if !packet {
// TCP
log.Printf("%s (%s): [TCP] %s\n", addr.String(), username, reqAddr)
conn, err := net.Dial("tcp", reqAddr)
conn, err := net.DialTimeout("tcp", reqAddr, dialTimeout)
if err != nil {
log.Printf("TCP error %s: %s\n", reqAddr, err.Error())
return core.ConnFailed, err.Error(), nil