SOCKS Protocol Version 5 Library
$ go get github.com/txthinking/socks5
package main
import "./socks5"
func main() {
socks5.Debug = true
s, err := socks5.NewClassicServer("127.0.0.1:1080", "127.0.0.1", "", "", 0, 0, 0, 60)
if err != nil {
panic(err)
}
if err := s.Run(nil); err != nil {
panic(err)
}
}
Test with curl: curl -x socks5://127.0.0.1:1080 http://httpbin.org/ip