Architecture

Modern Smithproxy runs the proxy, policy, CLI and HTTP services inside the main smithproxy process. Historical components such as smithdog, smithd, the SOAP backend and the built-in captive-portal identity stack have been removed.

clients / routed traffic
          │
          ├── TPROXY / REDIRECT listeners
          ├── SOCKS4/5 listener
          └── HTTP CONNECT listener
                       │
                session workers
                       │
            policy + profile selection
                       │
         ┌─────────────┼─────────────┐
         │             │             │
      TLS/DNS       HTTP engines   routing
      detection     fingerprints   upstream
         │             │             │
         └──── capture / events ─────┘
                       │
                PCAPNG / GRE / API

Listener families

  • TPROXY preserves the original destination and, where routing permits, the source address.
  • REDIRECT is convenient for local interception but provides weaker UDP transparency.
  • SOCKS4/5 accepts explicit application proxy requests, including SOCKS5 hostnames.
  • HTTP CONNECT accepts HTTP/1 tunnel requests and passes them through the normal policy path.
  • QUIC is a separate experimental multi-flow path for UDP/443.

Listener worker counts can be automatic or explicitly tuned. Avoid sizing by thread count alone; validate file-descriptor, memory and TLS-handshake behavior under representative traffic.

Policies and profiles

Ordered policies match connection properties and select an action plus reusable profiles. Profiles separate concerns:

  • TLS interception and validation;
  • DNS and application inspection;
  • content capture, fingerprinting and webhook processing;
  • detection signatures;
  • routing, DNAT and load balancing.

The first matching policy determines the effective behavior. Use diag proxy policy list and detailed session output when debugging a mismatch.

Session workers

Traffic is distributed across worker threads. Session-list requests take a coordinated snapshot from workers rather than reading shared state unsafely. The CLI reports timeouts if a worker does not contribute within the snapshot deadline.

Management surfaces

  • libcli2 provides the interactive Telnet-compatible CLI.
  • The HTTPS API exposes supported diagnostics and configuration operations.
  • Webhooks export connection events or request synchronous policy/content decisions.

Bind management services to trusted interfaces and protect them independently from the intercepted data plane.

Capture path

Matched content profiles create traffic logs. Local capture writes per-session or rotating aggregate files; remote capture sends GRE-encapsulated output. Current development also supports PCAPNG option serialization and an SPQ1 envelope for native multi-flow/QUIC records.