Comparing version 2.0.1 to 2.1.0
@@ -187,5 +187,2 @@ "use strict"; | ||
} | ||
//if (server.localAddress) { | ||
// parsed.localAddress = server.localAddress; | ||
//} | ||
let gotResponse = false; | ||
@@ -196,2 +193,3 @@ const proxyReq = http.request({ | ||
headers, | ||
localAddress: this.localAddress | ||
}); | ||
@@ -369,3 +367,4 @@ debug.proxyRequest('%s %s HTTP/1.1 ', proxyReq.method, proxyReq.path); | ||
const port = parseInt(req.url.substring(lastColon + 1), 10); | ||
const opts = { host: host.replace(/^\[|\]$/g, ''), port }; | ||
const localAddress = this.localAddress; | ||
const opts = { host: host.replace(/^\[|\]$/g, ''), port, localAddress }; | ||
debug.proxyRequest('connecting to proxy target %o', opts); | ||
@@ -372,0 +371,0 @@ const target = net.connect(opts); |
@@ -5,2 +5,3 @@ /// <reference types="node" /> | ||
authenticate?: (req: http.IncomingMessage) => boolean | Promise<boolean>; | ||
localAddress?: string; | ||
} | ||
@@ -7,0 +8,0 @@ /** |
@@ -187,5 +187,2 @@ "use strict"; | ||
} | ||
//if (server.localAddress) { | ||
// parsed.localAddress = server.localAddress; | ||
//} | ||
let gotResponse = false; | ||
@@ -196,2 +193,3 @@ const proxyReq = http.request({ | ||
headers, | ||
localAddress: this.localAddress | ||
}); | ||
@@ -369,3 +367,4 @@ debug.proxyRequest('%s %s HTTP/1.1 ', proxyReq.method, proxyReq.path); | ||
const port = parseInt(req.url.substring(lastColon + 1), 10); | ||
const opts = { host: host.replace(/^\[|\]$/g, ''), port }; | ||
const localAddress = this.localAddress; | ||
const opts = { host: host.replace(/^\[|\]$/g, ''), port, localAddress }; | ||
debug.proxyRequest('connecting to proxy target %o', opts); | ||
@@ -372,0 +371,0 @@ const target = net.connect(opts); |
{ | ||
"name": "proxy", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "An HTTP proxy written with Node.js (think Squid)", | ||
@@ -5,0 +5,0 @@ "main": "./dist/proxy.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51126
894
6