├── .github └── workflows │ └── merge-files.yml ├── LICENSE ├── README.md ├── add.txt └── merge.sh /.github/workflows/merge-files.yml: -------------------------------------------------------------------------------- 1 | name: Merge Files Workflow 2 | on: 3 | push: 4 | paths: 5 | - 'add.txt' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | update: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | 14 | - name: Update Rules 15 | continue-on-error: true 16 | run: | 17 | bash ./merge.sh 18 | 19 | - name: Git push assets to Github 20 | run: | 21 | git init 22 | git config --local user.email "lkjpoikk@163.com" 23 | git config --local user.name "guanmengkai" 24 | git branch -m main 25 | git add --all 26 | git commit -m "Updated at $(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')(北京时间)" 27 | git push -u origin -f 28 | 29 | - name: Delete workflow runs 30 | uses: Mattraks/delete-workflow-runs@main 31 | with: 32 | token: ${{ secrets.GITHUB_TOKEN }} 33 | repository: ${{ github.repository }} 34 | retain_days: 0 35 | keep_minimum_runs: 0 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 guandasheng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

TheBestAdrules

3 |

TheBestAdrules,适用于Adguard Home的去广告dns规则,由关圣整理上游优秀的规则,合并去重而来,集百家之所长,取其精华去其糟粕。 关圣DNS官网https://dns.dns1.top 官方微信群及QQ群见官网公布。 4 | 关圣DNS,一个人人可加入的公益去广告dns团队,目前拥有7条公益dns节点。 捐赠,或者提供服务器均可加入“关圣爱发电”团队。 由于目前网络上发布的规则众多,逐个添加难免有重复的,而且不方便维护,因此创建此仓库,方便关圣云更新dns规则,也可以方便其他自建dns的小伙伴一键导入。 5 |

6 | 7 |

8 | 9 | last update 10 | 11 | 12 | forks 13 | 14 | 15 | stars 16 | 17 | 18 | open issues 19 | 20 | 21 | license 22 | 23 |

24 | 25 |

26 | 规则订阅 27 | · 28 | 上游列表 29 | · 30 | 拦截效果 31 | · 32 | 完善项目 33 |

34 | 35 |
36 | 37 |

🎯 规则订阅

38 | 39 | ``` 40 | 由关圣云手动更新整理,赞助后,加“关圣云®爱发电”微信群获取最新可用规则 41 | ``` 42 |
43 | 规则列表 44 | 54 |
55 | 56 | 57 | 58 |

🚫 拦截效果

59 | 60 | [AdBlock Tester](https://adblock-tester.com) 61 | 62 | [Block Ads! Adblock test](https://blockads.fivefilters.org/) 63 | 64 | [Ad Blocker Test](https://d3ward.github.io/toolz/adblock.html) 65 | 66 |

💬 完善项目

67 | 68 | 大家可以提交 Issue (不及时) 69 | 或者加入微信QQ群(及时) 70 | QQ群号786113957 71 | 微信群加gmk2099备注dns 72 | 来帮助我完善规则 我审核之后会加入到规则,如果规则有误杀我会尽快处理 73 | 74 | 75 | 76 | **提交范围** 77 | 78 | - 漏拦截的广告 79 | - 误杀的网站 80 | 81 | 82 | -------------------------------------------------------------------------------- /add.txt: -------------------------------------------------------------------------------- 1 | @@||p.qlogo.cn^$important 2 | -------------------------------------------------------------------------------- /merge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 将 add.txt 的内容追加到 all.txt 的末尾 4 | cat add.txt >> all.txt 5 | 6 | # 计算行数,并减去8 7 | total_lines=$(wc -l < all.txt) 8 | new_lines=$((total_lines - 8)) 9 | 10 | # 获取当前时间(格式化为中文) 11 | current_time=$(date +"规则更新时间:%Y年%m月%d日 %H时%M分%S秒") 12 | sed -i '8d' all.txt 13 | # 在第7行后插入当前时间和行数信息 14 | sed -i "7a\\$current_time 更新共 $new_lines 规则" all.txt 15 | --------------------------------------------------------------------------------