Daryaft supports HTTP request customization in the CLI download and inspect flows.
| Flag | Description |
|---|---|
--proxy <url> |
HTTP or HTTPS proxy URL |
--header "Name: Value" |
Custom request header (repeatable) |
--user-agent <value> |
Override the default User-Agent header |
--username <value> |
HTTP Basic Auth username |
--password <value> |
HTTP Basic Auth password |
These flags apply to:
daryaft <url> ...(root download mode)daryaft download ...daryaft inspect ...- Single URL and batch downloads
- Dry-run output (with safe redaction)
These flags do not apply to:
- TUI download flows
daryaft config,daryaft update,daryaft doctor,daryaft version
As an alternative to CLI flags, credentials can be provided via environment variables:
| Variable | Description |
|---|---|
DARYAFT_USERNAME |
HTTP Basic Auth username fallback |
DARYAFT_PASSWORD |
HTTP Basic Auth password fallback |
CLI flag values always take priority over environment variables. The same validation rules apply: DARYAFT_PASSWORD without a username (from flags or DARYAFT_USERNAME) produces an error.
export DARYAFT_USERNAME=alice
export DARYAFT_PASSWORD=secret
daryaft download https://example.com/private.zipEnv credentials are redacted in all output, dry-run, and verbose modes exactly like flag credentials.
daryaft download https://example.com/file.zip --header "X-Request-ID: demo"daryaft download https://example.com/file.zip \
--header "X-Request-ID: demo" \
--header "Accept: application/octet-stream"daryaft download https://example.com/file.zip --user-agent "Daryaft/1.3"daryaft download https://example.com/file.zip --proxy http://127.0.0.1:8080daryaft download https://example.com/private.zip \
--username "$DARYAFT_USER" \
--password "$DARYAFT_PASSWORD"daryaft inspect https://example.com/private.zip \
--header "Authorization: Bearer $TOKEN"daryaft download https://example.com/private.zip \
--username alice \
--password secret \
--dry-runThe dry-run output shows username:[REDACTED] for auth and [REDACTED] for sensitive header values:
Daryaft download plan
URLs: 1
1. https://example.com/private.zip
Output: current directory
Filename: auto-detect
Retries: 3
Resume: true
HTTP
Auth: alice:[REDACTED]
Mode: dry-run only, no network request performed
- Proxy: scheme must be
httporhttps; SOCKS5 is not supported in v1.3.0. - Header: must use
Name: Valueformat; name must be a valid HTTP token; control characters rejected. - User-Agent:
--user-agentoverrides anyUser-Agentcustom header. - Basic Auth:
--passwordrequires--username.--usernamewith empty password is valid. Combining--username/--passwordwith a customAuthorizationheader is rejected.
- Shell history may store
--passwordvalues if passed directly. Prefer environment variables:--password "$DARYAFT_PASSWORD" - No credential storage, OAuth, cookie jar,
.netrc, or TUI auth is implemented in v1.3.0. - Proxy URL credentials (if embedded in the URL) are not redacted from shell history. Avoid embedding credentials in proxy URLs.
- SOCKS5 proxy is not supported in v1.3.0.
- TUI download and inspect flows do not support these flags in v1.3.0.
- No per-URL header overrides in batch downloads; all URLs receive the same headers.
- No SOCKS5 proxy support.
- No credential storage or
.netrcsupport.