Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.33 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.33 KB

English | 简体中文

一个在Debian(或衍生版)上安装mosdns的shell脚本。

2023-3-19更新:兼容V5,要安装之前的就砍掉重练吧。

重要!先决条件:需要事先为DNS服务器做好IP分流。

有关更多详细信息,请参阅此仓库

独立安装 (amd64 & arm64):

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/AutoSetup.sh)

可选:每天7:00自动更新各种列表,crontab -e 后添加:

0 7 * * * bash /opt/mosdns/update-geo.sh  >> /var/log/cron.log 2>&1

保存退出。

更新资源文件:

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/update-geo.sh)

只更新可执行二进制:

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/update-bin.sh)

卸载:

bash <(curl -Ls https://raw.githubusercontent.com/allanchen2019/mosdns-debian-install/v5/uninstall.sh)

如不能正常安装,请先重置DNS:

rm -rf /etc/resolv.conf
cat << EOF >/etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
EOF
systemctl enable systemd-resolved.service
systemctl restart systemd-resolved.service
cd ~