4.18.2. Proxy behaviour

SOCKS is a network protocol for routing packets using a proxy server between the clients and the servers. SOCKS performs at Layer 5 of the OSI model. SOCKS is typically used to proxy other, Layer 7 protocols, most often HTTP.

Example 4.34. SOCKS and HTTP traffic

The following configuration example embeds an HTTP proxy into a Socks proxy and can be used to inspect HTTP traffic that uses a SOCKS proxy to access the servers. Client authentication is disabled.

class MySocksProxy(SocksProxy):
    def config(self):
        SocksProxy.config(self)
        self.enable_socks_v4 = TRUE;
        self.require_auth_v5 = FALSE

    def requestStack(self, ip, port):
        return MyHttpProxy