We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
参考 https://pymumu.github.io/smartdns/config/ad-block/
参考脚本
#!/bin/bash # 定义URL、下载文件名以及目标配置文件路径 URL="https://gcore.jsdelivr.net/gh/217heidai/adblockfilters@main/rules/adblockdnsmasq.txt" DOWNLOAD_FILE="/tmp/adblockdnsmasq.txt" CONFIG_FILE_PATH="/etc/smartdns/conf.d/adblockfilters.conf" # 清空目标配置文件,确保不会累加 > $CONFIG_FILE_PATH # 下载文件到临时文件中 echo "Fetching the latest adblock filter rules from: $URL" wget -qO- $URL > $DOWNLOAD_FILE # 使用cat, grep和awk处理文件并保存到配置文件中 cat $DOWNLOAD_FILE | grep local= | awk -F= '{print "address "$2"#"}' >> $CONFIG_FILE_PATH echo "Configuration file updated successfully."
The text was updated successfully, but these errors were encountered:
已支持,试下规则 5
Sorry, something went wrong.
No branches or pull requests
参考 https://pymumu.github.io/smartdns/config/ad-block/
参考脚本
The text was updated successfully, but these errors were encountered: