Feat/rpc caddy ratelimit hardening#105
Merged
Merged
Conversation
Set up the public RPC origin to run behind the Cloudflare proxy with defense-in-depth, and document the full flow. - Caddy.Dockerfile: build Caddy with the caddy-ratelimit plugin - docker-compose.rpc.yml: build the custom Caddy image; cap the node with mem_limit/cpus (RPC_MEM_LIMIT default 6g, RPC_CPUS default 1.5, sized for a 2 vCPU / 8 GB VPS) so a query flood can't starve the host - Caddyfile: terminate TLS with a Cloudflare Origin Certificate (Let's Encrypt disabled — incompatible with the CF proxy) and rate-limit per client IP (100 req / 10s, keyed on CF-Connecting-IP) - .env.rpc.example: document RPC_MEM_LIMIT / RPC_CPUS; correct the RPC_DOMAIN note for the origin-cert + proxied setup - scripts/sync-cloudflare-ufw.sh: idempotent, fail-closed cron script to keep the ufw 80/443 allow-list in sync with Cloudflare's edge ranges (v4 + v6) - rpc-node.md: rewrite for the Cloudflare model — Cloudflare-only firewall, origin certificate (with rationale vs Let's Encrypt), custom Caddy build, rate limit, and the IP-sync cron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.