HomeDocsArchitecture

Architecture

FOXWAF performs listening, TLS termination, site matching, security inspection and upstream forwarding in a single process — chained as an 8-layer pipeline, lock-free and zero-copy throughout, sustaining 5,000 QPS per core.

Request Pipeline

Each HTTP request flows through the stages below in order; once any stage triggers a block, the request returns immediately to avoid wasted computation.

  1. 01 · RoutingFast-Path Check

    Health checks and static-asset fast pass-through skip the full pipeline, hitting and returning directly to save CPU.

  2. 02 · RoutingSite Matching

    Match the site configuration precisely via Host header and SNI; when multiple sites share a port, pick the certificate by SNI.

  3. 03 · SecurityIP / Geo ACL

    IP / CIDR allow- and deny-lists, GeoLite2 region access control, configurable per site.

  4. 04 · SecurityCC / Rate Limiting

    256-shard lock-free counters with a sliding window; exceeding the threshold triggers a JS Challenge that lets legitimate clients through.

  5. 05 · SecurityUser-Agent Check

    User-Agent blacklist matching; allow specific crawlers (Googlebot / Bingbot, etc.) on demand.

  6. 06 · SecurityBot / Anti-Crawler

    Behavioral analysis, TLS fingerprinting and DevTools anti-debug to identify automation tools across multiple dimensions.

  7. 07 · CoreWAF Rule Matching

    5 position-specific Tries + a single AC-automaton scan; matches are confirmed by a second regex pass. The full rule set runs in milliseconds.

  8. 08 · ForwardReverse Proxy

    Round-robin / weighted / consistent-hash load balancing; HTTP/1.1, HTTP/2, HTTP/3, WebSocket pass-through; optional static caching.

Why It's Fast

Hot Reload

Configuration, rule sets and TLS certificates all support hot reload with zero traffic interruption: