apify / proxy-chain

Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.
https://www.npmjs.com/package/proxy-chain
Apache License 2.0
834 stars 139 forks source link

proxy headers are using the array index as key #547

Closed mschfh closed 3 weeks ago

mschfh commented 4 weeks ago

The proxy receives headers with an array index as key:

CONNECT www.ifconfig.co:443 HTTP/1.1
0: host
1: www.ifconfig.co:443
2: proxy-authorization
3: Basic Zm9vOmJhcg==
Host: 192.168.1.1:1234
Connection: keep-alive

expected:

CONNECT www.ifconfig.co:443 HTTP/1.1
host: www.ifconfig.co:443
proxy-authorization: Basic Zm9vOmJhcg==
...

There was an attempt to fix this in #528, but the PR was abandoned.

mschfh commented 3 weeks ago

@jirimoravcik Could you please take a look at this one too?

jirimoravcik commented 3 weeks ago

Hey, can you please provide full reproduction example and the problem with it? We have been using the array structure for headers and it has been working for us. Also please provide packages used along with Node.js version.

mschfh commented 3 weeks ago

This issue was caused by the Sentry httpIntegration, it might not be a bug in proxy-chain.