Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Cloudflare Proxies Laravel Package

robertboes/laravel-cloudflare-proxies

Laravel package for handling Cloudflare proxy IPs so your app sees the real visitor IP. It helps configure trusted proxies and resolve client addresses correctly behind Cloudflare, keeping rate limiting, logging, and security checks accurate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a narrow, single-concern Laravel add-on that sits at the HTTP boundary: it participates in trusted-proxy / client-IP resolution and re-evaluates its proxy list at runtime rather than only at boot. That makes it a leaf dependency — no domain model, no persistence, no queue or event surface. Architecturally it is cheap to adopt and cheap to remove, which is the main reason it is worth evaluating at all at v0.1.x.

Integration feasibility. Adoption appears to be composer install plus a publishable config, with behaviour gated behind a refresh flag. There are no migrations and no data-model coupling. The compatibility claim in v0.1.1 — working "on every Symfony version" allowed by Laravel 12 — is the important part: it implies the package spans multiple Symfony minors whose IP-classification constants differ, and it has now normalised that difference itself instead of inheriting it.

Technical risk. Three risks dominate, in order:

  1. Maturity. v0.1.1 is a pre-1.0, second-release package. API, config keys, and semantics can change without notice; there is no demonstrated deprecation policy.
  2. Security-sensitive surface. Proxy trust is a high-blast-radius control. Too permissive a list allows X-Forwarded-For spoofing (client-IP-based rate limits, audit logs, IP allowlists, and sometimes session/geo logic all inherit the forged value). Too restrictive a list silently breaks legitimate traffic. Both failure directions are quiet, not loud.
  3. The bug being fixed was a version-dependent security gap. Prior to v0.1.1, the package relied on Symfony's IpUtils::PRIVATE_SUBNETS, which does not include 100.64.0.0/10 (carrier-grade NAT) or the documentation ranges on the Symfony versions Laravel 12 permits. On those versions, CGNAT addresses would have been treated as publicly routable and therefore acceptable as trusted proxies — an over-permissive default that only manifests on some dependency combinations. That is a correctness and security fix, not a feature.

Key questions.

  • What is the actual Symfony version constraint, and is there a CI matrix covering the lowest and highest allowed minors? A cross-version fix is only credible with a cross-version test.
  • Is the rejection list (private, CGNAT, documentation, loopback, link-local, IPv6 equivalents) configurable or hard-coded? Hard-coded is safer but may be wrong for some topologies.
  • Does refresh re-resolve on every request, on a schedule, or on cache miss? This drives both latency and the staleness failure mode.
  • Who maintains the package, what is the security disclosure path, and is there a tagged support window?
  • Does it fail open or closed when refresh fails — does it keep the last good list or fall back to config?

Confidence is low: this assessment is derived from a single release note and the package's observable surface, not from source review.

Integration Approach

Stack fit. Targets Laravel 12 and the Symfony 7.x line Laravel 12 allows. Because the pre-fix behaviour varied by Symfony minor, the package's own compatibility statement is the thing to verify, not assume — "works on every Symfony version" is a claim a TPM should ask to see proven in CI before it is relied on.

Migration path. There is no incumbent to migrate from. The practical path is: add as a direct dependency with an explicit version pin, keep refresh disabled by default in config/, and enable it per-environment. Treat the pin as temporary scaffolding to be revisited once a 1.0 lands or the maintainer's release cadence is observable.

Compatibility. Two compatibility checks matter more than the composer solver:

  • Dependency matrix. Run the test suite (and a smoke test) against the lowest and highest Symfony minors the constraint admits. The v0.1.1 fix exists precisely because these diverge.
  • Address-space assumptions. Confirm no environment legitimately terminates proxying inside 100.64.0.0/10. This is not hypothetical: some cloud NAT gateways, container overlay networks, and ISP-side NAT present client or hop addresses in CGNAT space. If a real hop sits there, v0.1.1 will reject it and the fix becomes a regression for that deployment.

Also flag the documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 2001:db8::/32). Rejecting them is correct in production, but any internal fixtures, seeds, or staging harnesses built on TEST-NET addresses will change behaviour after upgrade.

Sequencing.

  1. Pin the package and record the resolved Symfony version in each environment.
  2. Add regression tests asserting that 100.64.0.0/10, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are rejected as trusted proxies, plus that genuine RFC1918 hops are still accepted.
  3. Inventory production proxy hops and confirm none fall in CGNAT or documentation space.
  4. Enable refresh in staging and observe resolved client IPs for a full traffic cycle, including at least one proxy rotation.
  5. Canary in production with refresh on for a subset, watching for shifts in client-IP distribution.
  6. Roll forward only after the client-IP histogram is stable.

Operational Impact

Maintenance. Expect churn. A package at 0.1.1 with a security-relevant fix in its second release has no track record of API stability; budget for reading every changelog and re-running the compatibility matrix on each bump. Assign an internal owner — this is not a "set and forget" dependency because its failure mode is silent.

Support. Likely a small or single-maintainer project. Assume community-only support, no SLA, and no guaranteed CVE turnaround. The mitigation is keeping the surface small (one config file, one flag) so the package can be replaced with a few dozen lines of in-house IP classification if it goes stale. That exit path should be written down, not assumed.

Scaling. Compute cost is negligible. The scaling question is refresh frequency: if the list re-resolves per request, it adds latency and, worse, introduces a per-request dependency on whatever upstream the refresh consults. Prefer resolve-on-cache-miss with a bounded TTL. The trusted-proxy list is also per-node state, so in a horizontally scaled fleet different nodes can briefly disagree during a rotation — worth knowing before debugging an inconsistent-IP incident.

Failure modes.

  • Over-rejection (new in v0.1.1). A legitimate hop in CGNAT or documentation space is dropped. Symptoms: client IPs collapse to the proxy address, rate limits throttle everyone together, IP allowlists fail closed, geo logic misfires, redirect loops appear behind TLS terminators. Silent — no exception, just wrong data downstream.
  • Under-rejection (pre-v0.1.1). On affected Symfony versions, CGNAT addresses are accepted as trusted proxies, enabling X-Forwarded-For spoofing. This is the reason to upgrade rather than defer.
  • Refresh failure. Depending on fail-open/fail-closed behaviour, either a stale list persists (drift after a proxy rotation) or the list empties (traffic-wide breakage). Confirm which, and alert on refresh errors.
  • Test-environment surprise. Fixtures using TEST-NET addresses start failing after upgrade; this is expected but will look like a regression to whoever hits it first.

Ramp-up. Low for a Laravel developer to install; moderate to operate correctly. The package itself is simple — the difficulty is that trusted-proxy semantics are widely misunderstood, and this package's whole value proposition is getting a subtle part of them right. Budget half a day for the installing engineer plus a short runbook covering: which addresses are trusted and why, how to verify the resolved client IP, what the refresh cadence is, and how to disable refresh under pressure. The v0.1.1 upgrade is worth taking specifically because it closes a version-dependent over-permissiveness — but only after confirming no real hop lives in the address ranges it now rejects.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource