Skip to content

Commit

Permalink
feat: add ddns config (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
picopock authored Mar 16, 2023
1 parent 26310d1 commit b5a5478
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions mosdnsv5/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
log:
level: debug # 日志级别。可选 "debug" "info" "warn" "error"。默认 "info"。
level: info # 日志级别。可选 "debug" "info" "warn" "error"。默认 "info"。
file: '' # 记录日志到文件。默认输出至 stderr。
production: true # 纯 json 输出。

Expand All @@ -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:
Expand Down Expand Up @@ -129,7 +137,7 @@ plugins:
# - exec: prefer_ipv4

- matches:
- '!qname ddns.doamin.com'
- '!qname $ddns_domain'
exec: $mem_cache
- matches:
- has_resp
Expand Down
Empty file added mosdnsv5/custom_rules/ddns.txt
Empty file.

0 comments on commit b5a5478

Please sign in to comment.