Home

Awesome

socks5

中文

Go Report Card GoDoc

🗣 News 🩸 Youtube

SOCKS Protocol Version 5 Library.

Full TCP/UDP and IPv4/IPv6 support. Goals: KISS, less is more, small API, code is like the original protocol.

❤️ A project by txthinking.com

Install

$ go get github.com/txthinking/socks5

Struct is like concept in protocol

Advanced API

This can satisfy the classic scenario, and it is still recommended that you choose the above small API to customize for special scenarios.

Server: support both TCP and UDP

Example:

server, _ := NewClassicServer(addr, ip, username, password, tcpTimeout, udpTimeout)
server.ListenAndServe(Handler)

Client: support both TCP and UDP and return net.Conn

Example:

client, _ := socks5.NewClient(server, username, password, tcpTimeout, udpTimeout)
conn, _ := client.Dial(network, addr)

Projects using this library

License

Licensed under The MIT License