From 7e26d27744e9042cc82b8b01d455c64ca648bdc2 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Thu, 27 May 2021 22:53:00 +0800 Subject: [PATCH] update: add dns object --- README.md | 22 ++++++++++++++++------ load.sh | 23 ++++++++++++++++++----- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1f5ce8d..bb83273 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,12 @@ shell> docker ps -a } ``` -`routeing.json` 默认配置将全部流量交由 `node` 接口,即 `outbounds.json` 中的 `freedom` 出口,具体语法见[Xray文档](https://xtls.github.io/config/base/routing/) +`routing.json` 默认配置将全部流量交由 `node` 接口,即 `outbounds.json` 中的 `freedom` 出口,具体语法见[Xray文档](https://xtls.github.io/config/base/routing/) ``` { "routing": { - "domainStrategy": "AsIs", + "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", @@ -98,10 +98,7 @@ shell> docker ps -a }, { "type": "field", - "ip": [ - "0.0.0.0/0", - "::/0" - ], + "network": "tcp,udp" "outboundTag": "node" } ] @@ -109,6 +106,19 @@ shell> docker ps -a } ``` +`dns.json` 指定路由匹配时的DNS服务器,具体语法见[Xray文档](https://xtls.github.io/config/base/dns/) + +``` +{ + "dns": { + "servers": [ + "223.5.5.5", + "119.29.29.29" + ] + } +} +``` + `segment` 文件夹下默认存储 `ipv4` 与 `ipv6` 两个文件,其中存储不代理的网段信息,建议绕过内网地址、本地回环地址、链路本地地址、组播地址等网段 ``` diff --git a/load.sh b/load.sh index a45bb75..d525b2a 100755 --- a/load.sh +++ b/load.sh @@ -111,7 +111,7 @@ load_routing(){ cat>$XRAY_DIR/expose/routing.json<$XRAY_DIR/expose/routing.json<$XRAY_DIR/expose/routing.json<$XRAY_DIR/expose/dns.json<$XRAY_DIR/expose/segment/ipv4<