Browse Source

feat: custom dns server

master
dnomd343 3 years ago
parent
commit
d10161c39a
  1. 32
      load.sh

32
load.sh

@ -120,6 +120,18 @@ cat>$XRAY_DIR/config/inbounds.json<<EOF
EOF
}
load_dns(){
cat>$CONFIG_DIR/dns.json<<EOF
{
"dns": {
"servers": [
"localhost"
]
}
}
EOF
}
load_outbounds(){
cat>$CONFIG_DIR/outbounds.json<<EOF
{
@ -157,19 +169,6 @@ cat>$CONFIG_DIR/routing.json<<EOF
EOF
}
load_dns(){
cat>$CONFIG_DIR/dns.json<<EOF
{
"dns": {
"servers": [
"localhost"
]
}
}
EOF
}
load_asset_update(){
cat>$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(){

Loading…
Cancel
Save