Rule Providers

Rule Providers explains how local or remote rule sets keep large rule lists outside the main profile and easier to update.

Overview

Rule Providers load rules from external files or remote URLs. They keep large rule lists separate from the main profile and make updates easier.

Provider types

A provider can be classical rule text, domain-based rules, or IP-CIDR data depending on core support. The group using the provider must reference the provider name exactly.

Example

Support Checks

Update checks usually come from an unreachable URL, an HTML status response, wrong behavior type, unsupported format or file permission support checks.

Reference examples

These examples mirror the corresponding Chinese documentation page so the English page carries the same configuration material.

rule-providers:
  apple:
    behavior: "domain" # reference note
    type: http
    url: "url"
    # format: 'yaml' # or 'text'
    interval: 3600
    path: ./apple.yaml
  microsoft:
    behavior: "domain"
    type: file
    path: /microsoft.yaml

rules:
  - RULE-SET,apple,REJECT
  - RULE-SET,microsoft,policy
payload:
  - '.blogger.com'
  - '*.*.microsoft.com'
  - 'books.itunes.apple.com'
# comment
.blogger.com
*.*.microsoft.com
books.itunes.apple.com
payload:
  - '192.168.1.0/24'
  - '10.0.0.0.1/32'
# comment
192.168.1.0/24
10.0.0.0.1/32
payload:
  - DOMAIN-SUFFIX,google.com
  - DOMAIN-KEYWORD,google
  - DOMAIN,ad.com
  - SRC-IP-CIDR,192.168.1.201/32
  - IP-CIDR,127.0.0.0/8
  - GEOIP,CN
  - DST-PORT,80
  - SRC-PORT,7777
  # reference note
# comment
DOMAIN-SUFFIX,google.com
DOMAIN-KEYWORD,google
DOMAIN,ad.com
SRC-IP-CIDR,192.168.1.201/32
IP-CIDR,127.0.0.0/8
GEOIP,CN
DST-PORT,80
SRC-PORT,7777