Worker Creation API

POST /createWorker

Creates a new Cloudflare worker with optional proxy settings.

Authentication:

You must provide ONE of the following authentication methods:

Request Body:

Important Notes:

Request Example (API Token - Recommended):


POST /createWorker HTTP/1.1
Host: cfworkerback.pages.dev
Content-Type: application/json

{
  "apiToken": "your-cloudflare-api-token",
  "workerName": "example-worker",
  "uuid": "12345678-1234-5678-1234-567812345678",
  "nodeName": "Example Node",
  "proxyIp": "cdn.example.com:443",
  "customDomain": "your-custom-domain.com",
  "socks5Relay": false,
  "socks5Proxy": "",
  "workerScriptUrl": "https://cdn.jsdelivr.net/gh/6Kmfi6HP/EDtunnel@refs/heads/main/_worker.js"
}

Request Example (Global API Key - Legacy):


POST /createWorker HTTP/1.1
Host: cfworkerback.pages.dev
Content-Type: application/json

{
  "email": "your-email@example.com",
  "globalAPIKey": "your-global-api-key",
  "workerName": "example-worker",
  "uuid": "12345678-1234-5678-1234-567812345678",
  "nodeName": "Example Node",
  "proxyIp": "cdn.example.com:443",
  "customDomain": "your-custom-domain.com",
  "socks5Relay": false,
  "socks5Proxy": "",
  "workerScriptUrl": "https://cdn.jsdelivr.net/gh/6Kmfi6HP/EDtunnel@refs/heads/main/_worker.js"
}

cURL Example (API Token):


curl -X POST https://cfworkerback.pages.dev/createWorker \
  -H "Content-Type: application/json" \
  -d '{
    "apiToken": "your-cloudflare-api-token",
    "workerName": "example-worker",
    "uuid": "12345678-1234-5678-1234-567812345678",
    "nodeName": "Example Node",
    "proxyIp": "cdn.example.com:443",
    "customDomain": "your-custom-domain.com",
    "socks5Relay": false,
    "socks5Proxy": "",
    "workerScriptUrl": "https://cdn.jsdelivr.net/gh/6Kmfi6HP/EDtunnel@refs/heads/main/_worker.js"
  }'

cURL Example (Global API Key):


curl -X POST https://cfworkerback.pages.dev/createWorker \
  -H "Content-Type: application/json" \
  -d '{
    "email": "your-email@example.com",
    "globalAPIKey": "your-global-api-key",
    "workerName": "example-worker",
    "uuid": "12345678-1234-5678-1234-567812345678",
    "nodeName": "Example Node",
    "proxyIp": "cdn.example.com:443",
    "customDomain": "your-custom-domain.com",
    "socks5Relay": false,
    "socks5Proxy": "",
    "workerScriptUrl": "https://cdn.jsdelivr.net/gh/6Kmfi6HP/EDtunnel@refs/heads/main/_worker.js"
  }'

Response:

Response Example:


HTTP/1.1 200 OK
Content-Type: application/json

{
  "url": "https://your-custom-domain.com/12345678-1234-5678-1234-567812345678",
  "node": "vless://12345678-1234-5678-1234-567812345678@www.visa.com.sg:8880?encryption=none&security=none&type=ws&host=your-custom-domain.com&path=%2F%3Fed%3D2560#Example%20Node"
}

Errors:

Returns a 500 status code with an error message if the worker creation fails.

Error Example:


HTTP/1.1 500 Internal Server Error
Content-Type: application/json

{
  "error": "Internal Server Error"
}