diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 4841e4bf..67a7b05b 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -74,18 +74,19 @@ var Blockchain = function(options) { this.client = new options.client({config: this.config, env: this.env, isDev: this.isDev}); }; -Blockchain.prototype.setupProxy = function(){ - if(this.blockchainConfig.proxy){ - const proxy = require('../../core/proxy'); - const Ipc = require('../../core/ipc'); - - let ipcObject = new Ipc({ipcRole: 'client'}); - - proxy.serve(ipcObject, this.config.rpcHost, this.config.rpcPort, false); - proxy.serve(ipcObject, this.config.wsHost, this.config.wsPort, true); - this.config.rpcPort += 10; - this.config.wsPort += 10; +Blockchain.prototype.setupProxy = function() { + if (this.blockchainConfig.proxy === false) { + return; } + const proxy = require('../../core/proxy'); + const Ipc = require('../../core/ipc'); + + let ipcObject = new Ipc({ipcRole: 'client'}); + + proxy.serve(ipcObject, this.config.rpcHost, this.config.rpcPort, false); + proxy.serve(ipcObject, this.config.wsHost, this.config.wsPort, true); + this.config.rpcPort += 10; + this.config.wsPort += 10; }; Blockchain.prototype.runCommand = function(cmd, options, callback) {