Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var proxyVersion = socks.SOCKS5
- if config.ProxyVersion == 4 {
- proxyVersion = socks.SOCKS4
- }
- var socksProxy = socks.DialSocksProxy(proxyVersion, "someproxie.com:1080")
- gate, err = socksProxy("", "somehost.example.com:8000")
- if err != nil {
- return
- }
- defer gate.Close()
- var hsBuf = new(bytes.Buffer)
- binary.Write(hsBuf, binary.LittleEndian, 200)
- binary.Write(hsBuf, binary.LittleEndian, 500)
- _, err = gate.Write(hsBuf.Bytes())
- if err != nil {
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement