Files
small-packages/oxidns/files/config.yaml
T
2026-09-22 18:42:30 +08:00

197 lines
4.8 KiB
YAML

log:
level: info
file: /tmp/run/oxidns/oxidns.log
rotation:
type: weekly
max_files: 1
api:
http:
listen: 0.0.0.0:9199
auth:
type: basic
username: admin
password: oxidns
webui:
root: /usr/share/oxidns/webui
index: index.html
plugins:
- tag: download_main
type: download
args:
downloads:
- url: https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/proxy-list.txt
dir: /etc/oxidns/rules
filename: proxy-list.txt
- url: https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt
dir: /etc/oxidns/rules
filename: gfw.txt
- url: https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/reject-list.txt
dir: /etc/oxidns/rules
filename: reject-list.txt
- url: https://anti-ad.net/easylist.txt
dir: /etc/oxidns/rules
filename: easylist.txt
timeout: 30s
startup_if_missing: true
- tag: proxy_domains
type: domain_set
args:
files:
- /etc/oxidns/rules/proxy-list.txt
- /etc/oxidns/rules/gfw.txt
- tag: ad_rules
type: adguard_rule
args:
files:
- /etc/oxidns/rules/reject-list.txt
- /etc/oxidns/rules/easylist.txt
- tag: reload_download_rules
type: reload_provider
args:
- $proxy_domains
- $ad_rules
- tag: subscription_refresh
type: sequence
args:
- exec: $download_main
- exec: $reload_download_rules
- tag: subscription_cron
type: cron
args:
timezone: Asia/Shanghai
jobs:
- name: refresh_download_rules
interval: 168h
executors:
- $subscription_refresh
- tag: local_hosts
type: hosts
args:
entries:
- translate.googleapis.com 120.26.207.106
- translate-pa.googleapis.com 120.26.207.106
- share.dmhy.org 172.67.98.15
short_circuit: true
- tag: blocked
type: sequence
args:
- exec: "black_hole 0.0.0.0 ::"
- exec: accept
- tag: cache_main
type: cache
args:
size: 8192
short_circuit: true
cache_negative: true
- tag: prefer_ipv4_main
type: prefer_ipv4
args:
cache: true
cache_ttl: 3600
- tag: forward_local
type: forward
args:
concurrent: 2
upstreams:
- tag: alidns_dns
addr: https://223.5.5.5/dns-query
port: 443
idle_timeout: 30
max_conns: 256
insecure_skip_verify: false
timeout: 5s
enable_pipeline: false
enable_http3: true
- tag: dnspod_dns
addr: https://1.12.12.12/dns-query
port: 443
idle_timeout: 30
max_conns: 256
insecure_skip_verify: false
timeout: 5s
enable_pipeline: false
enable_http3: false
short_circuit: true
- tag: forward_remote
type: forward
args:
concurrent: 2
upstreams:
- tag: google_dns
addr: https://8.8.8.8/dns-query
port: 443
idle_timeout: 30
max_conns: 256
insecure_skip_verify: false
timeout: 3s
enable_http3: false
- tag: cloudflare_dns
addr: https://1.1.1.1/dns-query
port: 443
idle_timeout: 30
max_conns: 256
insecure_skip_verify: false
enable_http3: false
short_circuit: true
- tag: forward_remote_proxy
type: forward
args:
concurrent: 2
upstreams:
- tag: google_dns
addr: https://8.8.8.8/dns-query
port: 443
socks5: 10.0.0.1:1080
idle_timeout: 30
max_conns: 256
insecure_skip_verify: false
timeout: 3s
enable_http3: false
- tag: cloudflare_dns
addr: https://1.1.1.1/dns-query
port: 443
socks5: 10.0.0.1:1080
idle_timeout: 30
max_conns: 256
insecure_skip_verify: false
enable_http3: false
short_circuit: true
- tag: forward_remote_fallback_main
type: fallback
args:
primary: forward_remote
secondary: forward_remote_proxy
threshold: 150
always_standby: true
short_circuit: true
- tag: main_sequence
type: sequence
args:
- exec: $local_hosts
- matches: question $ad_rules
exec: goto blocked
- exec: $cache_main
- exec: $prefer_ipv4_main
- matches: qname $proxy_domains
exec: $forward_remote_fallback_main
- matches: "!has_resp"
exec: $forward_local
- tag: udp_server
type: udp_server
args:
entry: main_sequence
listen: :5353
- tag: tcp_server
type: tcp_server
args:
entry: main_sequence
listen: :5353