SOCKS and HTTP CONNECT¶
Explicit proxy modes let applications send traffic to Smithproxy without routing or netfilter diversion. The accepted connection still passes through the normal policy, DNS, TLS/STARTTLS and capture paths.
SOCKS4 and SOCKS5¶
SOCKS listeners are controlled by settings.accept_socks and settings.socks_workers. SOCKS5 hostname requests are resolved by Smithproxy, allowing policy and TLS logic to retain the requested name. Limited SOCKS5 UDP support is also available.
Test hostname resolution through the proxy with socks5h:
curl --proxy socks5h://127.0.0.1:1080 https://example.com/
HTTP CONNECT¶
Development builds provide an HTTP/1.0 and HTTP/1.1 CONNECT listener. Configure it in settings:
settings = {
accept_http_connect = TRUE;
http_connect_port = "3128";
http_connect_workers = 0;
};
Worker values follow the normal listener convention: 0 selects an automatic count and -1 disables workers.
Accepted authorities include:
- IPv4:
CONNECT 192.0.2.10:443 - IPv6:
CONNECT [2001:db8::10]:443 - hostname:
CONNECT example.com:443
The listener opens the upstream connection before returning 200 Connection Established. It returns 400 for malformed requests, 403 for policy rejection, 431 when headers reach the 8 KiB limit and 502 for resolution or upstream connection failure.
curl --proxy http://127.0.0.1:3128 https://example.com/
Client behavior
A client must wait for 200 Connection Established before sending tunneled application data. CONNECT request pipelining is not supported.
Policy and visibility¶
Explicit proxy sessions use the same policy table as transparent sessions. Inspect them with:
diag proxy session list active
diag proxy session list tls
Restrict explicit listeners to trusted interfaces. They are not intended to be public, unauthenticated open proxies.