README
Âś
đ HAD â Hyper Advanced Downloader
English | ŮاعسŰ
đ Table of Contents
- đ What's New in v3.6.0
- ⨠Features at a Glance
- đ¸ Screenshots
- đŚ Installation
- đ Quick Start
- đ Web UI (NEW)
- đĽď¸ CLI Usage â Detailed Examples
- Basic Downloads
- HLS / M3U8 Streaming
- Priority Queue System
- Bandwidth Scheduling
- Notifications
- Post-Processing
- Smart Mirror Selection
- Capture Proxy (MITM)
- Browser Extension
- Website Backup (Web Downloader)
- FTP / SFTP
- Web Scraping
- Parameterized URLs
- Cookie Support
- Proxy Support
- Metalink Downloads
- RPC & REST API
- Resume Downloads
- Integrity Checks
- Daemon Mode
- âď¸ Complete Command Line Reference
- Core Options
- HLS / Streaming Options
- Queue & Priority Options
- Bandwidth Scheduling Options
- Notification Options
- Post-Processing Options
- Mirror Options
- Capture Proxy Options
- Web UI Options
- Network Options
- Speed & Cache Options
- Integrity Check Options
- FTP/SFTP Options
- Website Downloader Options
- Metalink Options
- RPC Options
- Parameterized URL Options
- Scraping Options
- Daemon Options
- đ File Format Examples
- â Frequently Asked Questions (Q&A)
- đ Performance Tips
- đ§ Advanced Usage
- đ Security Note
- đ ď¸ Building from Source
- đ¤ Contributing
- đ Acknowledgments
đ What's New in v3.6.0
HAD v3.6.0 brings a complete Web UI, smarter capture proxy, better HLS support, priority queues, post-processing, notifications, and much more.
Key highlights:
| Feature | Description |
|---|---|
| đĽď¸ Brand new Web UI | Full graphical dashboard for managing downloads, stats, console, and settings (mobileâfriendly) |
| đ Web UI autoârefresh | Realâtime updates without manual reload |
| đĄ Live log streaming | See HAD logs directly in the browser via ServerâSent Events |
| đ§ Smarter capture proxy | Better confidence scoring, body scanning, hidden URL extraction |
| đş HLS/M3U8 streaming | Download live streams with FFmpeg or pureâGo fallback |
| đ Priority queue system | Order downloads by importance (higher number = higher priority) |
| â° Bandwidth scheduling | Set day/night speed limits or timeâbased download windows |
| đ˘ Multiâchannel notifications | Telegram, Discord, desktop alerts |
| đď¸ Postâprocessing | Autoâextract, rename, move files after download |
| đŞ Smart mirror selection | Automatically picks the fastest mirror via latency probing |
| đŞ Browser extension | Proxy manager + cookie editor for Chrome/Edge/Firefox |
| đ Certificate autoâinstall | Oneâclick CA certificate setup for HTTPS interception |
| đ§Š Deduplication | Smart duplicate URL detection and filtering |
| đŻ Perâfile thread optimization | Autoâadjust threads based on file size |
⨠Features at a Glance
Core Downloader
| Feature | Description |
|---|---|
| đ§ľ Multiâthreaded downloads | Maximize bandwidth utilization with adaptive buffering (32KB â 4MB) |
| đĄ Multiple protocols | HTTP, HTTPS, FTP, FTPS, SFTP with full authentication support |
| đ Resume support | Interrupt and resume downloads seamlessly with session files |
| đ¸ď¸ Proxy support | SOCKS4, SOCKS5, HTTP/HTTPS proxies with authentication |
| đ Batch downloading | Download from file lists with comments support |
| đˇď¸ Web scraping | Extract and download links from web pages with interactive selection |
| đ Extension filtering | Filter downloads by file extensions |
| ⥠Adaptive buffering | Automatically optimizes buffer sizes based on speed (32KBâ4MB) |
| đž Session saving | Save progress every 10 seconds and resume later |
| đ¨ Beautiful progress bars | Realâtime visual feedback with perâthread progress |
| đ Crossâplatform | Windows, Linux, macOS, ARM64 |
| đ Integrity checks | SHA256, SHA1, MD5 verification |
HLS / M3U8 Streaming
| Feature | Description |
|---|---|
| đş HLS streaming | Download M3U8 playlists and segments |
| đŹ FFmpeg integration | Uses FFmpeg if available for best performance |
| đ PureâGo fallback | Falls back to native Go implementation if FFmpeg is not found |
| đĄ Live & VOD | Supports both live streams and videoâonâdemand |
Queue & Scheduling
| Feature | Description |
|---|---|
| đ Priority queues | Download URLs with priorityâbased ordering (higher number = first) |
| â° Bandwidth scheduling | Set time windows for downloads (e.g., 00:00â06:00) |
| đ Automatic pausing | Downloads automatically pause outside the schedule window |
Notifications
| Feature | Description |
|---|---|
| đ˘ Telegram | Send completion/failure notifications via Telegram bot |
| đŹ Discord | Send notifications via Discord webhook |
| đť Desktop | Native desktop notifications (Linux, macOS, Windows) |
| đ Multiâchannel | Send to multiple channels simultaneously |
PostâProcessing
| Feature | Description |
|---|---|
| đď¸ Autoâextract | Extract archives (zip, tar, gz, rar, 7z, etc.) |
| đ Autoâmove | Move completed files to a specified directory |
| âď¸ Autoârename | Rename files using patterns with {name} and {time} placeholders |
| đ Chaining | Chain multiple postâprocessing actions |
Smart Mirror Selection
| Feature | Description |
|---|---|
| đŞ Autoâprobing | Automatically tests all mirrors for latency |
| ⥠Speed ranking | Ranks mirrors by download speed |
| đ Autoâswitch | Switches to the fastest mirror if the primary fails |
MITM Capture Proxy
| Feature | Description |
|---|---|
| đ HTTPS interception | Full ManâinâtheâMiddle proxy with autoâcertificate installation |
| đŻ Autoâdetection | Automatically detects videos, music, images, documents, archives |
| đ Hidden URL extraction | Scrapes HTML, JSON, and JavaScript for buried links |
| đ Confidence scoring | 0â100% confidence system with multiâfactor scoring |
| đ Multiâformat output | Saves captured links to both TXT and JSON |
| đ§ Custom extensions | Add your own file extensions to capture |
| đŻ Domain filtering | Focus on specific domains only |
| đ Size filtering | Min/max file size constraints |
| đ Autoâdownload | Option to automatically download captured files |
| đŞ Cookie support | Pass cookies through the proxy |
| đ Autoâcertificate | Automatic CA certificate installation (Windows, macOS, Linux) |
| đ§ Smart deduplication | 10âminute dedupe window with URL normalization |
Web UI (NEW in v3.6.0)
| Feature | Description |
|---|---|
| đ¨ Dark theme | Beautiful darkâmode dashboard |
| đ Download list | Realâtime download list with perâfile progress |
| đ Perâthread progress | Shows progress of each thread (when verbose mode is enabled) |
| ⥠Global stats | Speed, ETA, uptime, and overall progress |
| â Add URLs | Paste one or multiple URLs, set threads and speed limit |
| đˇď¸ Scrape | Enter a URL and autoâdownload all detected files |
| đž Sessions | View and resume saved sessions |
| đ History | See completed downloads with size, speed, duration |
| đĽď¸ Console | Live log streaming from HAD |
| đ Stats | Realâtime speed chart, total downloaded, ETA, uptime |
| đ ď¸ Tools | Metadata inspector, mirror tester, checksum verifier, bandwidth scheduler |
| âď¸ Settings | Configure speed limit, parallel downloads, threads, output dir, RPC address, auth token |
| đą Mobileâresponsive | Works on phones and tablets |
Website Downloader (Web Backup)
| Feature | Description |
|---|---|
| đ Full site mirroring | Crawl and backup entire websites |
| đ Single page backup | Save page with all dependencies |
| đŻ SPA support | Handle hashâbased routing (#!/ and #! paths) |
| đźď¸ Asset rewriting | Automatic URL rewriting for offline browsing |
| đ Concurrent crawling | Configurable page and asset workers |
| đž Resumable crawls | Save and resume interrupted backups |
| đ¨ CSS/JS processing | Rewrite URLs in stylesheets and scripts |
| đźď¸ Iframe support | Download iframe content recursively |
| ⥠Rate limiting | Perâdomain request throttling (configurable) |
| đď¸ Minification | Optional HTML minification for smaller output |
| đ Metaârefresh support | Follow metaârefresh redirects |
Metalink Support (RFC 5854)
| Feature | Description |
|---|---|
| đŚ Version 3 & 4 support | Full Metalink specification compliance |
| đ Mirror selection | Automatic priorityâbased mirror selection |
| â Integrity verification | Builtâin checksum validation |
| đ Piece information | File segmentation with hash verification |
RPC Interface
| Feature | Description |
|---|---|
| đ JSONâRPC API | Full remote control capabilities |
| đ REST endpoints | HTTP endpoints for status and control |
| đ Realâtime monitoring | Download progress and statistics |
| đŽ Dynamic control | Pause, resume, speed limiting via API |
| đ Task management | Add, remove, and monitor download tasks |
SFTP Support
| Feature | Description |
|---|---|
| đ SSH key authentication | RSA, ECDSA, Ed25519 support |
| đ Password authentication | With fallback to keys |
| đ Full resume capability | Interrupt and resume SFTP transfers |
| âąď¸ Configurable timeouts | Connection and operation timeouts |
đ¸ Screenshots
| Feature | Preview |
|---|---|
| Web UI â Dashboard | |
| Web UI â Mobile | |
| Web UI â Console | |
| Web UI â Tools | |
| MultiâThread Download | |
| Realâtime Progress | |
| Session Resume (JSON) | |
| MITM Capture Proxy | |
| JSON Export from Proxy | |
| Website Backup (Clone) | |
| Web Scraping | |
| HAD Browser Extension | |
| Mobile Version |
đŚ Installation
đŚ Direct Downloads
Get the latest version of HAD for your platform right away:
Using Go
go install github.com/batmanpriv/had@3.6.4
From Source
git clone https://github.com/batmanpriv/had.git
cd had
go build -o had .
Preâbuilt Binaries
Download the latest release from the Releases page for your platform.
đ Quick Start
1. Basic Download â Single File
had https://example.com/file.zip
What it does:
- Downloads
file.zipto the current directory - Uses the default number of threads (CPU cores)
- Shows a progress bar
2. Download with Custom Threads
had -t 16 https://example.com/large-file.zip
What it does:
- Uses 16 parallel threads for maximum speed
- Recommended for files larger than 1GB
3. Download Multiple Files
had https://example.com/file1.zip https://example.com/file2.zip
What it does:
- Downloads both files simultaneously (up to 2 concurrent by default)
- Shows combined progress
4. Download from a List
had -f urls.txt
What it does:
- Reads URLs from
urls.txt(one per line) - Supports comments starting with
#
5. Speed Limit (1 MB/s)
had -max-speed 1048576 https://example.com/file.zip
What it does:
- Caps download speed at 1 MB/s (1048576 bytes/sec)
- Useful for bandwidthâlimited connections
6. Resume an Interrupted Download
had session_20250622_143022.json
What it does:
- Resumes from the saved session file
- Automatically created when you press Ctrl+C
đ Web UI (NEW)
The Web UI gives you a full graphical interface to manage downloads, view stats, and control HAD from your browser.
Start the Web UI
had -web-ui
Or use the short form:
had webui
Then open your browser at:
đ http://localhost:8090
Web UI Configuration
| Environment Variable | Description | Default |
|---|---|---|
HAD_WEB_ADDR |
Web UI bind address | :8090 |
HAD_RPC_ADDR |
RPC endpoint | http://localhost:6800 |
HAD_TOKEN |
Optional bearer token for authentication | (none) |
Example with custom settings:
HAD_WEB_ADDR=:9000 HAD_TOKEN=secret123 had -web-ui
Web UI Features in Detail
Dashboard
- Download list â see all active downloads with file names, sizes, progress bars, and speed
- Perâthread progress â when verbose mode is enabled, shows progress for each thread
- Global stats â total speed, ETA, uptime, active downloads
- Overall progress â aggregate progress bar for all downloads
- Action buttons â pause all, resume all, remove all
Add URL
- URL input â paste one or multiple URLs (one per line)
- Threads â set threads per file (1â32)
- Speed limit â choose from presets or enter custom value
- Output directory â specify where to save files
- Clipboard paste â paste URLs directly from clipboard
- Quick presets â oneâclick example URLs for testing
Scrape
- URL input â enter a webpage URL
- Autoâdetection â finds and downloads all media files (videos, music, archives, etc.)
- Live log â shows scraping progress and detected links
Sessions
- View sessions â list all saved resume sessions
- Resume â continue interrupted downloads
- Delete â remove unwanted session files
History
- Completed downloads â list of finished downloads with size, speed, duration
- Clear â remove all history entries
Console
- Live log streaming â see HAD logs in realâtime
- Pause/Resume â stop or resume log streaming
- Clear â clear the console output
Stats
- Speed chart â realâtime speed history graph (last 60 seconds)
- Statistics â speed, total downloaded, completed files, active downloads, uptime, ETA
- Overall progress â aggregate progress bar
- Server info â version, speed limit, max parallel, threads, output dir, paused status
Tools
- Metadata Inspector â fetch file info, content type, size, checksum before downloading
- Mirror Speed Test â test multiple mirrors and rank them by speed and latency
- Checksum Verifier â compute and verify MD5, SHAâ1, SHAâ256 hashes
- Bandwidth Scheduler â set day/night speed limits
Settings
- RPC Address â HAD RPC server endpoint
- Auth Token â optional bearer token for authentication
- Auto Refresh â refresh interval (1s, 2s, 5s, off)
- Global Speed Limit â set perâsecond byte limit (0 = unlimited)
- Max Parallel Downloads â maximum simultaneous file downloads
- Threads per File â concurrent segments per download
- Output Directory â default save path
Web UI Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+K |
Focus the Add URL input |
Ctrl+R |
Refresh the dashboard |
đĽď¸ CLI Usage â Detailed Examples
Basic Downloads
Download a Single File
had https://example.com/file.zip
Explanation:
- Downloads
file.zipto the current directory - Uses the default number of threads (CPU cores)
- Shows a progress bar with speed and ETA
Download with Custom Threads
had -t 16 https://example.com/large-file.zip
Explanation:
- Uses 16 parallel threads for maximum speed
- Recommended for files larger than 1GB
- Each thread downloads a separate segment of the file
Download Multiple Files
had https://example.com/file1.zip https://example.com/file2.zip https://example.com/file3.zip
Explanation:
- Downloads all three files simultaneously
- Default concurrency is 2 (use
-uto change) - Shows combined progress for all downloads
Download from a File List
had -f urls.txt
Explanation:
- Reads URLs from
urls.txt(one per line) - Supports comments starting with
# - Example
urls.txt:# This is a comment https://example.com/file1.zip https://example.com/file2.zip ftp://ftp.example.com/large-file.iso
Download with Speed Limit
had -max-speed 1048576 https://example.com/file.zip
Explanation:
- Caps download speed at 1 MB/s (1048576 bytes/sec)
- Useful for bandwidthâlimited connections
- Prevents HAD from saturating your network
Download with Custom Output Directory
had -o ./downloads https://example.com/file.zip
Explanation:
- Saves the file to
./downloads/instead of the current directory - Creates the directory if it doesn't exist
Download with Verbose Output
had -v https://example.com/file.zip
Explanation:
- Shows detailed perâthread progress
- Displays which segments are being downloaded
- Useful for debugging slow downloads
HLS / M3U8 Streaming
Download HLS Stream (AutoâDetect FFmpeg)
had -hls https://example.com/stream.m3u8 -o ./videos
Explanation:
- Detects if FFmpeg is installed
- Uses FFmpeg for optimal performance if available
- Saves to
./videos/directory - Output format is MP4 (if FFmpeg) or TS (if pureâGo)
Force PureâGo HLS Downloader
had -hls https://example.com/playlist.m3u8 -t 8
Explanation:
- If FFmpeg is not found, falls back to pureâGo implementation
- Uses 8 threads for segment downloading
- Works on systems without FFmpeg
Download Live HLS Stream
had -hls "https://example.com/live/index.m3u8" -o ./recordings
Explanation:
- Downloads live streams as they become available
- Creates a TS file with all segments
- Use
-tto control segment download concurrency
HLS with Notifications
had -hls https://example.com/live.m3u8 -o ./videos \
-notify-telegram 123456789 -notify-telegram-bot "token" \
-post-move /completed
Explanation:
- Downloads HLS stream
- Sends Telegram notification on completion
- Moves the completed file to
/completed
Priority Queue System
Create a Queue File
Create queue.txt:
# Format: URL priority (higher = processed first)
https://example.com/urgent.zip 100
https://example.com/important.zip 75
https://example.com/normal.zip 50
https://example.com/low.zip 10
https://example.com/very-low.zip 1
# Comments are supported
Download from Queue
had -queue queue.txt
Explanation:
- Processes URLs in priority order (highest first)
- URL with priority 100 downloads before priority 50
- Priority values can be any integer (positive or negative)
- Higher priority numbers are processed first
Single Download with Priority
had -priority 100 https://example.com/urgent-file.zip
Explanation:
- Assigns priority 100 to this download
- Useful when combining with other downloads in the queue
- Higher priority = processed first
Queue with PostâProcessing
had -queue queue.txt -post-extract -post-move /processed
Explanation:
- Downloads all items from the queue in priority order
- Extracts archives automatically
- Moves completed files to
/processed
Bandwidth Scheduling
Download Only During Specific Hours
had -schedule-from 02:00 -schedule-to 06:00 https://example.com/large-file.zip
Explanation:
- Downloads only between 02:00 and 06:00
- Automatically pauses outside the schedule window
- Useful for overnight downloads
Combined with Speed Limit
had -schedule-from 23:00 -schedule-to 07:00 -max-speed 1048576 https://example.com/file.zip
Explanation:
- Downloads between 23:00 and 07:00
- Caps speed at 1 MB/s during the schedule
- Helps avoid impacting daytime bandwidth usage
Schedule with Multiple Downloads
had -schedule-from 00:00 -schedule-to 06:00 -f urls.txt
Explanation:
- Downloads all URLs from
urls.txtduring the schedule window - Automatically pauses if outside the window
- Resumes when the window opens again
Notifications
Telegram Notification
had -notify-telegram 123456789 -notify-telegram-bot "your_bot_token" https://example.com/file.zip
Explanation:
- Sends a notification to Telegram chat ID
123456789 - Uses the bot token for authentication
- Notifies on download completion or failure
Discord Webhook Notification
had -notify-discord "https://discord.com/api/webhooks/..." https://example.com/file.zip
Explanation:
- Sends a notification to Discord via webhook
- Creates an embed with file name and size
- Notifies on completion or failure
Desktop Notification
had -notify-desktop https://example.com/file.zip
Explanation:
- Shows a native desktop notification
- Works on Linux (
notify-send), macOS (osascript), and Windows (PowerShell) - Notifies on completion or failure
Multiple Notification Channels
had -notify-telegram 123456789 -notify-telegram-bot "token" \
-notify-discord "https://discord.com/api/webhooks/..." \
-notify-desktop https://example.com/file.zip
Explanation:
- Sends notifications to Telegram, Discord, and desktop simultaneously
- All channels receive the same notification
PostâProcessing
AutoâExtract Archives
had -post-extract https://example.com/archive.zip
Explanation:
- Automatically extracts the archive after download
- Supported formats:
.zip,.tar,.gz,.rar,.7z,.bz2,.xz - Extracts to a directory named after the archive
Move Files After Download
had -post-move /completed https://example.com/file.zip
Explanation:
- Moves the completed file to
/completed/ - Creates the directory if it doesn't exist
- Useful for organizing downloads
Rename Files After Download
had -post-rename "{name}_{time}.zip" https://example.com/file.zip
Explanation:
- Renames the file using placeholders:
{name}â original filename (without extension){time}â current Unix timestamp
- Example:
file.zipâfile_1719000000.zip
Chain Multiple PostâProcessing Actions
had -post-extract -post-move /processed -post-rename "dl_{time}" https://example.com/archive.zip
Explanation:
- Extracts the archive
- Moves the extracted files to
/processed/ - Renames the directory to
dl_1719000000
PostâProcessing with Queue
had -queue queue.txt -post-extract -post-move /media/completed
Explanation:
- Downloads all items from the queue in priority order
- Extracts archives
- Moves completed files to
/media/completed
Smart Mirror Selection
AutoâSelect Fastest Mirror
had -auto-mirror -mirrors "https://mirror1.com/file.zip,https://mirror2.com/file.zip" https://primary.com/file.zip
Explanation:
- Probes all mirrors for latency
- Selects the fastest mirror automatically
- Primary URL is used as a fallback
Mirrors with Multiple URLs
had -mirrors "https://us.example.com/file.zip,https://eu.example.com/file.zip,https://asia.example.com/file.zip" https://primary.com/file.zip
Explanation:
- Tests all three mirrors
- Uses the fastest one based on latency
- Automatically switches if a mirror fails
Mirror Selection with Fallback
had -auto-mirror -mirrors "https://mirror1.com/file.zip,https://mirror2.com/file.zip" -retries 10 https://primary.com/file.zip
Explanation:
- Probes mirrors and selects the fastest
- Retries up to 10 times if a segment fails
- Switches mirrors on failure
Capture Proxy (MITM)
Basic Capture Proxy
had -capture-proxy :8085 -capture-types video,music
Explanation:
- Starts a MITM proxy on port 8085
- Captures video and music files
- Saves captured links to
captured_links.txt
Capture with Custom Extensions
had -capture-proxy :9090 -capture-types video,archive -capture-exts .webm,.mka
Explanation:
- Starts proxy on port 9090
- Captures video and archives
- Also captures
.webmand.mkafiles
AutoâDownload Captured Files
had -capture-proxy :8085 -capture-auto -capture-output ./downloads
Explanation:
- Automatically downloads captured files
- Saves files to
./downloads/ - Uses smart threading based on file size
Domain Filtering
had -capture-proxy :8085 -filter-domain example.com -capture-confidence 50
Explanation:
- Only captures URLs from
example.com - Confidence threshold of 50%
- Ignores links with confidence below 50
Body Scanning (Find Hidden Links)
had -capture-proxy :8085 -capture-body -verbose
Explanation:
- Scans HTML, JSON, and JavaScript bodies for hidden URLs
- Finds links not visible in the page source
- May add some latency
Install Certificate Only
had -install-cert
Explanation:
- Installs the CA certificate for HTTPS interception
- Required for the capture proxy to work
- Runs without starting the proxy
Capture Proxy with Custom Headers
had -capture-proxy :8085 -capture-header "Authorization: Bearer token123" -capture-header "X-API-Key: abc123"
Explanation:
- Adds custom headers to all requests
- Useful for authenticated sites
- Multiple headers are supported
Capture with Size Filtering
had -capture-proxy :8085 -capture-min-size 1048576 -capture-max-size 1073741824
Explanation:
- Only captures files between 1 MB and 1 GB
- Ignores very small and very large files
- Helps avoid noise
Browser Extension
Installation
For Chrome / Brave / Edge (Chromiumâbased):
- Open your browser and navigate to
chrome://extensions - Enable "Developer mode" (toggle in topâright corner)
- Click "Load unpacked" button
- Navigate to HAD extension folder:
./extensions-had - Select the folder and click "Select Folder"
For Firefox:
- Open Firefox and navigate to
about:debugging - Click on "This Firefox" in left sidebar
- Click "Load Temporary Add-on" button
- Navigate to
./extensions-had/folder - Select the
manifest.jsonfile
Extension Features
Proxy Management Tab:
- Quick presets â oneâclick proxy presets (HAD:8085, HTTP:8080, SOCKS5:1080, TOR:9050)
- Manual config â set host, port, and protocol
- Test connection â check if the proxy is reachable
- Activate/Deactivate â enable or disable the proxy
- Status display â shows uptime and active status
Cookie Management Tab:
- View cookies â see all cookies for the current site
- Search â filter cookies by name or value
- Edit â modify cookie values inline
- Delete â remove individual cookies
- Copy â copy cookies to clipboard
- Export â export in Header String, JSON, or Netscape format
- Import â import from JSON, Netscape, or header strings
- Clear all â remove all cookies for the current site
Configuration Tab:
- Autoârestore â automatically restore the proxy on browser startup
- Bypass list â hosts that bypass the proxy (one per line)
- Save bypass list â save changes to the bypass list
Quick Proxy Setup
- Click the HAD extension icon in your browser toolbar
- Click one of the preset buttons (HAD:8085, HTTP:8080, SOCKS5:1080, TOR:9050)
- Click "ACTIVATE" to enable the proxy
- The status bar shows "ACTIVE" with uptime
Cookie Management
- Navigate to any website
- Click the HAD extension icon
- Switch to the "COOKIES" tab
- View all cookies for the current site
- Click on a cookie value to expand and see full value
- Use EDIT, DELETE, or COPY buttons
- Export cookies in Header, JSON, or Netscape format
- Import cookies from JSON, Netscape, or header strings
Website Backup (Web Downloader)
Basic Full Site Backup
had web -url https://example.com -mode full
Explanation:
- Crawls the entire website
- Downloads all pages, CSS, JavaScript, images
- Saves to a directory named after the domain
Single Page Backup with Assets
had web -url https://example.com/about -mode single -download-external
Explanation:
- Downloads only the specified page
- Includes all page assets (CSS, JS, images)
- Also downloads external assets (CDN, etc.)
Backup with External CDN Assets
had web -url https://example.com -mode full -download-external -external-domains cdn.example.com,images.example.com
Explanation:
- Downloads the full site
- Includes assets from external domains
- Only downloads from the specified external domains
High Performance Crawling
had web -url https://example.com -mode full -concurrency 10 -max-pages 500
Explanation:
- Uses 10 concurrent workers
- Crawls up to 500 pages
- Much faster for large sites
Resume Interrupted Backup
had web -url https://example.com -mode full -resume -output ./backup
Explanation:
- Resumes a previously interrupted backup
- Uses the saved crawl state
- Saves to
./backup
SPA with Hash Routing
had web -url https://app.example.com/#!/home -mode full -crawl-hash-routes
Explanation:
- Handles hashâbased routing (
#!/and#!) - Works with singleâpage applications (SPAs)
- Crawls all hashâbased routes
Rate Limiting and Size Limits
had web -url https://example.com -mode full -max-asset-size 20 -rate-limit 5
Explanation:
- Limits assets to 20 MB max
- Limits requests to 5 per second per domain
- Prevents overloading the server
FTP / SFTP
Standard FTP Download
had -protocol ftp ftp://example.com/file.zip
Explanation:
- Connects to FTP server
- Downloads
file.zip - Uses anonymous login by default
FTP with Credentials
had -protocol ftp -ftp-user myuser -ftp-pass mypass ftp://example.com/file.zip
Explanation:
- Uses the provided username and password
- Connects via FTP protocol
FTPS (FTP over TLS)
had -protocol ftps ftps://example.com/secure-file.zip
Explanation:
- Connects using FTPS (FTP over TLS)
- Encrypts the connection
SFTP with Password
had -protocol sftp -sftp-user myuser -sftp-pass mypass sftp://example.com/file.zip
Explanation:
- Connects via SFTP
- Uses password authentication
SFTP with SSH Key
had -protocol sftp -ssh-key ~/.ssh/id_rsa sftp://example.com/file.zip
Explanation:
- Uses SSH private key for authentication
- Supports RSA, ECDSA, Ed25519 keys
SFTP with Encrypted SSH Key
had -protocol sftp -ssh-key ~/.ssh/id_rsa -ssh-key-pass mypassphrase sftp://example.com/file.zip
Explanation:
- Uses an encrypted SSH private key
- Provides the passphrase to decrypt the key
FTP MultiâPart Download
had -protocol ftp -ftp-multipart -ftp-parts 8 ftp://example.com/large-file.zip
Explanation:
- Splits the file into 8 parts
- Downloads each part in parallel
- Much faster for large FTP files
Web Scraping
Basic Scraping
had -scrape https://example.com/downloads/
Explanation:
- Extracts all downloadable links from the page
- Presents them for selection
- Downloads selected files
Scrape with Extension Filter
had -scrape https://example.com/downloads/ -ex .mp4,.mp3,.zip
Explanation:
- Only shows links with the specified extensions
- Filters out other file types
Scrape with Custom Threads
had -scrape https://example.com/files/ -t 16 -ex .pdf,.doc,.xls
Explanation:
- Uses 16 threads for downloads
- Only shows PDF, DOC, and XLS files
Scrape with Verbose Output
had -scrape https://example.com/media/ -ex .jpg,.png,.gif -v
Explanation:
- Shows detailed perâthread progress
- Useful for debugging
Parameterized URLs
Simple Numeric Placeholder
had -parameterized-url 'https://example.com/file{}.zip' -start 1 -end 50
Explanation:
- Generates URLs:
file1.ziptofile50.zip - Uses
{}as the placeholder - Downloads all 50 files
ZeroâPadded Placeholders
had -parameterized-url 'https://example.com/image{0}.jpg' -start 1 -end 100
Explanation:
- Generates
image01.jpgtoimage100.jpg - Zeroâpadding up to 2 digits (
{0}) - Downloads all 100 images
Triple ZeroâPadded
had -parameterized-url 'https://example.com/page{00}.html' -start 1 -end 500 -step 2
Explanation:
- Generates
page001.htmltopage500.html - Zeroâpadding up to 3 digits (
{00}) - Step size of 2 (odd numbers only)
Custom Step Size
had -parameterized-url 'https://example.com/chunk{}.bin' -start 0 -end 200 -step 10
Explanation:
- Generates
chunk0.bin,chunk10.bin, âŚ,chunk200.bin - Step size of 10
- Useful for paginated content
Cookie Support
Load Cookies from Netscape Format File
had -load-cookies cookies.txt https://example.com/private-file.zip
Explanation:
- Loads cookies from a Netscape format file
- Export cookies from Firefox or Chrome
- Authenticates for private downloads
Netscape Cookie File Format:
# Netscape HTTP Cookie File
.example.com TRUE / FALSE 1735689600 SESSION abc123def456
.example.com TRUE / TRUE 1735689600 SECURE token789
Save Cookies After Download
had -save-cookies output.txt https://example.com/file.zip
Explanation:
- Saves cookies to a Netscape format file after download
- Useful for capturing session cookies
Direct Cookie String
had -c "sessionid=abc123; user=test" https://example.com/file.zip
Explanation:
- Sends the cookie string directly
- Format:
name1=value1; name2=value2
Load and Save Cookies Together
had -load-cookies cookies.txt -save-cookies newcookies.txt https://example.com/file.zip
Explanation:
- Loads cookies from
cookies.txt - Downloads the file
- Saves updated cookies to
newcookies.txt
Proxy Support
SOCKS5 Proxy
had -proxy socks5://127.0.0.1:1080 https://example.com/file.zip
Explanation:
- Routes traffic through a SOCKS5 proxy
- Useful for anonymity or network restrictions
SOCKS5 with Authentication
had -proxy socks5://user:pass@127.0.0.1:1080 https://example.com/file.zip
Explanation:
- Uses SOCKS5 with username and password
- Authentication is passed in the proxy URL
SOCKS4 Proxy
had -proxy socks4://192.168.1.1:9050 -t 16 https://example.com/file.zip
Explanation:
- Routes traffic through a SOCKS4 proxy
- Uses 16 threads for the download
HTTP Proxy
had -proxy http://proxy.company.com:8080 https://example.com/file.zip
Explanation:
- Routes traffic through an HTTP proxy
- Common in corporate environments
HTTPS Proxy with Authentication
had -proxy https://user:pass@proxy.company.com:8080 https://example.com/file.zip
Explanation:
- Uses HTTPS proxy with authentication
- Secure connection to the proxy
Environment Variables for Proxy
export HTTP_PROXY=http://proxy:8080
export HTTPS_PROXY=http://proxy:8080
export NO_PROXY=localhost,127.0.0.1
had https://example.com/file.zip
Explanation:
- Uses environment variables for proxy configuration
- No need to specify
-proxyflag NO_PROXYlists hosts to bypass the proxy
Metalink Downloads
Download from Metalink URL
had -metalink https://example.com/file.metalink
Explanation:
- Downloads the Metalink file
- Extracts mirror URLs
- Downloads from the best mirror
Download from Local Metalink File
had -metalink ./downloads/ubuntu.metalink4
Explanation:
- Reads the Metalink file from disk
- Supports both version 3 and 4
- Downloads the file
Metalink with Custom Output Directory
had -metalink https://example.com/file.metalink -o ./downloads
Explanation:
- Downloads the file to
./downloads/ - Overrides the Metalink's output directory
RPC & REST API
Start RPC Server
had -rpc
Explanation:
- Starts the JSONâRPC server on
localhost:6800 - Enables remote control of HAD
- REST API is also available
Start RPC on Custom Address
had -rpc -rpc-addr 0.0.0.0:6800
Explanation:
- Binds to all network interfaces
- Allows remote connections
- Useful for Web UI access
RPC with Downloads Directory
had -rpc -rpc-addr localhost:6800 -o /downloads
Explanation:
- Sets the default download directory
- All RPC downloads go to
/downloads
JSONâRPC Example: Get Version
curl -X POST http://localhost:6800/jsonrpc -d '{"method":"had.version","id":1}'
Response:
{
"id": 1,
"result": {
"name": "HAD (Hyper Advanced Downloader)",
"version": "3.6.0",
"protocol": "had-rpc/2.0",
"features": "http,https,ftp,ftps,sftp,hls,metalink,scrape,capture-proxy"
}
}
JSONâRPC Example: Get Global Stats
curl -X POST http://localhost:6800/jsonrpc -d '{"method":"had.getGlobalStat","id":2}'
Response:
{
"id": 2,
"result": {
"num_active": 2,
"total_files": 5,
"completed_files": 3,
"total_size": 1073741824,
"total_size_human": "1.0 GB",
"total_downloaded": 536870912,
"total_downloaded_human": "512.0 MB",
"total_progress": 50.0,
"paused": false,
"speed_limit": 0,
"uptime": "1h23m45s"
}
}
JSONâRPC Example: Add Download
curl -X POST http://localhost:6800/jsonrpc -d '{"method":"had.addUri","params":{"uris":["https://example.com/file.zip"]},"id":3}'
Response:
{
"id": 3,
"result": {
"gid": "000000018f3a2d4e"
}
}
JSONâRPC Example: Pause All Downloads
curl -X POST http://localhost:6800/jsonrpc -d '{"method":"had.pauseAll","id":6}'
Response:
{
"id": 6,
"result": {
"paused": 3
}
}
JSONâRPC Example: Set Speed Limit
curl -X POST http://localhost:6800/jsonrpc -d '{"method":"had.setSpeedLimit","params":{"speed":5242880},"id":7}'
Response:
{
"id": 7,
"result": {
"speed_limit": 5242880,
"speed_human": "5.0 MB/s"
}
}
JSONâRPC Example: List All Methods
curl -X POST http://localhost:6800/jsonrpc -d '{"method":"system.listMethods","id":5}'
REST API Examples
# Get global status
curl http://localhost:6800/api/status
# Get all files
curl http://localhost:6800/api/files
# Get active tasks
curl http://localhost:6800/api/tasks
# Pause all downloads
curl http://localhost:6800/api/pause
# Resume all downloads
curl http://localhost:6800/api/resume
# Get version info
curl http://localhost:6800/api/version
Resume Downloads
Resume from Saved Session
had session_20250622_143022.json
Explanation:
- Resumes the download from the session file
- Session files are automatically saved on interrupt (Ctrl+C)
- Progress is saved every 10 seconds
Session File Location
Session files are saved as {filename}.json in the download directory.
Manual Resume
had file.zip.json
Explanation:
- Resumes
file.zipfrom its session file - Works even if the original URL is the same
Integrity Checks
Verify SHAâ256 Checksum
had -checksum-sha256 abc123... https://example.com/file.zip
Explanation:
- Verifies the file's SHAâ256 hash after download
- Aborts if the hash doesn't match
Verify MD5 Checksum
had -checksum-md5 abc123... https://example.com/file.zip
Explanation:
- Verifies the file's MD5 hash after download
- Aborts if the hash doesn't match
Verify SHAâ1 Checksum
had -checksum-sha1 abc123... https://example.com/file.zip
Explanation:
- Verifies the file's SHAâ1 hash after download
- Aborts if the hash doesn't match
Check Integrity (AutoâDetect)
had -check-integrity https://example.com/file.zip
Explanation:
- Automatically detects the checksum type
- Verifies file integrity after download
- Requires checksum file in the same directory
Daemon Mode
Start Daemon
had -daemon -o /downloads https://example.com/bigfile.zip
Explanation:
- Runs HAD as a background daemon
- Continues running after logout
- Saves PID to
/tmp/had.pid
Check Daemon Status
cat /tmp/had.pid
Explanation:
- Shows the PID of the running daemon
- Use to check if the daemon is running
Stop Daemon
kill $(cat /tmp/had.pid)
Explanation:
- Stops the daemon process
- Uses the PID from the PID file
Systemd Service
Create /etc/systemd/system/had.service:
[Unit]
Description=HAD Downloader Service
After=network.target
[Service]
Type=simple
User=downloader
ExecStart=/usr/local/bin/had -daemon -o /downloads -rpc
Restart=on-failure
[Install]
WantedBy=multi-user.target
Then enable and start:
sudo systemctl enable had
sudo systemctl start had
âď¸ Complete Command Line Reference
Core Options
| Option | Default | Description | Example |
|---|---|---|---|
-t |
CPU cores | Number of parallel download threads per file | -t 16 |
-o |
. |
Destination directory for downloads | -o ./downloads |
-u |
2 |
Maximum simultaneous file downloads | -u 5 |
-r |
5 |
Retries per segment | -r 10 |
-timeout |
30 |
Network timeout in seconds | -timeout 60 |
-v |
false |
Verbose mode with perâthread progress | -v |
-save-session |
true |
Save session to JSON if interrupted | -save-session false |
-f |
"" |
File containing download URLs (one per line) | -f urls.txt |
HLS / Streaming Options
| Option | Default | Description | Example |
|---|---|---|---|
-hls |
"" |
HLS/M3U8 stream URL to download | -hls https://example.com/stream.m3u8 |
Queue & Priority Options
| Option | Default | Description | Example |
|---|---|---|---|
-queue |
"" |
Queue file with URLs and priorities (format: url priority) | -queue queue.txt |
-priority |
0 |
Download priority for this job (higher = first) | -priority 100 |
Bandwidth Scheduling Options
| Option | Default | Description | Example |
|---|---|---|---|
-schedule-from |
"" |
Download window start (HH:MM) | -schedule-from 02:00 |
-schedule-to |
"" |
Download window end (HH:MM) | -schedule-to 06:00 |
Notification Options
| Option | Default | Description | Example |
|---|---|---|---|
-notify-telegram |
"" |
Telegram chat ID for notifications | -notify-telegram 123456789 |
-notify-telegram-bot |
"" |
Telegram bot token | -notify-telegram-bot "token" |
-notify-discord |
"" |
Discord webhook URL | -notify-discord "https://..." |
-notify-desktop |
false |
Enable desktop notifications | -notify-desktop |
PostâProcessing Options
| Option | Default | Description | Example |
|---|---|---|---|
-post-extract |
false |
Autoâextract archive after download | -post-extract |
-post-move |
"" |
Move file to this directory after download | -post-move /completed |
-post-rename |
"" |
Rename pattern after download ({name}, {time}) | -post-rename "{name}_{time}" |
Mirror Options
| Option | Default | Description | Example |
|---|---|---|---|
-mirrors |
"" |
Commaâseparated mirror URLs | -mirrors "mirror1.com, mirror2.com" |
-auto-mirror |
false |
Autoâselect fastest mirror via latency probing | -auto-mirror |
Capture Proxy Options
| Option | Default | Description | Example |
|---|---|---|---|
-capture-proxy |
"" |
Start MITM proxy (e.g., :8085) | -capture-proxy :8085 |
-capture-types |
video,music |
File types: video,music,image,document,archive,all | -capture-types video,archive |
-capture-exts |
"" |
Custom extensions (commaâseparated) | -capture-exts .webm,.mka |
-capture-auto |
false |
Autoâdownload captured files | -capture-auto |
-capture-output |
captured |
Output directory for autoâdownloads | -capture-output ./downloads |
-capture-confidence |
30 |
Confidence threshold (0â100) | -capture-confidence 50 |
-capture-min-size |
1024 |
Minimum file size in bytes | -capture-min-size 1048576 |
-capture-max-size |
0 |
Maximum file size (0=unlimited) | -capture-max-size 1073741824 |
-capture-save |
captured_links.txt |
File to save captured links | -capture-save links.txt |
-capture-header |
"" |
Custom HTTP headers (can be repeated) | -capture-header "Auth: token" |
-capture-cookie |
"" |
Cookie for requests | -capture-cookie "session=abc" |
-filter-domain |
"" |
Filter specific domain | -filter-domain example.com |
-filter-pattern |
"" |
URL pattern filter | -filter-pattern "\.mp4$" |
-capture-body |
false |
Capture request/response bodies | -capture-body |
-install-cert |
true |
Autoâinstall CA certificate | -install-cert |
Web UI Options
| Option | Default | Description | Example |
|---|---|---|---|
-web-ui |
false |
Start the Web UI server | -web-ui |
Network Options
| Option | Description | Example |
|---|---|---|
-proxy |
Proxy address (socks4://, socks5://, http://) | -proxy socks5://127.0.0.1:1080 |
-protocol |
Force protocol: auto, http, https, ftp, ftps, sftp | -protocol ftp |
-H |
Custom HTTP header (can be repeated) | -H "User-Agent: MyBot" |
-c |
Cookie header value | -c "session=abc" |
-load-cookies |
Load cookies from Netscape format file | -load-cookies cookies.txt |
-save-cookies |
Save cookies to file in Netscape format | -save-cookies output.txt |
-netrc |
Path to .netrc file for authentication | -netrc ~/.netrc |
-gzip |
Enable gzip/deflate encoding (default: true) | -gzip false |
Speed & Cache Options
| Option | Default | Description | Example |
|---|---|---|---|
-max-speed |
0 |
Maximum download speed in bytes/second (0 = unlimited) | -max-speed 1048576 |
-disk-cache |
32MB |
Disk cache size in bytes (write buffer) | -disk-cache 64MB |
Integrity Check Options
| Option | Description | Example |
|---|---|---|
-check-integrity |
Verify file integrity after download | -check-integrity |
-checksum-sha256 |
Expected SHA256 hash for integrity check | -checksum-sha256 abc... |
-checksum-md5 |
Expected MD5 hash for integrity check | -checksum-md5 abc... |
-checksum-sha1 |
Expected SHA1 hash for integrity check | -checksum-sha1 abc... |
FTP/SFTP Options
| Option | Default | Description | Example |
|---|---|---|---|
-ftp-user |
anonymous |
FTP/SFTP username | -ftp-user myuser |
-ftp-pass |
anonymous@example.com |
FTP/SFTP password | -ftp-pass mypass |
-ssh-user |
"" |
SSH username for SFTP | -ssh-user myuser |
-ssh-pass |
"" |
SSH password for SFTP | -ssh-pass mypass |
-ssh-key |
"" |
SSH private key file for SFTP | -ssh-key ~/.ssh/id_rsa |
-ssh-key-pass |
"" |
SSH private key passphrase | -ssh-key-pass myphrase |
-ftp-multipart |
true |
Enable FTP multiâpart download | -ftp-multipart false |
-ftp-parts |
0 |
Number of FTP parts (0 = auto) | -ftp-parts 8 |
Website Downloader Options
| Option | Default | Description | Example |
|---|---|---|---|
-url |
Required | Target URL to backup | -url https://example.com |
-output |
domain name | Output directory | -output ./backup |
-mode |
single |
Crawl mode: 'single' or 'full' | -mode full |
-max-pages |
100 |
Maximum pages for fullâsite mode | -max-pages 500 |
-concurrency |
5 |
Number of concurrent workers | -concurrency 10 |
-download-external |
false |
Download external assets | -download-external |
-external-domains |
"" |
Commaâseparated external domains to include | -external-domains cdn.com |
-cookies |
"" |
Cookies (format: name1=value1; name2=value2) | -cookies "session=abc" |
-user-agent |
Mozilla/5.0... |
UserâAgent header | -user-agent "MyBot" |
-timeout |
30 |
Request timeout in seconds | -timeout 60 |
-retries |
3 |
Number of retries on failure | -retries 5 |
-minify |
false |
Minify HTML output | -minify |
-resume |
false |
Resume interrupted crawl | -resume |
-rate-limit |
10 |
Requests per second per domain | -rate-limit 5 |
-max-asset-size |
50 |
Maximum asset size in MB | -max-asset-size 20 |
-crawl-iframes |
true |
Download iframe content | -crawl-iframes false |
-crawl-hash-routes |
true |
Handle hashâbased routing for SPAs | -crawl-hash-routes |
-follow-meta-refresh |
true |
Follow metaârefresh redirects | -follow-meta-refresh |
Metalink Options
| Option | Description | Example |
|---|---|---|
-metalink |
Metalink URL or file path (RFC 5854) | -metalink file.metalink |
RPC Options
| Option | Default | Description | Example |
|---|---|---|---|
-rpc |
false |
Enable JSONâRPC interface | -rpc |
-rpc-addr |
localhost:6800 |
RPC server address | -rpc-addr 0.0.0.0:6800 |
Parameterized URL Options
| Option | Default | Description | Example |
|---|---|---|---|
-parameterized-url |
"" |
URL pattern with {} as placeholder | -parameterized-url 'file{}.zip' |
-start |
1 |
Start index for parameterized URLs | -start 0 |
-end |
100 |
End index for parameterized URLs | -end 50 |
-step |
1 |
Step for parameterized URLs | -step 2 |
Scraping Options
| Option | Description | Example |
|---|---|---|
-scrape |
URL to scrape for downloadable links | -scrape https://example.com |
-ex |
Filter extensions (e.g., .mp4,.mp3,.zip) | -ex .mp4,.mp3 |
Daemon Options
| Option | Default | Description | Example |
|---|---|---|---|
-daemon |
false |
Run as daemon process in background | -daemon |
-pid-file |
/tmp/had.pid |
PID file path for daemon mode | -pid-file /var/run/had.pid |
đ File Format Examples
URLs File (urls.txt)
# This is a comment
https://example.com/file1.zip
https://example.com/file2.zip
ftp://ftp.example.com/large-file.iso
https://example.com/document.pdf
sftp://sftp.example.com/backup.tar.gz
Queue File (queue.txt)
# Format: URL priority (higher = processed first)
https://example.com/urgent.zip 100
https://example.com/important.zip 75
https://example.com/normal.zip 50
https://example.com/low.zip 10
# Comments are supported
Captured Links JSON (captured_links.json)
[
{
"url": "https://example.com/video.mp4",
"file_type": "video",
"extension": ".mp4",
"size": 104857600,
"title": "sample video",
"source_url": "https://example.com/",
"timestamp": "2025-06-22T10:30:00Z",
"confidence": 85,
"method": "GET",
"status_code": 200,
"content_type": "video/mp4",
"downloaded": false
},
{
"url": "https://example.com/music.mp3",
"file_type": "music",
"extension": ".mp3",
"size": 5242880,
"title": "sample song",
"source_url": "https://example.com/",
"timestamp": "2025-06-22T10:31:00Z",
"confidence": 90,
"method": "GET",
"status_code": 200,
"content_type": "audio/mpeg",
"downloaded": false
}
]
Session Files
Session files are autoâsaved as {filename}.json. To resume:
had file.zip.json
.netrc File Format
machine example.com
login myusername
password mysecretpass
machine github.com
login mytoken
password ghp_xxxxxxxxxxxx
default
login anonymous
password user@example.com
Netscape Cookies File Format
# Netscape HTTP Cookie File
.example.com TRUE / FALSE 1735689600 SESSION abc123def456
.example.com TRUE / TRUE 1735689600 SECURE token789
â Frequently Asked Questions (Q&A)
General Questions
| Question | Answer |
|---|---|
| What is HAD? | HAD (Hyper Advanced Downloader) is a powerful, multiâthreaded downloader that supports HTTP/HTTPS, FTP/FTPS, SFTP, Metalink, MITM capture proxy, proxy connections, smart resume capabilities, JSONâRPC interface, complete website backup, HLS streaming support, queue management, and extensive postâprocessing. It's designed for speed, reliability, and automation. |
| What platforms does HAD support? | HAD supports Windows (7/10/11), Linux (all major distributions), macOS (10.15+), and ARM64 (including Raspberry Pi, Apple Silicon, and other ARMâbased devices). |
| How do I install HAD? | You have three options: 1. Go install: go install github.com/batmanpriv/had@v3.6.02. From source: git clone + go build3. Preâbuilt binaries: Download from the Releases page |
| How do I update HAD? | ⢠Go install: Run go install github.com/batmanpriv/had@v3.6.0 again⢠From source: git pull then rebuild⢠Binaries: Download the latest release |
| Is HAD free? | Yes! HAD is open source and released under the MIT License. You can use it for personal or commercial projects without any cost. |
| Where can I report bugs? | Report bugs on the GitHub Issues page. Please include your OS, HAD version, and the full command you used. |
| Can I contribute to HAD? | Absolutely! Contributions are welcome. Fork the repository, make your changes, and submit a Pull Request. See the Contributing section for details. |
| Does HAD have a graphical interface? | Yes! HAD includes a Web UI (introduced in v3.6.0) that provides a full dashboard for managing downloads, viewing stats, and controlling HAD from your browser. Run had -web-ui to start it. |
| What's the difference between HAD and wget/curl? | HAD is a multiâthreaded downloader with advanced features like resume, capture proxy, HLS streaming, priority queues, notifications, postâprocessing, and a Web UI. wget and curl are singleâthreaded and lack these advanced automation features. |
| Does HAD support batch processing? | Yes! You can use -f to load URLs from a file, -queue for priorityâbased processing, or -parameterized-url for generating sequential URLs. |
Download Questions
| Question | Answer |
|---|---|
| How can I speed up downloads? | ⢠Use -t to increase threads: -t 16 or -t 32 for very large files⢠Ensure the server supports range requests (most modern servers do) ⢠Use -u to download multiple files simultaneously⢠For FTP, enable -ftp-multipart⢠Use -auto-mirror to select the fastest mirror |
| How do I resume an interrupted download? | HAD automatically saves session files every 10 seconds. To resume: 1. Find the session file: file.zip.json2. Run: had file.zip.jsonAlternatively, use the Web UI Sessions tab or the RPC API to resume. |
| Why is my download stuck or slow? | Possible causes and solutions: ⢠Server doesn't support ranges â singleâthread only, can't speed up ⢠Network congestion â use -schedule-from to download during offâpeak hours⢠Proxy issues â check proxy settings with -proxy⢠Timeout too low â increase with -timeout 60⢠Speed limit set â check -max-speed⢠Disk I/O bottleneck â reduce -disk-cache or use a faster drive |
| Can I download multiple files at once? | Yes! Use -u to set the number of concurrent downloads:⢠-u 5 downloads up to 5 files simultaneously⢠Default is 2⢠For many small files, use -u 20 for better throughput |
| How do I download from FTP? | 1. Use -protocol ftp2. Provide credentials: -ftp-user and -ftp-pass3. Example: had -protocol ftp -ftp-user myuser -ftp-pass mypass ftp://example.com/file.zip4. For FTPS (FTP over TLS), use -protocol ftps5. For faster FTP downloads, enable -ftp-multipart |
| How do I download from SFTP? | 1. Use -protocol sftp2. Authenticate with password: -sftp-user and -sftp-pass3. Or authenticate with SSH key: -ssh-key ~/.ssh/id_rsa4. For encrypted keys, add -ssh-key-pass "passphrase"5. Example: had -protocol sftp -ssh-key ~/.ssh/id_rsa sftp://example.com/file.zip |
| Can I set a speed limit? | Yes! Use -max-speed with the speed in bytes per second:⢠-max-speed 1048576 â 1 MB/s⢠-max-speed 5242880 â 5 MB/s⢠-max-speed 0 â unlimited (default)You can also combine this with -schedule-from and -schedule-to for timeâbased limits. |
| How do I download from a list of URLs? | 1. Create a text file (e.g., urls.txt) with one URL per line2. Comments start with #3. Run: had -f urls.txt4. You can combine this with -u for concurrent downloads |
| Can I filter by file extension? | Yes! Use -ex with extensions separated by commas:⢠-ex .mp4,.mp3,.zip â only download MP4, MP3, and ZIP files⢠Works with -scrape and the Web UI Scrape feature |
| How do I download from a website (backup)? | Use the web downloader subâcommand: ⢠had web -url https://example.com -mode full â full site backup⢠had web -url https://example.com/about -mode single â single page⢠See the Website Backup section for all options |
| Can I download passwordâprotected files? | Yes! Use: ⢠HTTP Basic Auth: -H "Authorization: Basic base64..."⢠Cookies: -load-cookies cookies.txt or -c "session=abc"⢠.netrc file: -netrc ~/.netrc⢠FTP: -ftp-user and -ftp-pass⢠SFTP: -sftp-user/-sftp-pass or -ssh-key |
| What happens if I press Ctrl+C? | HAD automatically saves a session file (file.zip.json) and exits gracefully. You can resume later with had file.zip.json. |
| How do I verify download integrity? | Use the integrity check flags: ⢠-checksum-sha256 abc123...⢠-checksum-md5 abc123...⢠-checksum-sha1 abc123...⢠-check-integrity (autoâdetects from .sha256 file)You can also use the Checksum Verifier tool in the Web UI. |
| Can I download from a magnet link? | Yes! HAD supports magnet links with web seeds. Use:had -magnet "magnet:?xt=urn:btih:..."HAD will attempt to download from web seeds ( .ws parameter) in the magnet link. |
| How do I download from WebDAV? | Use the -webdav flag:⢠had -webdav https://example.com/webdav/ -webdav-user user -webdav-pass pass⢠HAD will recursively list and download all files from the WebDAV server. |
| Can I download from Google Drive or other cloud services? | Not directly. However, you can use the capture proxy to intercept download links from your browser while using Google Drive, or extract direct download URLs and pass them to HAD. |
Capture Proxy Questions
| Question | Answer |
|---|---|
| What is the capture proxy? | The capture proxy is a MITM (ManâinâTheâMiddle) proxy that intercepts HTTP/HTTPS traffic and automatically detects and saves download links (videos, music, images, documents, archives, etc.) as you browse. It's useful for capturing media from streaming sites, video platforms, and download pages. |
| How do I start the capture proxy? | 1. Run: had -capture-proxy :80852. Configure your browser to use localhost:8085 as a proxy3. Browse normally â HAD will capture links automatically 4. Links are saved to captured_links.txt and captured_links.json |
| Why is the capture proxy not capturing anything? | Check these common issues: ⢠CA certificate not installed â run had -install-cert⢠Browser not configured â set proxy to localhost:8085⢠HTTPS certificate warning â accept the warning (it's HAD's certificate) ⢠Confidence threshold too high â lower with -capture-confidence 30⢠Domain filter too strict â check -filter-domain⢠Body scanning disabled â enable with -capture-body for hidden links |
| How do I install the CA certificate? | 1. Automatic: had -install-cert2. Manual: Follow the instructions displayed in the terminal 3. The certificate file is saved as had.crt in the current directory4. On Windows: Doubleâclick â Install Certificate â Trusted Root 5. On macOS: Doubleâclick â Add to Keychain â Always Trust 6. On Linux: sudo cp had.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates |
| Can I filter by domain? | Yes! Use -filter-domain example.com to only capture links from that domain. This is useful for focusing on a specific site and ignoring other traffic. |
| How does confidence scoring work? | Confidence scoring (0â100%) is based on multiple signals: ⢠File extension (e.g., .mp4 â +45 points)⢠ContentâType (e.g., video/mp4 â +40 points)⢠URL patterns (e.g., /video/, /download/ â +10 points)⢠CDN hosts (e.g., cdn. â +12 points)⢠Query parameters (e.g., ?video= â +8 points)⢠Headers (e.g., Range: â +10 points)⢠Noise patterns (e.g., .css, .js â -50 points)Higher confidence means the proxy is more certain the link is a downloadable file. |
| Can I autoâdownload captured files? | Yes! Use -capture-auto to automatically download captured files. Optionally specify:⢠-capture-output ./downloads â save to a specific directory⢠HAD uses smart threading based on file size (1â8 threads) |
| What file types does the capture proxy detect? | By default: video (.mp4, .mkv, .avi, .mov, .webm, .m3u8, etc.), music (.mp3, .flac, .wav, .aac, .ogg, etc.), image (.jpg, .png, .gif, .webp, .svg, etc.), document (.pdf, .doc, .xls, .ppt, .txt, etc.), and archive (.zip, .rar, .7z, .tar, .gz, etc.).Customize with -capture-types and -capture-exts. |
| Can I capture from specific sites only? | Yes! Use -filter-domain example.com to only capture links from that domain. You can also use -filter-pattern with a regex pattern for more advanced filtering. |
| How does deduplication work? | HAD uses a 10âminute dedupe window with URL normalization: ⢠Removes URL fragments ( #)⢠Removes noise parameters ( _t, _ts, timestamp, nocache, cb, random, rand, t)⢠Normalizes and deduplicates URLs within the window ⢠Prevents capturing the same link multiple times |
| Can I add custom headers to the capture proxy? | Yes! Use -capture-header "Header: Value" (can be repeated). This is useful for:⢠Authentication tokens ⢠API keys ⢠Custom userâagents ⢠Referer headers |
| Can I pass cookies through the proxy? | Yes! Use -capture-cookie "sessionid=abc123; user=test" to pass cookies to all requests. This is useful for authenticated sites. |
| Can I capture from mobile devices? | Yes! Start the capture proxy on your machine and configure your mobile device's proxy settings to point to your machine's IP and port (e.g., 192.168.1.100:8085). |
| Is the capture proxy slow? | The capture proxy may add some latency due to HTTPS interception. To speed it up: ⢠Disable body scanning: -capture-body false⢠Increase confidence threshold: -capture-confidence 50⢠Use a faster machine ⢠Reduce the capture scope with domain filters |
Web UI Questions
| Question | Answer |
|---|---|
| How do I start the Web UI? | Run had -web-ui or had webui. Then open http://localhost:8090 in your browser. The Web UI starts the RPC server automatically. |
| Can I change the Web UI port? | Yes! Set the HAD_WEB_ADDR environment variable:HAD_WEB_ADDR=:9000 had -web-uiThis binds the Web UI to port 9000. |
| Can I secure the Web UI? | Yes! Set the HAD_TOKEN environment variable to enable bearer token authentication:HAD_TOKEN=secret123 had -web-uiThen include the token in requests: Authorization: Bearer secret123 or ?token=secret123. |
| Why can't I connect to the Web UI? | Common issues: ⢠HAD not running with -web-ui⢠Port 8090 is already in use â change with HAD_WEB_ADDR⢠Firewall blocking the port ⢠RPC server not running (it starts automatically with Web UI) ⢠Check the console output for error messages |
| Does the Web UI work on mobile? | Yes! The Web UI is fully responsive and works on phones, tablets, and desktops. All features are accessible on mobile devices. |
| Can I use the Web UI remotely? | Yes! Start HAD with -rpc-addr 0.0.0.0:6800 and access the Web UI from another device. Make sure to:1. Secure it with HAD_TOKEN2. Open the firewall port 3. Use http://your-ip:8090 to access it |
| How do I refresh the Web UI? | The Web UI autoârefreshes every 2 seconds by default. You can change the interval in the Settings tab (1s, 2s, 5s, or off). |
| What can I do in the Web UI? | ⢠Dashboard â view all downloads with realâtime progress ⢠Add URL â paste URLs, set threads, speed limit, output directory ⢠Scrape â enter a URL and autoâdownload all detected files ⢠Sessions â view and resume saved sessions ⢠History â see completed downloads with size, speed, duration ⢠Console â live log streaming from HAD ⢠Stats â speed chart, total downloaded, ETA, uptime ⢠Tools â metadata inspector, mirror tester, checksum verifier, bandwidth scheduler ⢠Settings â configure speed limit, parallel downloads, threads, output dir, RPC address, auth token |
| Can I add downloads from the Web UI? | Yes! Go to the Add URL tab, paste one or multiple URLs (one per line), configure options, and click Start Download. You can also drag and drop URLs into the drop zone. |
| Can I pause/resume downloads from the Web UI? | Yes! Each file card has Pause, Resume, Retry, and Remove buttons. You can also use the Pause All and Resume All buttons in the dashboard header. |
| How do I use the Scrape feature in the Web UI? | 1. Go to the Scrape tab 2. Enter a URL (e.g., a download page or media site) 3. Click Start Scrape 4. HAD will scan the page and autoâdownload all detected files 5. The scrape log shows progress and detected links |
| How do I use the Tools in the Web UI? | ⢠Metadata Inspector â enter a URL to see file info, size, content type, checksum ⢠Mirror Speed Test â enter multiple mirror URLs to test and rank them ⢠Checksum Verifier â enter a filename to compute MD5/SHAâ1/SHAâ256 ⢠Bandwidth Scheduler â set day/night speed limits |
Browser Extension Questions
| Question | Answer |
|---|---|
| How do I install the browser extension? | 1. Open chrome://extensions (Chrome/Edge) or about:debugging (Firefox)2. Enable Developer Mode 3. Click Load unpacked 4. Select the extensions-had folder5. The extension appears in your toolbar |
| What does the extension do? | The extension provides two main features: 1. Proxy Manager â quick presets, activation, bypass list 2. Cookie Editor â view, edit, delete, export, import cookies for the current site |
| How do I use the proxy presets? | 1. Click the extension icon 2. Click a preset button (HAD:8085, HTTP:8080, SOCKS5:1080, TOR:9050) 3. Click ACTIVATE to enable the proxy 4. The status bar shows "ACTIVE" with uptime 5. Click DEACTIVATE to disable |
| How do I view cookies? | 1. Navigate to any website 2. Click the extension icon 3. Switch to the COOKIES tab 4. All cookies for the current site are displayed with name, value, flags, and metadata |
| Can I edit cookies? | Yes! Click the EDIT button next to any cookie, modify the value in the input field, and click SAVE. The cookie is updated immediately. |
| How do I export cookies? | 1. Go to the COOKIES tab 2. Select a format: Header String, JSON, or Netscape 3. Click EXPORT 4. The file is downloaded to your computer |
| How do I import cookies? | 1. Go to the COOKIES tab 2. Paste JSON, Netscape, or header string data into the import textarea 3. Click IMPORT & APPLY 4. Cookies are applied to the current site |
| What is the bypass list? | The bypass list specifies hosts that bypass the proxy. Defaults are localhost, 127.0.0.1, and ::1. Add additional hosts (one per line) to exclude them from proxy routing. |
| How do I use the bypass list? | 1. Click the extension icon 2. Switch to the CONFIG tab 3. Edit the bypass list (one host per line) 4. Click SAVE BYPASS LIST 5. The proxy is reâapplied with the updated bypass list |
| What is autoârestore? | Autoârestore automatically reâenables the proxy when the browser starts. This is useful if you always use a proxy. Enable it in the CONFIG tab. |
| Can I test the proxy connection? | Yes! In the PROXY tab, enter host and port, then click TEST. The extension will attempt to connect and show the latency or an error message. |
| Does the extension work on Firefox? | Yes, but Firefox loads extensions temporarily. For permanent installation, you need to package and sign the extension. Alternatively, use the Developer Edition of Firefox with permanent unsigned extensions. |
| Does the extension work on mobile browsers? | The extension is designed for desktop browsers (Chrome, Edge, Firefox). Mobile browsers (Android/iOS) generally don't support extensions or have limited support. |
HLS / Streaming Questions
| Question | Answer |
|---|---|
| What is HLS? | HLS (HTTP Live Streaming) is a streaming protocol developed by Apple. It's used by many video platforms (YouTube Live, Twitch, Hulu, Netflix, etc.) to deliver video content. HLS uses M3U8 playlists that reference TS segments. |
| How do I download an HLS stream? | Use -hls with the M3U8 playlist URL:had -hls https://example.com/stream.m3u8HAD downloads all segments and combines them into a single file. |
| Do I need FFmpeg? | No, HAD has a pureâGo fallback. However: ⢠With FFmpeg â faster, produces MP4 output ⢠Without FFmpeg â slower, produces TS output HAD autoâdetects FFmpeg and falls back gracefully. |
| Can I download live streams? | Yes! HAD supports live HLS streams. The download continues as new segments become available. The download will keep running until you stop it (Ctrl+C) or the stream ends. |
| Why is my HLS download failing? | Common issues: ⢠M3U8 URL inaccessible â check if it works in a browser ⢠Authentication required â use cookies or headers ⢠Invalid playlist â the M3U8 might be empty or malformed ⢠Rate limiting â the server may be blocking multiple requests ⢠Network issues â check your connection Use -v for debug output to see what's happening. |
| How do I specify the output format? | ⢠With FFmpeg â output is automatically MP4 ⢠Without FFmpeg â output is TS You can change the extension manually after download, or use -post-rename to rename it. |
| Can I specify the output file name? | Use -o with a filename (not just a directory):had -hls https://example.com/stream.m3u8 -o ./videos/my_video.mp4If you specify a directory, HAD uses the filename from the URL. |
| Can I resume an HLS download? | No, HLS downloads are not resumable because segments are downloaded once and combined. However, if a segment fails, HAD retries it (up to -r times). |
| Does HAD support DASH (MPD) streaming? | Not yet. HAD currently supports only HLS (M3U8). DASH support is planned for a future release. |
| Can I download DRMâprotected HLS streams? | No, HAD cannot decrypt DRMâprotected streams (e.g., Widevine, FairPlay). It only works with unencrypted or AESâ128 encrypted streams (if the key is available in the M3U8). |
| What's the difference between VOD and live HLS? | ⢠VOD (Video on Demand) â a complete playlist with all segments, downloads quickly ⢠Live â the playlist updates continuously, segments become available over time HAD handles both, but live streams require patience as segments are generated in realâtime. |
RPC & API Questions
| Question | Answer |
|---|---|
| How do I start the RPC server? | Use the -rpc flag:had -rpcBy default, it listens on localhost:6800. You can change the address with -rpc-addr. |
| What is the RPC protocol? | HAD uses JSONâRPC 2.0 over HTTP. There are also REST endpoints for common operations at /api/*. |
| How do I add a download via RPC? | Send a POST request to /jsonrpc with:json<br>{"method":"had.addUri","params":{"uris":["https://example.com/file.zip"]},"id":1}<br>Response contains a gid (download ID). |
| Can I pause downloads via RPC? | Yes! Use had.pauseAll to pause all downloads, or had.pause with a specific gid.json<br>{"method":"had.pause","params":{"gid":"..."},"id":2}<br> |
| How do I get the status of a download? | Use had.tellStatus with a gid, or had.tellAllStatus for all downloads. Example:json<br>{"method":"had.tellStatus","params":{"gid":"..."},"id":3}<br> |
| What methods are available? | Send {"method":"system.listMethods","id":1} to get a list of all available RPC methods. Methods include:⢠had.addUri â add a download⢠had.addUrls â add multiple downloads⢠had.remove â remove a download⢠had.removeAll â remove all downloads⢠had.tellStatus â get status of a download⢠had.tellAllStatus â get status of all downloads⢠had.getGlobalStat â get global statistics⢠had.getFiles â get list of files⢠had.pause â pause a download⢠had.pauseAll â pause all downloads⢠had.resume â resume a download⢠had.resumeAll â resume all downloads⢠had.setSpeedLimit â set speed limit⢠had.getSpeedLimit â get speed limit⢠had.setMaxParallel â set max parallel downloads⢠had.setThreads â set threads per file⢠had.setOutDir â set output directory⢠had.scrape â scrape a URL⢠had.shutdown â shutdown HAD⢠had.version â get version info⢠had.getHistory â get download history⢠had.clearHistory â clear history⢠had.setBWSchedule â set bandwidth schedule⢠had.getBWSchedule â get bandwidth schedule⢠had.testMirrors â test mirror URLs⢠had.fetchMeta â fetch metadata⢠had.verifyChecksum â verify checksum⢠had.listSessions â list sessions⢠had.resumeSession â resume a session⢠had.deleteSession â delete a session⢠had.setMirrors â set mirrors⢠had.getMirrors â get mirrors⢠had.addWebDAV â add WebDAV download⢠had.listWebDAV â list WebDAV files⢠had.downloadWebDAVFile â download WebDAV file⢠had.pauseFile â pause a file by name⢠had.resumeFile â resume a file by name⢠had.removeFile â remove a file by name⢠had.pauseAllFiles â pause all files⢠had.getPausedFiles â get paused files |
| How do I use the REST API? | The REST API is available at /api/*:⢠GET /api/status â global status⢠GET /api/files â list files⢠GET /api/tasks â list tasks⢠GET /api/pause â pause all⢠GET /api/resume â resume all⢠GET /api/version â version info |
| Can I use the RPC API from other programming languages? | Yes! The JSONâRPC API can be called from any language that can make HTTP requests. There are JSONâRPC client libraries for Python, JavaScript, Java, C#, Ruby, PHP, and many others. |
| Can I use the Web UI without the RPC server? | No, the Web UI communicates with HAD via the RPC server. The RPC server starts automatically when you run had -web-ui. |
| How do I secure the RPC server? | ⢠Use a firewall to restrict access to trusted IPs ⢠Use the HAD_TOKEN environment variable for authentication⢠Run HAD on a nonâstandard port ⢠Use SSH tunneling for remote access |
Troubleshooting Questions
| Question | Answer |
|---|---|
| HAD crashes on startup? | 1. Check your Go version: go version (need 1.26+)2. Verify dependencies: go mod download3. Try rebuilding: go build -o had main.go4. Check for permission issues: run with sudo if needed5. Look for error messages in the output |
| "permission denied" when saving files? | 1. Make sure you have write permissions to the output directory 2. Use -o to specify a writable directory3. Run with sudo if necessary (Linux/macOS)4. Check if the directory is on a readâonly filesystem |
| "connection refused" error? | 1. Check if the server is reachable: ping example.com2. If using a proxy, verify the proxy address and port 3. Increase the timeout: -timeout 604. Check for firewall blocking the connection 5. Verify the URL is correct (no typos) |
| "invalid checksum" error? | The downloaded file's hash doesn't match the expected value: 1. The file may be corrupted â try downloading again 2. The checksum is incorrect â verify the expected hash 3. The file may have been modified after upload 4. Try a different mirror with -mirrors |
| "too many open files" error? | 1. Reduce concurrent downloads: -u 32. Reduce threads per file: -t 83. Increase system file limits: ulimit -n 4096 (Linux/macOS)4. Restart your terminal or system |
| "no space left on device"? | 1. Free up disk space 2. Use -o to save to a different drive with more space3. Use -post-extract to extract and delete archives4. Set a lower -disk-cache to reduce temporary storage |
| "certificate verify failed"? | 1. For HTTPS sites, install the CA certificate: had -install-cert2. For selfâsigned certificates, use -insecure (not recommended)3. Check that the system date and time are correct 4. In the capture proxy, accept the certificate warning in your browser |
| HLS download says "no segments found"? | 1. The M3U8 playlist might be empty â check it in a browser 2. Authentication required â add cookies or headers 3. The playlist might be a live stream that hasn't started yet 4. Use -v to see debug output and the actual playlist content |
| The Web UI shows "RPC unreachable"? | 1. Make sure HAD is running with -web-ui (starts RPC automatically)2. Check the HAD_RPC_ADDR environment variable3. Ensure the RPC address is correct in the Web UI Settings tab 4. Check if the RPC port (6800) is open and not blocked 5. Try accessing the RPC directly: curl http://localhost:6800/api/status |
| The capture proxy is slow? | 1. Disable body scanning: -capture-body false2. Increase confidence threshold: -capture-confidence 50 (fewer captures)3. Use a faster machine or better network 4. Reduce the capture scope with -filter-domain5. Use -capture-types to capture only what you need |
| The browser extension doesn't show cookies? | 1. Refresh the page 2. Click the REFRESH button in the extension 3. Make sure you're on the correct site 4. Check if cookies exist in browser storage (DevTools â Application â Cookies) 5. Reload the extension (Developer Mode â Reload) |
| Download speed is slower than expected? | 1. Increase threads: -t 16 or -t 322. Check if the server supports range requests (most do) 3. Use -u to download multiple files simultaneously4. Enable -ftp-multipart for FTP downloads5. Use -auto-mirror to select the fastest mirror6. Check your network bandwidth (speed test) 7. Reduce background network usage |
| Resume doesn't work? | 1. Ensure the server supports range requests (Accept-Ranges: bytes)2. Check if the session file exists ( file.zip.json)3. The file might have changed on the server (different size) 4. Try manual resume: had file.zip.json5. Some servers don't support resume â you'll need to start over |
| Daemon mode doesn't work? | 1. Daemon mode is not supported on Windows 2. On Linux/macOS, check if the PID file is created 3. Verify permissions: /tmp/had.pid must be writable4. Check if another instance is already running 5. Use `ps aux |
| Magnet link download fails? | 1. Magnet links require web seeds (ws= parameter)2. No web seeds â HAD cannot download the file 3. Install a BitTorrent client to download torrent files 4. Try using the -magnet flag directly: had -magnet "magnet:?...&ws=http://..."5. Some trackers may be blocked â try different mirrors |
| WebDAV download fails? | 1. Check if the WebDAV server is reachable 2. Verify credentials: -webdav-user and -webdav-pass3. The server might require a specific path â try -webdav https://example.com/dav/4. Some WebDAV servers don't support recursive listing â HAD may fail 5. Check the server logs for more information |
đ Performance Tips
| Scenario | Recommendation |
|---|---|
| Large files (1GB+) | Use -t 16 or -t 32 for maximum speed |
| Many small files | Use -u 20 to increase parallel downloads |
| Slow connection | Reduce threads to 2-4 and increase -timeout 60 |
| High bandwidth (100+ Mbps) | Increase threads to 32-64 for maximum throughput |
| Rateâlimited sites | Use -rate-limit 5 in the web downloader to avoid being blocked |
| Capture proxy | Use -capture-confidence 30 for a good balance of accuracy and speed |
| HLS streams | Install FFmpeg for the best performance and MP4 output |
| Scheduled downloads | Use -schedule-from and -schedule-to to avoid peak hours |
| Postâprocessing | Chain commands with -post-extract and -post-move |
| SFTP transfers | Use SSH keys instead of passwords for better performance |
| Metalink downloads | Let HAD autoâselect the best mirrors |
| Disk space limited | Reduce -disk-cache to 8MB or lower |
| Many concurrent downloads | Use -u 5-10 to avoid connection limits |
đ§ Advanced Usage
Running as Daemon (Linux)
# Start daemon
had -daemon -o /downloads https://example.com/bigfile.zip
# Check status
cat /tmp/had.pid
# Stop daemon
kill $(cat /tmp/had.pid)
# Systemd service
sudo cat > /etc/systemd/system/had.service << EOF
[Unit]
Description=HAD Downloader Service
After=network.target
[Service]
Type=simple
User=downloader
ExecStart=/usr/local/bin/had -daemon -o /downloads -rpc
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable had
sudo systemctl start had
Using Environment Variables
# Set proxy via environment
export HTTP_PROXY=http://proxy:8080
export HTTPS_PROXY=http://proxy:8080
export NO_PROXY=localhost,127.0.0.1
# Set RPC address
export HAD_RPC_ADDR=http://localhost:6800
# Set Web UI address
export HAD_WEB_ADDR=:8090
# Set auth token
export HAD_TOKEN=secret123
# Run with environment
had https://example.com/file.zip
Combining with Other Tools
# Download and extract
had https://example.com/archive.zip && unzip archive.zip
# Download and verify signature
had https://example.com/file.iso && sha256sum -c file.iso.sha256
# Download list from another program output
cat urls.txt | xargs -n1 had
# Scheduled downloads with cron
0 2 * * * /usr/local/bin/had https://example.com/daily-backup.zip -o /backups
# Download and move to specific directory
had -post-move /media/videos https://example.com/video.mp4
Custom Headers
# Multiple custom headers
had -H "Authorization: Bearer token123" -H "X-Custom-Header: value" https://api.example.com/file.zip
# User-Agent override
had -H "User-Agent: MyCustomBot/1.0" https://example.com/file.zip
# Referer header
had -H "Referer: https://google.com" https://example.com/file.zip
Capture Proxy with Custom Headers
# Add authentication headers to capture proxy
had -capture-proxy :8085 -capture-header "Authorization: Bearer token123" -capture-header "X-API-Key: abc123"
# Pass cookies through proxy
had -capture-proxy :8085 -capture-cookie "sessionid=abc123; user=test"
Complete Automated Workflow
# Download from queue with scheduling, notifications, and postâprocessing
had \
-queue queue.txt \
-schedule-from 00:00 \
-schedule-to 06:00 \
-max-speed 1048576 \
-post-extract \
-post-move /media/completed \
-post-rename "{name}_{time}" \
-notify-telegram 123456789 \
-notify-telegram-bot "your_bot_token" \
-notify-desktop
đ Security Note
The capture proxy uses a selfâsigned CA certificate to intercept HTTPS traffic. This certificate must be trusted by your system for HTTPS interception to work. The -install-cert flag attempts to install it automatically, but you may need to do it manually depending on your system permissions.
Important: Only use this tool on networks and websites you own or have permission to test. Intercepting HTTPS traffic without authorization may violate terms of service or laws in your jurisdiction.
Certificate Installation Troubleshooting
| Problem | Solution |
|---|---|
| Certificate warning in browser | Reinstall certificate as Trusted Root |
| Extension not capturing | Check proxy settings (localhost:8085) |
| "ERR_PROXY_CONNECTION_FAILED" | Ensure HAD is running with -capture-proxy |
| Firefox shows "Connection not secure" | Manually import had.crt to Firefox certificate store |
| Automatic installation fails | Run as administrator/root or use manual method |
đ ď¸ Building from Source
Prerequisites
- Go 1.26 or higher
- GCC (for Windows builds)
- FFmpeg (optional, for HLS downloads â fallback to pureâGo)
Build Commands
# Linux/macOS
go build -o had main.go
# Windows
GOOS=windows GOARCH=amd64 go build -o had.exe main.go
# Linux ARM64
GOOS=linux GOARCH=arm64 go build -o had-linux-arm64 main.go
# With optimizations (smaller binary)
go build -ldflags="-s -w" -o had main.go
# Crossâcompile all platforms
GOOS=linux GOARCH=amd64 go build -o had-linux-amd64 main.go
GOOS=linux GOARCH=386 go build -o had-linux-386 main.go
GOOS=linux GOARCH=arm64 go build -o had-linux-arm64 main.go
GOOS=windows GOARCH=amd64 go build -o had-windows-amd64.exe main.go
GOOS=windows GOARCH=386 go build -o had-windows-386.exe main.go
GOOS=darwin GOARCH=amd64 go build -o had-darwin-amd64 main.go
GOOS=darwin GOARCH=arm64 go build -o had-darwin-arm64 main.go
đ¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Development Setup
git clone https://github.com/batmanpriv/had.git
cd had
go mod download
go build -o had main.go
had -v https://example.com/test.zip
Crypto Donations
| Currency | Address |
|---|---|
| Bitcoin (BTC) | bc1q7rags3da9a549u22e8t9fmw7j94kgxwflfy2f8 |
| Tron (TRX) | TQsUASZzfcKg4AckFFv1YjKgU8QCniUwhv |
đ Acknowledgments
- Thanks to all contributors and users who reported issues
- Built with â¤ď¸ using Go
- Special thanks to the goproxy library for MITM proxy capabilities
â Star this repository if you find it useful!
Documentation
Âś
There is no documentation for this package.