-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.txt
32 lines (23 loc) · 1.08 KB
/
config.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
https://raw.githubusercontent.com/bottlelin/mylist/refs/heads/main/Clash-LIAN.ini.txt
#放到 openClash-插件设置-开发者选项 内:
#!/bin/sh
. /usr/share/openclash/log.sh
. /lib/functions.sh
# This script is called by /etc/init.d/openclash
# Add your custom firewall rules here, they will be added after the end of the OpenClash iptables rules
LOG_OUT "Tip: Start Add Custom Firewall Rules..."
# 以下是广告过滤规则拉取脚本
LOG_OUT "拉取 anti-AD 广告过滤规则…"
curl -s https://anti-ad.net/anti-ad-for-dnsmasq.conf -o /tmp/dnsmasq.d/anti-ad-for-dnsmasq.conf
# 广告过滤规则拉取脚本结束
# 以下是 GitHub520 加速规则拉取脚本
# LOG_OUT "拉取 GitHub520 加速规则…"
# sed -i '/# GitHub520 Host Start/,/# GitHub520 Host End/d' /etc/hosts
# curl https://raw.hellogithub.com/hosts >> /etc/hosts
# sed -i '/^$/d' /etc/hosts
# sed -i '/!/d' /etc/hosts
# GitHub520 加速规则拉取脚本结束
# 清理 DNS 缓存
LOG_OUT "清理 DNS 缓存…"
/etc/init.d/dnsmasq reload
exit 0