proxy-agent
Advanced tools
Comparing version 3.1.0 to 3.1.1
{ | ||
"name": "proxy-agent", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Maps proxy protocols to `http.Agent` implementations", | ||
@@ -33,7 +33,7 @@ "main": "index.js", | ||
"agent-base": "^4.2.0", | ||
"debug": "^3.1.0", | ||
"debug": "4", | ||
"http-proxy-agent": "^2.1.0", | ||
"https-proxy-agent": "^2.2.1", | ||
"lru-cache": "^4.1.2", | ||
"pac-proxy-agent": "^3.0.0", | ||
"https-proxy-agent": "^3.0.0", | ||
"lru-cache": "^5.1.1", | ||
"pac-proxy-agent": "^3.0.1", | ||
"proxy-from-env": "^1.0.0", | ||
@@ -44,4 +44,4 @@ "socks-proxy-agent": "^4.0.1" | ||
"@types/agent-base": "^4.2.0", | ||
"mocha": "^5.0.5", | ||
"proxy": "0.2.4", | ||
"mocha": "^6.2.1", | ||
"proxy": "^1.0.1", | ||
"socksv5": "0.0.6", | ||
@@ -48,0 +48,0 @@ "stream-to-buffer": "0.1.0" |
@@ -84,24 +84,29 @@ | ||
after(function (done) { | ||
socksServer.once('close', function () { done(); }); | ||
//socksServer.once('close', function () { done(); }); | ||
socksServer.close(); | ||
done(); | ||
}); | ||
after(function (done) { | ||
httpServer.once('close', function () { done(); }); | ||
//httpServer.once('close', function () { done(); }); | ||
httpServer.close(); | ||
done(); | ||
}); | ||
after(function (done) { | ||
httpsServer.once('close', function () { done(); }); | ||
//httpsServer.once('close', function () { done(); }); | ||
httpsServer.close(); | ||
done(); | ||
}); | ||
after(function (done) { | ||
proxyServer.once('close', function () { done(); }); | ||
//proxyServer.once('close', function () { done(); }); | ||
proxyServer.close(); | ||
done(); | ||
}); | ||
after(function (done) { | ||
proxyHttpsServer.once('close', function () { done(); }); | ||
//proxyHttpsServer.once('close', function () { done(); }); | ||
proxyHttpsServer.close(); | ||
done(); | ||
}); | ||
@@ -143,6 +148,6 @@ | ||
var uri = 'http://127.0.0.1:' + proxyPort; | ||
var uri = 'http://localhost:' + proxyPort; | ||
var agent = new ProxyAgent(uri); | ||
var opts = url.parse('http://127.0.0.1:' + httpPort + '/test'); | ||
var opts = url.parse('http://localhost:' + httpPort + '/test'); | ||
opts.agent = agent; | ||
@@ -154,3 +159,3 @@ | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpPort, data.host); | ||
assert.equal('localhost:' + httpPort, data.host); | ||
assert('via' in data); | ||
@@ -170,6 +175,6 @@ done(); | ||
process.env.HTTP_PROXY = 'http://127.0.0.1:' + proxyPort; | ||
process.env.HTTP_PROXY = 'http://localhost:' + proxyPort; | ||
var agent = new ProxyAgent(); | ||
var opts = url.parse('http://127.0.0.1:' + httpPort + '/test'); | ||
var opts = url.parse('http://localhost:' + httpPort + '/test'); | ||
opts.agent = agent; | ||
@@ -181,3 +186,3 @@ | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpPort, data.host); | ||
assert.equal('localhost:' + httpPort, data.host); | ||
assert('via' in data); | ||
@@ -200,3 +205,3 @@ done(); | ||
var opts = url.parse('http://127.0.0.1:' + httpPort + '/test'); | ||
var opts = url.parse('http://localhost:' + httpPort + '/test'); | ||
opts.agent = agent; | ||
@@ -208,3 +213,3 @@ | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpPort, data.host); | ||
assert.equal('localhost:' + httpPort, data.host); | ||
assert(!('via' in data)); | ||
@@ -224,3 +229,3 @@ done(); | ||
var uri = 'https://127.0.0.1:' + proxyHttpsPort; | ||
var uri = 'https://localhost:' + proxyHttpsPort; | ||
var proxy = url.parse(uri); | ||
@@ -230,3 +235,3 @@ proxy.rejectUnauthorized = false; | ||
var opts = url.parse('http://127.0.0.1:' + httpPort + '/test'); | ||
var opts = url.parse('http://localhost:' + httpPort + '/test'); | ||
opts.agent = agent; | ||
@@ -238,3 +243,3 @@ | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpPort, data.host); | ||
assert.equal('localhost:' + httpPort, data.host); | ||
assert('via' in data); | ||
@@ -254,6 +259,6 @@ done(); | ||
var uri = 'socks://127.0.0.1:' + socksPort; | ||
var uri = 'socks://localhost:' + socksPort; | ||
var agent = new ProxyAgent(uri); | ||
var opts = url.parse('http://127.0.0.1:' + httpPort + '/test'); | ||
var opts = url.parse('http://localhost:' + httpPort + '/test'); | ||
opts.agent = agent; | ||
@@ -265,3 +270,3 @@ | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpPort, data.host); | ||
assert.equal('localhost:' + httpPort, data.host); | ||
done(); | ||
@@ -282,6 +287,6 @@ }); | ||
var uri = 'http://127.0.0.1:' + proxyPort; | ||
var uri = 'http://localhost:' + proxyPort; | ||
var agent = new ProxyAgent(uri); | ||
var opts = url.parse('https://127.0.0.1:' + httpsPort + '/test'); | ||
var opts = url.parse('https://localhost:' + httpsPort + '/test'); | ||
opts.agent = agent; | ||
@@ -294,3 +299,3 @@ opts.rejectUnauthorized = false; | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpsPort, data.host); | ||
assert.equal('localhost:' + httpsPort, data.host); | ||
done(); | ||
@@ -313,3 +318,3 @@ }); | ||
protocol: 'https:', | ||
host: '127.0.0.1', | ||
host: 'localhost', | ||
port: proxyHttpsPort, | ||
@@ -319,3 +324,3 @@ rejectUnauthorized: false | ||
var opts = url.parse('https://127.0.0.1:' + httpsPort + '/test'); | ||
var opts = url.parse('https://localhost:' + httpsPort + '/test'); | ||
opts.agent = agent; | ||
@@ -328,3 +333,3 @@ opts.rejectUnauthorized = false; | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpsPort, data.host); | ||
assert.equal('localhost:' + httpsPort, data.host); | ||
assert(gotReq); | ||
@@ -346,6 +351,6 @@ done(); | ||
var uri = 'socks://127.0.0.1:' + socksPort; | ||
var uri = 'socks://localhost:' + socksPort; | ||
var agent = new ProxyAgent(uri); | ||
var opts = url.parse('https://127.0.0.1:' + httpsPort + '/test'); | ||
var opts = url.parse('https://localhost:' + httpsPort + '/test'); | ||
opts.agent = agent; | ||
@@ -358,3 +363,3 @@ opts.rejectUnauthorized = false; | ||
var data = JSON.parse(buf.toString('utf8')); | ||
assert.equal('127.0.0.1:' + httpsPort, data.host); | ||
assert.equal('localhost:' + httpsPort, data.host); | ||
assert(gotReq); | ||
@@ -361,0 +366,0 @@ done(); |
24913
482
+ Addedlru-cache@5.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedhttps-proxy-agent@2.2.4(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedms@2.1.3(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedyallist@2.1.2(transitive)
Updateddebug@4
Updatedhttps-proxy-agent@^3.0.0
Updatedlru-cache@^5.1.1
Updatedpac-proxy-agent@^3.0.1