Inspired by go-socks5,This package provides full functionality of socks5 protocol.
The protocol described here is designed to provide a framework for client-server applications in both the TCP and UDP domains to conveniently and securely use the services of a network firewall.
The package has the following features:
- "No Auth" mode
- User/Password authentication mode
- Support for the CONNECT command
- Support for the BIND command(require the client to accept connections from the server,like FTP etc.)
- Support for the UDP ASSOCIATE command
- Unit tests
Get the latest version on Release
you may need to add run permission first
chmod +x socks5g-linux-amd64
Port only(No Auth)
./socks5g-linux-amd64 1080
Port and Username/Password
./socks5g-linux-amd64 1080 admin 123
go get github.com/realzhangliu/socks5-go
package main
import (
"github.com/realzhangliu/socks5-go"
"log"
)
func main() {
//var config socks5.Config
//Implement yourself Config , default is provided.
S5Server := socks5.NewSocks5Server(nil)
log.Println(S5Server.Listen())
}