Configuration¶
rewget can be configured through command-line flags and environment variables.
Environment Variables¶
| Variable | Description | Default |
|---|---|---|
RWGET_ENGINE | Default wget engine (wget or wget2) | wget |
Command-Line Flags¶
All rewget-specific flags use the --rewget-* prefix to avoid conflicts with wget flags.
Core Options¶
--rewget-no-fallback¶
Disable fallback completely. rewget behaves exactly like wget.
--rewget-engine=ENGINE¶
Select the wget engine to use.
| Value | Description |
|---|---|
wget | GNU Wget (default) |
wget2 | GNU Wget2 |
--rewget-quiet¶
Suppress rewget status messages. wget's output is unchanged.
--rewget-debug¶
Enable verbose debug output for troubleshooting.
Fallback Control¶
--rewget-fallback-codes=CODES¶
Comma-separated HTTP status codes that trigger fallback.
Default: 403,429,503,520,521,522,523,524,525,526,527,528,529
--rewget-fallback-stage=N¶
Start at a specific stage instead of Stage 1.
| Value | Stage |
|---|---|
1 | Plain wget (default) |
2 | TLS impersonation |
3 | JavaScript preflight |
--rewget-no-body-detection¶
Disable HTML body pattern detection for bot protection signatures.
Browser Profile Options¶
--rewget-profile=NAME¶
Use a specific browser profile for impersonation.
Available profiles:
| Profile | Browser |
|---|---|
chrome_131 | Chrome 131 on Windows |
chrome_130 | Chrome 130 on Windows |
firefox_136 | Firefox 136 on Windows |
firefox_133 | Firefox 133 on Windows |
safari_18 | Safari 18 on macOS |
edge_131 | Edge 131 on Windows |
--rewget-list-profiles¶
List all available browser profiles.
--rewget-update-profiles¶
Update browser profiles from the remote server.
--rewget-profile-url=URL¶
Custom URL for profile updates.
--rewget-no-verify¶
Skip Ed25519 signature verification when updating profiles.
Warning
Only use this for testing or with trusted profile sources.
--rewget-verify-profile=NAME¶
Display detailed fingerprint information for a profile.
JavaScript Preflight Options¶
--rewget-js¶
Force JavaScript preflight (Stage 3) from the start.
--rewget-js-wait=CONDITION¶
Wait condition for JavaScript preflight.
| Condition | Description |
|---|---|
networkidle | Wait for network to be idle |
selector:CSS | Wait for CSS selector to match |
delay:MS | Wait fixed milliseconds |
rewget --rewget-js --rewget-js-wait=networkidle https://example.com/
rewget --rewget-js --rewget-js-wait=selector:#main-content https://example.com/
rewget --rewget-js --rewget-js-wait=delay:5000 https://example.com/
--rewget-download-chromium¶
Pre-download Chromium for JavaScript preflight.
--rewget-chromium-path¶
Print the Chromium installation path.
Timeout Options¶
--rewget-timeout-stage1=MS¶
Stage 1 timeout in milliseconds. Uses wget's timeout settings by default.
--rewget-timeout-stage2=MS¶
Stage 2 timeout in milliseconds.
Default: 15000 (15 seconds)
--rewget-timeout-stage3=MS¶
Stage 3 timeout in milliseconds.
Default: 30000 (30 seconds)
Cache Options¶
--rewget-no-cache¶
Disable domain stage caching. Always start at Stage 1.
--rewget-clear-cache¶
Clear the domain stage cache and exit.
Daemon Options¶
--rewget-daemon=MODE¶
Control daemon behavior.
| Mode | Description |
|---|---|
auto | Start daemon when needed (default) |
on | Always use daemon |
off | Never use daemon (Stage 1 only) |
Information Options¶
--rewget-version¶
Print rewget version and exit.
--rewget-help¶
Print help message and exit.
--rewget-completions=SHELL¶
Generate shell completions.
| Shell | Value |
|---|---|
| Bash | bash |
| Zsh | zsh |
| Fish | fish |
| PowerShell | powershell |
File Locations¶
| File | Location | Description |
|---|---|---|
| Config file | ~/.config/rewget/config.toml | Optional persistent settings |
| Stage cache | ~/.cache/rewget/stage-cache.json | Domain → stage mapping |
| Profiles | ~/.local/share/rewget/profiles/ | Browser profile definitions |
| Chromium | ~/.local/share/rewget/chromium/ | Chrome for Testing installation |
Config File¶
rewget reads an optional TOML config file from ~/.config/rewget/config.toml. All sections and keys are optional. Missing values fall back to the built-in defaults shown below.
[fallback]
# Master switch. If false, rewget never escalates (acts like --rewget-no-fallback).
enabled = true
# HTTP status codes that trigger fallback.
codes = [403, 429, 503, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529]
# Scan response bodies for known challenge markers.
body_detection = true
[daemon]
# How long rewgetd stays alive after the last request (seconds).
idle_timeout = 300
# Number of pre-warmed Chromium contexts in the pool.
browser_pool_size = 2
[profiles]
# Default profile name when --rewget-profile is not given.
default = "chrome"
# Auto-update profiles on first run of the day.
auto_update = false
Configuration Precedence¶
- Command-line flags (highest priority)
- Environment variables (
RWGET_ENGINE) ~/.config/rewget/config.toml- Default values (lowest priority)