diff --git a/README.md b/README.md index b8f9f92..9cd1563 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,23 @@ The package still needs the following: * Support for the BIND command * Support for the ASSOCIATE command + +Example +======= + +Below is a simple example of usage + +```go +// Create a SOCKS5 server +conf := &socks5.Config{} +server, err := socks5.New(conf) +if err != nil { + panic(err) +} + +// Create SOCKS5 proxy on localhost port 8000 +if err := server.ListenAndServe("tcp", "127.0.0.1:8000"); err != nil { + panic(err) +} +``` +