apify / proxy-chain

Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.

Home Page:https://www.npmjs.com/package/proxy-chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avoid requiring the _http_common module

jancurn opened this issue · comments

Otherwise, the package is not usable from Electron. See apify/crawlee#522

The module is only needed for isInvalidHeader() in https://github.com/apifytech/proxy-chain/blob/master/src/tools.js#L2

Double-check that the HTTP header validation is compatible with Node.js' header validation (they change HTTP parser in version 12 I think, which has slightly different behavior), perhaps in unit tests we could test against Node's internal methods too, just to be sure.