Skip to content

moddengine/edge-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Production-Grade Architecture Overview

edge-stack is a lightweight edge gateway architecture that combines:

  • Caddy for TLS termination and reverse proxying
  • CrowdSec for IP reputation blocking
  • Coraza (OWASP CRS) for WAF protections
  • A Go auth/quota agent backed by SQLite

Instead of embedding large static code/config dumps here, this README now points to the source files directly.


Architecture

Traffic flow:

  1. Request reaches caddy
  2. CrowdSec bouncer applies threat-intel based decisions
  3. Coraza WAF evaluates requests against CRS rules
  4. forward_auth calls the Go agent (/v1/tenant-check)
  5. Agent returns X-Backend-Target when access is allowed
  6. Caddy proxies to the target Unix socket backend

Key Files


Data Model (SQLite)

The agent uses three primary tables:

  • http: host config + quota state + rolling counters
  • http_now: current aggregation window
  • http_history: hour-based long-term history

See schema creation/migration logic in agent/main.go.


Test Coverage

Run from agent/

go test ./... 
go test -tags=e2e ./... 

Notes

  • Keep production config in source files, not duplicated docs.
  • Update links above if files are renamed or moved.

About

Https Frontend with WAF, Quota management, and dynamic backend configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors