code: function (opts) {
          EventEmitter.call(this);
  
          this.host = opts.host;
          this.port = this._generateRandomPort(opts.ports);
          this._sshPort = opts.sshPort || DEFAULTS.SSH_PORT;
          this.user = opts.user;
          this.proxyHost = util.format('%s:%d', this.host, this.port);
          this.proxyUrl = this.proxyHost; // deprecated, use proxyHost
          this._localPort = opts.localport;
          this._connectTimeout = opts.connectTimeout || DEFAULTS.CONNECT_TIMEOUT;
          this._tunnel = null;
          this._tunnelDeferred = q.defer();
          this._closeDeferred = q.defer();
      }
docs: Constuctor
  @param {object} opts tunnel options
  @param {string} opts.host remote host address
  @param {object} opts.ports remote host ports range
  @param {number} opts.localport local port number
  @param {string} [opts.user] remote host user
  @param {string} [opts.sshPort=22] host port to create tunnel
  @param {number} [opts.maxRetries=5] max attempts to create tunnel
  @param {number} [opts.connectTimeout=10000] ssh connect timeout