code: function ruleIsMatch(host, port) {
    const { host: rHost, port: rPort } = this;
    const slashIndex = rHost.indexOf('/');
  
    let isHostMatch = false;
    if (slashIndex !== -1 && net.isIP(host)) {
      isHostMatch = ip.cidrSubnet(rHost).contains(host);
    } else {
      isHostMatch = (rHost === host);
    }
  
    if (rHost === '*' || isHostMatch) {
      if (rPort === '*' || port === rPort) {
        return true;
      }
    }
    return false;
  }
docs: rule's methods