This document explains the directory structure and organization of the FoxCloud project.
.
├── .github/ # GitHub-specific files
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ └── workflows/ # GitHub Actions workflows
├── dist/ # Built output (generated)
├── docs/ # Documentation files
├── scripts/ # Utility scripts
├── src/ # Source code
└── tests/ # Test files
src/constants/
Contains constant definitions used throughout the application.
protocol.ts
- VLESS protocol constants and definitionssrc/core/
Core application logic and main entry points.
handler.ts
- Main request handler for HTTP and WebSocket requestsindex.ts
- Core module exportstypes.ts
- TypeScript type definitionssrc/network/
Network-related functionality and protocols.
dns.ts
- DNS resolution utilitiestcp.ts
- TCP connection utilitieswebsocket.ts
- WebSocket handling for proxy connectionssrc/pages/
HTML page templates and UI components.
index.ts
- Main page templates (landing page, error page, subscription page)src/protocols/
Protocol-specific implementations (currently empty but reserved for future expansion).
index.ts
- Protocol module exportssrc/services/
Business logic and service layer components.
subscription.ts
- Subscription configuration generationsrc/test/
Test files for verifying application functionality.
architecture.test.js
- Architecture verification testssrc/utils/
Utility functions and helper modules.
array.ts
- Array manipulation utilitiesarray.js
- JavaScript version for testinghelpers.ts
- General helper functionspackage.json
- Node.js package configurationpackage-lock.json
- Dependency lock filetsconfig.json
- TypeScript configurationeslint.config.mjs
- ESLint configurationrolldown.config.js
- Build configurationwrangler.toml
- Cloudflare Workers configurationwrangler.example.toml
- Example configuration template.github/ISSUE_TEMPLATE/
- GitHub issue templates.github/PULL_REQUEST_TEMPLATE.md
- Pull request template.github/workflows/
- GitHub Actions workflowsREADME.md
- Main project documentationCONTRIBUTING.md
- Contribution guidelinesLICENSE
- License informationCHANGELOG.md
- Version historyCODE_OF_CONDUCT.md
- Community guidelinesSECURITY.md
- Security policydocs/
- Detailed documentation filesdocs/
- Documentation files
scripts/
- Utility scripts
generate-uuid.js
- UUID generation utilitydist/
- Built output (generated during build process)
worker.js
- Built Cloudflare Worker.gitignore
- Git ignore patterns.wrangler/
- Wrangler development cache (gitignored)The project is organized into modules by functionality:
This structure allows for easy navigation, maintenance, and extension of the FoxCloud project.