Skip to content

Architecture ​

EdgeTrust sits between official CDN / edge IP publications and Laravel's TrustProxies configuration.

Layers ​

  1. Providers — fetch and parse official IP list endpoints (ProxyProvider / AbstractProvider).
  2. Validation — reject invalid, empty, or dangerous ranges (IpRangeValidator).
  3. Archives — bundled JSON (+ checksums) shipped with the package (ArchiveManager).
  4. Repositories — resolve ranges for bundled, runtime, or hybrid modes.
  5. ProxyManager — facade target that merges providers, custom ranges, excludes, and cache.
  6. Laravel integration — EdgeTrust::proxies(), optional TrustProxies middleware, Artisan commands, scheduled sync.

Request path vs sync path ​

text
HTTP request  → TrustProxies → ProxyManager::proxies()
                              → cache / last-known-good / bundled archives
                              ✗ never hits remote provider HTTP APIs

edge-trust:sync → providers fetch → validate → cache / archives

Keeping fetches off the request hot path is a hard design rule.

Modes ​

See Modes. Hybrid is the recommended default: try runtime freshness, fall back safely.

Automation ​

GitHub Actions workflow .github/workflows/update-proxies.yml refreshes bundled archives daily, runs tests, bumps a patch version, and releases only when ranges change and validation passes.

Released under the MIT License.