socks-wrapper
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -209,6 +209,7 @@ 'use strict'; | ||
https.Agent.call(this, options); | ||
this.createConnection = function(options) { | ||
options.port = options.port || 443; | ||
options.socket = new Socks5Wrapper(port, host).connect(options); | ||
return tls.connect(options) | ||
this.addRequest = (req, opts) => { | ||
req._last = true; | ||
req.shouldKeepAlive = false; | ||
const socket = tls.connect({ serverName: opts.hostname, rejectUnauthorized: opts.rejectUnauthorized, socket: new Socks5Wrapper(port, host).connect(opts) }) | ||
req.onSocket(socket) | ||
} | ||
@@ -215,0 +216,0 @@ } |
{ | ||
"name": "socks-wrapper", | ||
"description": "Wrapping net.Socket to work with SOCKS proxies", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "Weidong Fang <wdfang@gmail.com>", |
11781
4
197