TG-Twilight / AWAvenue-Ads-Rule

开源社区中最优秀的广告过滤器列表之一,实现了最优秀的广告拦截、隐私保护和流量节省。支持各种常见的网络层广告拦截工具和代理工具等。 | Use Adblock syntax to fight against various advertising SDKs in Android applications from the network level , prevent them from loading.
https://AWAvenue.top
Other
2k stars 70 forks source link

能否增加 RouterOS 的适配规则? #49

Closed kiss2u closed 7 months ago

kiss2u commented 8 months ago

域名

RouterOS 适配文件后缀是 .rsc,类似于这样的:https://cdn.jsdelivr.net/gh/neoFelhz/neohosts@gh-pages/basic/mikrotik.rsc 秋风规则很精简,非常适合 RouterOS 这种性能不强的路由系统去广告,望大佬采纳。

效果说明

秋风规则很精简,非常适合 RouterOS 这种性能不强的路由系统去广告,望大佬采纳。

效果截图

No response

自查步骤

kiss2u commented 8 months ago

此外,我做了shell,可以自动处理,将hosts模式转换为 rsc 文件,共参考:

Shell文件如下:

!/bin/bash

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 "广告脚本处理成功!"

elysias123 commented 8 months ago

查阅 https://github.com/TG-Twilight/AWAvenue-Ads-Rule/tree/build/script 的readme 你可以写一份RouterOS的转换插件然后pr 语言为Python

kiss2u commented 8 months ago

查阅 https://github.com/TG-Twilight/AWAvenue-Ads-Rule/tree/build/script 的readme 你可以写一份RouterOS的转换插件然后pr 语言为Python

已发 PR

https://github.com/TG-Twilight/AWAvenue-Ads-Rule/pull/51

TG-Twilight commented 8 months ago

感谢你的提交,等有空了,相关的订阅会在我们的官方网站更新,当然,你也可以直接pr我们的官方网站项目

成为第一个pr的童鞋😁😁😁