Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proxy-chain

Package Overview
Dependencies
Maintainers
6
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-chain - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

13

build/handler_forward.js

@@ -56,2 +56,6 @@ 'use strict';

var hostHeaderFound = false;
// TODO: We should probably use a raw HTTP message via socket instead of http.request(),
// since Node transforms the headers to lower case and thus makes it easy to detect the proxy
for (var i = 0; i < this.srcRequest.rawHeaders.length; i += 2) {

@@ -61,3 +65,3 @@ var headerName = this.srcRequest.rawHeaders[i];

if (headerName === 'Connection' && headerValue === 'keep-alive') {
if (/^connection$/i.test(headerName) && /^keep-alive$/i.test(headerValue)) {
// Keep the "Connection: keep-alive" header, to reduce the chance that the server

@@ -69,6 +73,11 @@ // will detect we're not a browser and also to improve performance

continue;
} else if (/^host$/i.test(headerName)) {
// If Host header was used multiple times, only consider the first one.
// This is to prevent "TypeError: hostHeader.startsWith is not a function at calculateServerName (_http_agent.js:240:20)"
if (hostHeaderFound) continue;
hostHeaderFound = true;
}
/*
if (!hasXForwardedFor && 'x-forwarded-for' === keyLower) {
if (!hasXForwardedFor && 'x-forwarded-for' === keyLower) {
// append to existing "X-Forwarded-For" header

@@ -75,0 +84,0 @@ // http://en.wikipedia.org/wiki/X-Forwarded-For

@@ -0,1 +1,6 @@

0.3.2 / 2019-09-17
===================
- Bugfix: Prevent the `"TypeError: hostHeader.startsWith is not a function` error
in `HandlerForward` by not forwarding duplicate `Host` headers
0.3.1 / 2019-09-07

@@ -2,0 +7,0 @@ ===================

2

package.json
{
"name": "proxy-chain",
"version": "0.3.1",
"version": "0.3.2",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",

@@ -5,0 +5,0 @@ "main": "build/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc