Mirror the wiki content into a docs/ tree so GitBook Git Sync can connect to this repo. Adds SUMMARY.md for the table of contents, .gitbook.yaml pointing GitBook at docs/, and converts wiki page links to relative .md paths.
84 lines
2.5 KiB
Markdown
84 lines
2.5 KiB
Markdown
## Runtime
|
|
|
|
### `OBSCURA_ALLOW_PRIVATE_NETWORK`
|
|
|
|
Allow fetches to loopback (`127.0.0.0/8`), RFC1918 (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`), and link-local (`169.254.0.0/16`) addresses. Off by default to block SSRF.
|
|
|
|
Truthy values: `1`, `true`, `yes`, `on`.
|
|
|
|
```bash
|
|
OBSCURA_ALLOW_PRIVATE_NETWORK=1 obscura fetch http://localhost:8080
|
|
```
|
|
|
|
Per-process equivalent: `--allow-private-network` on any subcommand.
|
|
|
|
### `OBSCURA_NAV_TIMEOUT_MS`
|
|
|
|
Hard ceiling on a single navigation. Default 30000 (30 seconds). Applies to `Page.navigate` and the CLI `fetch` command.
|
|
|
|
```bash
|
|
OBSCURA_NAV_TIMEOUT_MS=60000 obscura serve
|
|
```
|
|
|
|
### `OBSCURA_CDP_COMMAND_TIMEOUT_MS`
|
|
|
|
Per-command deadline for the CDP server. A hung page (a runaway `Runtime.evaluate`, a synchronous DOM op) is terminated after this budget so one bad session cannot hold the shared V8 lock and stall the others. Default 60000 (60 seconds); `0` disables it. Navigation self-bounds via `OBSCURA_NAV_TIMEOUT_MS` well under this.
|
|
|
|
```bash
|
|
OBSCURA_CDP_COMMAND_TIMEOUT_MS=30000 obscura serve
|
|
```
|
|
|
|
### `OBSCURA_FETCH_TIMEOUT_MS`
|
|
|
|
Request timeout for scripted `fetch()`, `XMLHttpRequest`, and ES-module loads. Without it a request to a server that accepts the connection but never responds (including a CORS preflight) hangs forever and the XHR is stuck with no completion event. Default 30000 (30 seconds).
|
|
|
|
```bash
|
|
OBSCURA_FETCH_TIMEOUT_MS=15000 obscura serve
|
|
```
|
|
|
|
### `OBSCURA_PROXY`
|
|
|
|
Default proxy URL used by `obscura-worker` for the parallel `scrape` command when no `--proxy` flag is set.
|
|
|
|
```bash
|
|
OBSCURA_PROXY=http://proxy.example.com:8080 obscura scrape - < urls.txt
|
|
```
|
|
|
|
## Logging
|
|
|
|
### `RUST_LOG`
|
|
|
|
Standard `tracing` filter. Common settings:
|
|
|
|
```bash
|
|
RUST_LOG=obscura=info obscura serve
|
|
RUST_LOG=obscura=debug obscura serve
|
|
RUST_LOG=obscura_cdp=trace,obscura_browser=debug obscura serve
|
|
```
|
|
|
|
`--verbose` on the CLI is equivalent to `RUST_LOG=obscura=info`.
|
|
|
|
## Build
|
|
|
|
### `OPENSSL_NO_VENDOR`
|
|
|
|
Forces `cargo build` to use the system OpenSSL instead of compiling the vendored copy. Set to `1` on hosts where the vendored OpenSSL fails (older VPS with AVX-512 issues).
|
|
|
|
```bash
|
|
OPENSSL_NO_VENDOR=1 cargo build --release
|
|
```
|
|
|
|
## V8
|
|
|
|
V8 flags are passed via `--v8-flags`, not environment variables:
|
|
|
|
```bash
|
|
obscura serve --v8-flags "--max-old-space-size=2048 --expose-gc"
|
|
```
|
|
|
|
Default heap is 4 GB on 64-bit systems.
|
|
|
|
## HTTP proxy environment
|
|
|
|
Obscura does not honor `HTTP_PROXY` / `HTTPS_PROXY` / `NO_PROXY`. Use `--proxy` or `OBSCURA_PROXY`.
|