From a89b51d5aab7a2a248194c4f4ae0203a6eb54e67 Mon Sep 17 00:00:00 2001 From: Gordon Hall Date: Tue, 15 Apr 2014 10:30:41 -0400 Subject: [PATCH] requiring socks5 client conditionally from connection constructor --- Connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Connection.js b/Connection.js index a9ff23d15..27a4fb618 100644 --- a/Connection.js +++ b/Connection.js @@ -10,7 +10,6 @@ var PROTOCOL_VERSION = 70000; var Binary = imports.Binary || require('binary'); var Put = imports.Put || require('bufferput'); var Buffers = imports.Buffers || require('buffers'); -var Socks5Client = imports.Socks5Client || require('socks5-client') require('./Buffers.monkey').patch(Buffers); var Block = require('./Block'); @@ -33,6 +32,7 @@ function Connection(socket, peer, opts) { // check for socks5 proxy options and construct a proxied socket if (this.options.proxy) { + var Socks5Client = imports.Socks5Client || require('socks5-client'); this.socket = new Socks5Client(opts.proxy.host, opts.proxy.port); }