Skip to content

Commit

Permalink
requiring socks5 client conditionally from connection constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Hall committed Apr 15, 2014
1 parent 7b9e2e7 commit a89b51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
}

Expand Down

0 comments on commit a89b51d

Please sign in to comment.