From d10161c39a155ffc633dc739b8358f251b9e93f5 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Sat, 25 Sep 2021 19:12:33 +0800 Subject: [PATCH] feat: custom dns server --- load.sh | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/load.sh b/load.sh index f5e9449..f29b973 100755 --- a/load.sh +++ b/load.sh @@ -120,6 +120,18 @@ cat>$XRAY_DIR/config/inbounds.json<$CONFIG_DIR/dns.json<$CONFIG_DIR/outbounds.json<$CONFIG_DIR/routing.json<$CONFIG_DIR/dns.json<$ASSET_DIR/update.sh<<"EOF" GITHUB="github.com" @@ -244,6 +243,13 @@ if [ -n "$ipv6_forward" ]; then eval "sysctl -w net.ipv6.conf.all.forwarding=0" fi fi +if [ -s "$NETWORK_DIR/dns" ]; then + cat /dev/null > /etc/resolv.conf + while read -r row + do + echo "nameserver $row" >> /etc/resolv.conf + done < $NETWORK_DIR/dns +fi } load_ipv4(){