You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
513 B
Markdown

9 years ago
socks-go
=======
A socks server implemented by golang, support socks4/4a, socks5.
9 years ago
Only support connect command now.
9 years ago
usage
====
Usage example:
import socks "github.com/fangdingjun/socks-go"
9 years ago
func main(){
9 years ago
l, _ := net.Listen("tcp", ":1080")
for {
conn, _ := l.Accept()
s := socks.SocksConn{ClientConn: conn, Dial: nil} // Dial is a function which dial to the upstream server
go s.Serve() // serve the socks request
9 years ago
}
}