src/core/acl.js
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;
}
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;
}
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 ; }
rule's methods
rule s methods