NetBurner 3.5.8
PDF Version
SOCKS5 Client

Example Path: examples/Socks

This program demonstrates how to create a client connection using the SOCKS5 protocol. This protocol is detailed in RFC 1928. The NetBurner libraries support no authorization and plain text username/password options, and provide a callback for the user to implement their own version of GSSAPI, AuthWithGssApi(). This function can be overridden to implement GSSAPI according to specific requirements.

The example first performs an HTTP GET directly, then configures a SOCKS5 proxy and repeats the same GET through the proxy, so you can compare the results (the reported source IP changes).

Before building, edit the proxyServerIp value in src/main.cpp to point at your SOCKS5 server. If your proxy requires username/password authentication, change the auth type to eSocksAuthTypeUnPw and set the username and password (note: per RFC 1929 these are sent in clear text).

To test this, you can use a Docker image that will run a SOCKS5 server, found here: https://hub.docker.com/r/serjs/go-socks5-proxy/