diff --git a/README.md b/README.md index d7ea8b1..a47a933 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Mosdns config and auto update shell script. ├── config.yaml # main config ├── custom_rules # user custon rule, has higher priority │   ├── block.txt # block rule +│   ├── ddns.txt # ddns rule, not cache if match │   ├── direct.txt # forward local rule │   ├── host.txt # host rule │   ├── proxy.txt # forward remote rule diff --git a/mosdnsv5/config.yaml b/mosdnsv5/config.yaml index bc6f630..08bc0d0 100755 --- a/mosdnsv5/config.yaml +++ b/mosdnsv5/config.yaml @@ -1,5 +1,5 @@ log: - level: debug # 日志级别。可选 "debug" "info" "warn" "error"。默认 "info"。 + level: info # 日志级别。可选 "debug" "info" "warn" "error"。默认 "info"。 file: '' # 记录日志到文件。默认输出至 stderr。 production: true # 纯 json 输出。 @@ -12,6 +12,14 @@ api: include: [] plugins: + - tag: ddns_domain + type: domain_set + args: + # exps: # 域名表达式。 + # - "qq.com" + files: + - ./custom_rules/ddns.txt + - tag: direct_domain type: domain_set args: @@ -129,7 +137,7 @@ plugins: # - exec: prefer_ipv4 - matches: - - '!qname ddns.doamin.com' + - '!qname $ddns_domain' exec: $mem_cache - matches: - has_resp diff --git a/mosdnsv5/custom_rules/ddns.txt b/mosdnsv5/custom_rules/ddns.txt new file mode 100644 index 0000000..e69de29