Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Buzzheavier Cloudflare Worker: Direct Downloader & Link Resolver API

A high-performance, pure Cloudflare Worker (100% serverless, zero proxies, zero external dependencies) for Buzzheavier (buzzheavier.com), Bzzhr (bzzhr.co, bzzhr.to), and FuckingFast (fuckingfast.co).

Extracts direct CDN download URLs, probes complete file metadata (Content-Length, Content-Disposition, Content-Type), supports instant 302 download redirection, HTTP Range streaming proxying, and background hit management.


⚡ Features

  • Pure Edge Cloudflare Worker: 100% native execution — no proxies, no python servers, no credentials required.
  • Direct CDN Resolution: Automatically triggers the HTMX download flow (/download?t=...) to retrieve direct high-speed CDN URLs (https://ts.buzzheavier.com/d/{id}?v=...).
  • Exact File Metadata Probing: Performs non-destructive HEAD and Range bytes=0-0 probes to capture exact byte sizes and original filenames.
  • Domain Rotation & Consensus: Rotates across mirror domains (buzzheavier.com, bzzhr.co, fuckingfast.co, bzzhr.to) with consensus detection for dead (404) and inactive (603) files.
  • Direct 302 Redirection: Instantly redirects browsers, curl, IDM, and wget directly to CDN download links.
  • Chunked Stream Proxying: Streams downloads directly through the worker with full HTTP Range request support (206 Partial Content).
  • Hit Manager: Ping individual files or execute bulk hits (/bulk) to keep hosted files active.
  • In-Isolate Memory Cache: Caches resolved links for 5 minutes with automatic invalidation and no_cache=true bypass.

🚀 Quick Start

1. Local Development

npx wrangler dev

2. Run Test Suite

node test_worker_suite.js

3. Deploy to Cloudflare

npx wrangler deploy

🌐 API Endpoints & Usage

1. Direct Download Link Resolution (JSON API)

Resolves direct download URL and full file metadata.

Request:

GET /dl?url=https://buzzheavier.com/448rbx6wan6d
GET /dl/448rbx6wan6d

Response (200 OK):

{
  "is_alive": true,
  "file_id": "448rbx6wan6d",
  "status": "active",
  "name": "2798330-GameDrive.Org.rar",
  "size": 500701551,
  "size_formatted": "477.51 MB",
  "content_type": "application/vnd.rar",
  "download_url": "https://ts.buzzheavier.com/d/448rbx6wan6d?v=...",
  "domain": "buzzheavier.com",
  "attempt": 1
}

2. Direct 302 Download Redirection

Immediately redirects the client (browser, IDM, curl, wget) to the direct CDN file download.

Request:

GET /dl/448rbx6wan6d?redirect=true
GET /dl?url=https://buzzheavier.com/448rbx6wan6d&redirect=true

Response:

HTTP/1.1 302 Found
Location: https://ts.buzzheavier.com/d/448rbx6wan6d?v=...

3. File Check Mode (Metadata Only)

Checks whether the file is alive, extracts name and size, without exposing direct download links.

Request:

GET /file-check/448rbx6wan6d
GET /file-check?url=https://buzzheavier.com/448rbx6wan6d

Response (200 OK):

{
  "is_alive": true,
  "file_id": "448rbx6wan6d",
  "status": "active",
  "name": "2798330-GameDrive.Org.rar",
  "size": 500701551,
  "size_formatted": "477.51 MB",
  "has_download_button": true,
  "domain": "buzzheavier.com"
}

4. Single Hit Trigger

Pings the download trigger to register a hit and keep files active.

Request:

GET /hit/448rbx6wan6d
GET /hit?url=https://buzzheavier.com/448rbx6wan6d

Response (200 OK):

{
  "status": "HIT",
  "file_id": "448rbx6wan6d",
  "duration_s": 0.48,
  "attempt": 1
}

5. Bulk Hits

Executes multiple concurrent hits for a file ID.

Request:

GET /bulk?file_id=448rbx6wan6d&amount=5

Response (200 OK):

{
  "requested": 5,
  "hits": 5,
  "misses": 0,
  "results": [
    { "status": "HIT", "file_id": "448rbx6wan6d", "duration_s": 0.47, "attempt": 1 },
    { "status": "HIT", "file_id": "448rbx6wan6d", "duration_s": 0.52, "attempt": 2 },
    { "status": "HIT", "file_id": "448rbx6wan6d", "duration_s": 0.55, "attempt": 3 },
    { "status": "HIT", "file_id": "448rbx6wan6d", "duration_s": 0.58, "attempt": 4 },
    { "status": "HIT", "file_id": "448rbx6wan6d", "duration_s": 0.60, "attempt": 5 }
  ]
}

6. Streaming Proxy Mode

Streams the file through the worker directly, supporting HTTP Range requests.

Request:

GET /dl/448rbx6wan6d?proxy=true
Headers: Range: bytes=0-1048575

Response:

HTTP/1.1 206 Partial Content
Content-Range: bytes 0-1048575/500701551
Content-Disposition: attachment; filename="2798330-GameDrive.Org.rar"
Content-Type: application/vnd.rar

7. Health & Stats

  • GET /health - Service health and uptime.
  • GET /stats - Total requests, resolves, hits, and cache stats.

🛡️ Dead & Inactive File Handling

State HTTP Status Response Payload
Active File 200 OK Full metadata + download_url
Dead / Deleted File 404 Not Found { "is_alive": false, "status": "dead", "reason": "file_dead_http_404" }
Inactive File 502 Bad Gateway { "is_alive": false, "status": "inactive", "reason": "inactive_603_trigger" }

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages