code: function parseProxy(host) {
    const index = host.indexOf('@');
  
    if (index === -1) {
      const addr = IP.fromHostname(host, 1080);
      return {
        host: addr.host,
        port: addr.port
      };
    }
  
    const left = host.substring(0, index);
    const right = host.substring(index + 1);
  
    const parts = left.split(':');
    assert(parts.length > 1, 'Bad username and password.');
  
    const addr = IP.fromHostname(right, 1080);
  
    return {
      host: addr.host,
      port: addr.port,
      username: parts[0],
      password: parts[1]
    };
  }
docs: /*
  Helpers