Closed kiss2u closed 7 months ago
此外,我做了shell,可以自动处理,将hosts模式转换为 rsc 文件,共参考:
Shell文件如下:
websites=( "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-hosts.txt" "https://jsd.onmicrosoft.cn/gh/TG-Twilight/AWAvenue-Ads-Rule@main/Filters/AWAvenue-Ads-Rule-hosts.txt" "https://gcore.jsdelivr.net/gh/TG-Twilight/AWAvenue-Ads-Rule@main/Filters/AWAvenue-Ads-Rule-hosts.txt" "https://mirror.ghproxy.com/https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-hosts.txt" )
for website in "${websites[@]}"; do echo "正在尝试从 $website 下载 ad.txt 文件..." curl -sL "$website" -o "ad.txt" if [ $? -eq 0 ]; then echo "下载 ad.txt 文件成功!" break else echo "下载 ad.txt 文件失败,请重试..." fi done
if [ ! -f "ad.txt" ]; then echo "无法从网站中获取球风脚本,请重试..." exit 1 fi
echo "正在处理 ad.txt 文件..." sed -i '/localhost/d' "ad.txt" sed -i 's/127.0.0.1 /ip dns static add address=240.0.0.1 name=/g' "ad.txt" mv ad.txt ad.rsc
echo "广告脚本处理成功!"
查阅 https://github.com/TG-Twilight/AWAvenue-Ads-Rule/tree/build/script 的readme 你可以写一份RouterOS的转换插件然后pr 语言为Python
查阅 https://github.com/TG-Twilight/AWAvenue-Ads-Rule/tree/build/script 的readme 你可以写一份RouterOS的转换插件然后pr 语言为Python
已发 PR
域名
RouterOS 适配文件后缀是 .rsc,类似于这样的:https://cdn.jsdelivr.net/gh/neoFelhz/neohosts@gh-pages/basic/mikrotik.rsc 秋风规则很精简,非常适合 RouterOS 这种性能不强的路由系统去广告,望大佬采纳。
效果说明
秋风规则很精简,非常适合 RouterOS 这种性能不强的路由系统去广告,望大佬采纳。
效果截图
No response
自查步骤