proxying-agent
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -14,7 +14,6 @@ 'use strict'; | ||
this.options.proxy = url.parse(this.options.proxy); | ||
this.options.server = url.parse(this.options.server); | ||
this.options.tunnel = this.options.tunnel || false; | ||
this.options.ssl = this.options.proxy.protocol ? this.options.proxy.protocol.toLowerCase() == 'https:' : false; | ||
this.options.tunnel = this.options.server.protocol ? this.options.server.protocol.toLowerCase() == 'https:' : false; | ||
this.options.host = this.options.proxy.hostname; | ||
this.options.port = this.options.proxy.port; | ||
this.options.port = this.options.proxy.port || (this.options.ssl ? 443 : 80); | ||
@@ -25,7 +24,5 @@ // select the Agent type to use based on the proxy protocol | ||
this.options.agent = https.globalAgent; | ||
this.options.port = this.options.port || 443; | ||
} else { | ||
this.agent = http.Agent; | ||
this.options.agent = http.globalAgent; | ||
this.options.port = this.options.port || 80; | ||
} | ||
@@ -32,0 +29,0 @@ this.agent.call(this, this.options); |
{ | ||
"name": "proxying-agent", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Node HTTP/HTTPS Forward Proxy Agent", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -24,3 +24,3 @@ # Node HTTP/HTTPS Forward Proxy Agent | ||
proxy: 'http://username:password@proxy.example.com:8080', | ||
server: 'https://server.example.com:443' | ||
tunnel: true | ||
}; | ||
@@ -40,4 +40,3 @@ var proxyingAgent = new proxying.ProxyingAgent(proxyingOptions); | ||
in the form of a Base64 encoded ``user:password``, e.g. ``http://dXNlcm5hbWU6cGFzc3dvcmQ=@proxy.example.com:8080`` | ||
* ``server`` - the target server the proxy will connect to. This is primarily used to determine if the proxy should | ||
be a tunneling proxy, which will only be true if the target server protocol is https | ||
* ``tunnel`` - If ``true`` then the proxy will become a tunnel to the server. This should only be ``true`` if the target server protocol is https | ||
* ``ntlm`` - (experimental) connect to the proxy using NTLM authentication. ``ntlm`` is expected to contain the | ||
@@ -44,0 +43,0 @@ following fields: |
10560
229
47