Skip to content
/ policy Public

A CoreDNS plugin that supports domain name rules and can be used in conjunction with forward and acl.

License

Notifications You must be signed in to change notification settings

l1b0k/policy

Repository files navigation

policy

Name

policy - advanced DNS traffic management based on domain name policies.

Description

policy The policy plugin offers domain-based policy rules, it works like view plugin. It supports rule files in the Adblock Plus (ADB) format. You can combine with acl to do filter, or combine with forward to do forward.

Syntax

policy RULE_FILE {
    base64
    period PERIOD
    cache_dir CACHE_DIR
}
  • RULE_FILE: The path to the rule file. Could be a local file or a remote file ( http://example.local/rule.txt ).

  • base64: If set, the rule file is base64 encoded.

  • PERIOD: The period of time to reload the rule file. Useful for remote file. Unit: go format ("60m", "72h").

  • CACHE_DIR: If set ,will download remote file at this place. Also use this file on start up.

Examples

.:53 {
    errors
    ready

    policy /path/banner_list.txt
    
    acl . {
       block
    }
}

.:53 {
    errors
    ready

    policy /path/internal-domains.txt
    
    forward . tls://some-internal-upstream
}

.:53 {
    errors
    ready

    forward . tls://default-upstream
}

notes

You can not use policy and view in the same block.

About

A CoreDNS plugin that supports domain name rules and can be used in conjunction with forward and acl.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages