This document describes the API endpoints provided by FoxCloud.
All endpoints are relative to your deployed Worker URL:
https://your-worker.your-subdomain.workers.dev
Returns the main landing page with system status information.
Response:
- Content-Type: text/html
- Status: 200 OK
- Body: HTML page with status information and links
Returns the subscription configuration page for VLESS clients.
Response:
- Content-Type: text/html
- Status: 200 OK
- Body: HTML page with subscription configuration and copy functionality
Returns VLESS configuration for a specific UUID.
Path Parameters:
- uuid: A valid UUID configured in environment variables
Response:
- Content-Type: text/plain
- Status: 200 OK
- Body: VLESS configuration URL
Example:
GET /08dad8a6-8a6c-4424-9d63-62f3a9bf7f4f
Response:
vless://08dad8a6-8a6c-4424-9d63-62f3a9bf7f4f@your-domain.workers.dev:443?encryption=none&security=tls&sni=your-domain.workers.dev&fp=chrome&type=ws&host=your-domain.workers.dev&path=/ws
Upgrades HTTP connection to WebSocket for proxy traffic.
Query Parameters:
- encoding: Data encoding method (optional)
- host: Target host (optional)
Headers:
- Upgrade: websocket
- Connection: Upgrade
Response:
- Status: 101 Switching Protocols
- Upgrade: websocket
- Connection: Upgrade
WebSocket Communication:
- Client sends VLESS handshake
- Server establishes connection to proxy server
- Bidirectional data transfer
Returned when accessing an unknown endpoint.
Response:
- Content-Type: text/html
- Status: 404 Not Found
- Body: Error page
Returned when an unexpected error occurs.
Response:
- Content-Type: text/html
- Status: 500 Internal Server Error
- Body: Error page
Returned when request parameters are invalid.
Response:
- Content-Type: text/html
- Status: 400 Bad Request
- Body: Error page
FoxCloud inherits rate limiting from Cloudflare Workers:
- Free Tier: 100,000 requests per day
- Paid Tier: Up to 100 million requests per month
Exceeding these limits may result in:
- 429 Too Many Requests
- Temporary blocking
- Service degradation
- VLESS protocol uses UUID-based authentication
- Each UUID provides access to proxy services
- UUIDs should be kept secret and rotated regularly
- All connections use TLS 1.3 encryption
- WebSocket traffic is encrypted end-to-end
- No plaintext data is transmitted
- Access is controlled through environment variables
- Only configured UUIDs can access the service
- No user management interface is exposed
FoxCloud does not implement CORS headers as it's primarily designed for proxy traffic rather than web API usage.
- Main landing page
- Subscription configuration page
- Error pages
- VLESS configuration URLs
- Error messages
- WebSocket traffic (proxied data)
- Client connects to
/wsendpoint with Upgrade header - Server validates request and upgrades to WebSocket
- Client sends VLESS handshake
- Server connects to configured proxy server
- Bidirectional data transfer begins
- VLESS protocol specification compliant
- Binary data transfer
- No additional framing or encoding
- Connections are maintained as long as data flows
- Idle connections may be closed by Cloudflare
- Error conditions result in connection termination
Environment variables are not directly accessible via HTTP endpoints for security reasons. They are only available within the Worker runtime.
Currently, there is no dedicated health check endpoint. The main page (/) can be used as a basic health check.
Version information is displayed on the main page and in the subscription page footer.
The API endpoints are fixed and cannot be customized without modifying the source code. The following aspects can be customized through environment variables:
- UUIDs for authentication
- Proxy server addresses
- Worker name and configuration
Clients integrate by:
- Obtaining VLESS configuration from
/subor/{uuid}endpoint - Connecting to WebSocket endpoint
/ws - Sending VLESS handshake
- Transferring data through the proxy
Monitoring can be implemented by:
- Making periodic requests to
/endpoint - Checking response status codes
- Parsing response content for status information
As FoxCloud evolves, endpoints may be added or modified. Breaking changes will be documented in the changelog and version releases.
For debugging API issues:
- Check Cloudflare Worker logs
- Verify environment variables are set correctly
- Test endpoints with curl or browser
- Monitor response headers and status codes
curl https://your-worker.your-subdomain.workers.dev/subcurl https://your-worker.your-subdomain.workers.dev/08dad8a6-8a6c-4424-9d63-62f3a9bf7f4fWebSocket connections require a proper VLESS client implementation and cannot be easily tested with command-line tools.
This API documentation provides a complete reference for integrating with and using FoxCloud.