Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ coverage
dist
node_modules
archive

.npmrc
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ crawler.send({
- [`proxies`](#proxies)
- [`proxy`](#proxy)
- [`http2`](#http2)
- [`autoSelectFamily`](#autoselectfamily)
- [`autoSelectFamilyAttemptTimeout`](#autoselectfamilyattempttimeout)
- [`referer`](#referer)
- [`userParams`](#userparams)
- [`preRequest`](#prerequest-1)
Expand Down Expand Up @@ -585,6 +587,20 @@ crawler.on("schedule", options => {
- **Default** : false
- If true, the request will be sent in the HTTP/2 protocol.

#### `autoSelectFamily`

- **Type:** `boolean`
- **Default** : true (Node default)
- Controls Node's "Happy Eyeballs", which races IPv6 and IPv4 when a host has both. Set to false on networks with broken or slow IPv6 to use a single family and avoid spurious `ETIMEDOUT` errors.
- **Note:** Node applies this as a process-wide default, so it affects all in-flight requests.

Comment on lines +595 to +596
#### `autoSelectFamilyAttemptTimeout`

- **Type:** `number`
- **Default** : 250 (Node default)
- How long, in milliseconds, "Happy Eyeballs" waits for one address before trying the next. Raise it (e.g. 5000) for high-latency hosts whose connection can't finish within 250ms, which otherwise fails with `ETIMEDOUT` before the working address responds.
- **Note:** Node applies this as a process-wide default, so it affects all in-flight requests.

Comment on lines +602 to +603
#### `referer`

- **Type:** `string`
Expand Down
Loading