aboutsummaryrefslogtreecommitdiffstats
path: root/etc/dae/config.dae
diff options
context:
space:
mode:
authorshu <nvcsadjkojf@outlook.com>2026-10-27 15:35:47 +0800
committershu <nvcsadjkojf@outlook.com>2026-10-27 15:35:47 +0800
commit44d1af8b4e51d7c0fe9d9ecbb2f20d64cb34f095 (patch)
tree1ea732b5016001660113c3a0782c0ecb82f23689 /etc/dae/config.dae
parentafa43622a2b0d6322f5ade9fc8231e5540a96736 (diff)
按照需求梳理脚本功能
Diffstat (limited to 'etc/dae/config.dae')
-rw-r--r--etc/dae/config.dae64
1 files changed, 64 insertions, 0 deletions
diff --git a/etc/dae/config.dae b/etc/dae/config.dae
new file mode 100644
index 0000000..a6a26ac
--- /dev/null
+++ b/etc/dae/config.dae
@@ -0,0 +1,64 @@
+global {
+ wan_interface: auto
+ auto_config_kernel_parameter: true
+ log_level: info
+
+ # Keep the original domain when dialing through the proxy. This also makes
+ # domain-based routing independent from the IP returned by the local DNS.
+ dial_mode: domain
+ allow_insecure: false
+}
+
+# Reuse the local Shadowsocks SOCKS5 listener instead of duplicating the
+# remote server address and password in this configuration.
+node {
+ # local_ss: 'socks5://127.0.0.1:8888'
+
+ # Direct Shadowsocks node example using the SIP002 URI format. Replace the
+ # cipher, password, host, and port, then uncomment it. Base64 is encoding,
+ # not encryption, so keep the real link under secret/.
+ # example_ss: 'ss://YWVzLTEyOC1nY206dGVzdA@example.com:8388#example-ss'
+ ss: 'ss://aes-256-gcm:xxxxxxxxxx@xxxx:1234'
+}
+
+group {
+ proxy {
+ filter: name(ss)
+ policy: fixed(0)
+ }
+}
+
+# Let dae observe DNS queries so that routing rules can match domain names.
+dns {
+ upstream {
+ router: 'udp://192.168.8.1:53'
+ direct_dns: 'tcp+udp://223.5.5.5:53'
+ }
+
+ routing {
+ request {
+ qname(suffix: l) -> router
+ qname(suffix: lan) -> router
+ fallback: direct_dns
+ }
+
+ response {
+ fallback: accept
+ }
+ }
+}
+
+routing {
+ # Shadowsocks must reach its remote server directly to avoid a proxy loop.
+ pname(sslocal) -> direct
+
+ # Keep local, multicast, and other private destinations direct.
+ dip(224.0.0.0/3, 'ff00::/8') -> direct
+ dip(geoip:private) -> direct
+
+ # Route mainland China IPs directly. Everything else uses the proxy, so
+ # overseas destinations do not need to be maintained in a domain list.
+ dip(geoip:cn) -> direct
+
+ fallback: proxy
+} \ No newline at end of file