socks protocol implements by golang, support socks4, socks4a and socks5
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.
Dingjun 8a138fb3db minor changes
add some comments
fix some wrong format
change the method of forward finish check
8 years ago
examples/server minor changes 8 years ago
.gitignore minor changes 8 years ago
LICENSE add license file 9 years ago
README.md minor changes 8 years ago
socks.go minor changes 8 years ago
socks4.go minor changes 8 years ago
socks5.go minor changes 8 years ago

README.md

socks-go

A socks server implemented by golang, support socks4/4a, socks5.

usage

Usage example:

import socks "github.com/fangdingjun/socks-go"

func main(){
    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
    }
}