How paicni/cfbox works
CFBox is a single-file Cloudflare Workers/Pages proxy subscription manager. The main workflow is: a user visits the configured path, authenticates with a UUID, configures settings in the panel, and receives a subscription tailored to enabled protocols and client type. The same Worker also provides preferred-IP management, network tests, and status reporting. The source is a 463 KB monolith; the graph separates documented responsibilities, but the excerpts do not reveal all internal call boundaries, so subsystem links follow README-documented behavior.
Main entry points: CFBox明文版.js Worker request handler
Components 17
Request handling
- Worker request handler
CFBox明文版.js - UUID and path auth
CFBox明文版.js - Configuration KV
CFBox明文版.js
Subscription generation
- Subscription output
CFBox明文版.js - VLESS Trojan xhttp
CFBox明文版.js - Preferred sources
CFBox明文版.js - Client formatting
CFBox明文版.js
Panel and management
- Configuration panel
CFBox明文版.js - Preferred IP API
CFBox明文版.js - System and ECH status
CFBox明文版.js - Network tests
CFBox明文版.js
Network integrations
- Cloudflare runtime
- Preferred IP sources
- IP region services
- Google speed test
- Media and AI services
Other components
- User
Connections 19
- User → Worker request handler: sends request
README.md - Worker request handler → UUID and path auth: checks access
README.md - UUID and path auth → Configuration panel: admits user
README.md - UUID and path auth → Subscription output: admits request
README.md - Configuration panel → Configuration KV: reads and saves
README.md - Worker request handler → Configuration KV: loads configuration
README.md - Worker request handler → Subscription output: serves subscription
README.md - Subscription output → VLESS Trojan xhttp: generates protocols
README.md - Subscription output → Preferred sources: merges sources
README.md - Subscription output → Client formatting: formats by client
README.md - Worker request handler → Preferred IP API: routes API
README.md - Preferred IP API → Configuration KV: manages preferred IPs
README.md - Configuration panel → System and ECH status: checks status
CFBox明文版.js - Configuration panel → Network tests: starts tests
README.md - Preferred sources → Preferred IP sources: fetches sources
README.md - Worker request handler → Cloudflare runtime: runs on
README.md - System and ECH status → IP region services: detects region
README.md - Network tests → Google speed test: measures speed
README.md - Network tests → Media and AI services: checks access
README.md