Transparent proxy deployments¶
Transparent deployments divert traffic without configuring each application. Smithproxy supports routed traffic and locally originated traffic, but the network design must preserve enough information to reach the original destination and return packets correctly.
Protect remote access
A bad routing or netfilter rule can disconnect the host. Test in a network namespace or lab first and keep an out-of-band recovery path on remote systems.
TPROXY¶
TPROXY is the preferred transparent mode for routed traffic and general UDP because it preserves the original destination and supports transparent socket behavior.
Typical flow:
client → router/netfilter TPROXY → Smithproxy listener → origin
Requirements include policy routing, packet marks, appropriate local routes and rules that exempt Smithproxy's own upstream traffic. The supplied sx_network tooling uses /etc/smithproxy/smithproxy.startup.cfg to generate the host-specific setup.
Use settings.accept_tproxy to disable the corresponding listener family when it is not needed.
REDIRECT¶
REDIRECT is convenient for locally originated TCP traffic:
local application → OUTPUT REDIRECT → Smithproxy → origin
It is simpler but does not provide the same transparency guarantees as TPROXY. Generic UDP is especially sensitive; do not assume a TCP REDIRECT recipe works for arbitrary UDP protocols.
Use settings.accept_redirect to disable unused REDIRECT listeners.
Routed gateway¶
When Smithproxy runs on a gateway:
- enable IP forwarding and correct return routing;
- divert only intended client subnets and ports;
- exclude management, health-check and Smithproxy-originated traffic;
- verify both IPv4 and IPv6 paths independently;
- install the Smithproxy CA only on clients authorized for TLS inspection.
Local workstation¶
For a single workstation, start with SOCKS5 or HTTP CONNECT. Move to REDIRECT only if the target application cannot use an explicit proxy. Keep package managers, VPN control traffic and the Smithproxy process itself outside the diversion loop.
Docker workloads¶
Diverting bridge traffic depends on the host's bridge/netfilter configuration. Apply rules after the container network exists and confirm that return traffic crosses the same Smithproxy host. Running Smithproxy in a container usually requires host networking and host-applied diversion rules; see Docker.
Validate a deployment¶
diag workers proxy list
diag proxy session list active
diag proxy session list ips
show event list
Test DNS, plain TCP, TLS, IPv4 and IPv6 separately. A successful HTTPS request does not prove UDP, STARTTLS or routed return paths are correct.