mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Adjust source / Update reject_extra usage
This commit is contained in:
parent
f129152da8
commit
9d47cb9f57
@ -3,13 +3,6 @@ import { TTL } from '../lib/cache-filesystem';
|
||||
type HostsSource = [main: string, mirrors: string[] | null, includeAllSubDomain: boolean, ttl: number];
|
||||
|
||||
export const HOSTS: HostsSource[] = [
|
||||
[
|
||||
'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext',
|
||||
['https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/thirdparties/pgl.yoyo.org/as/serverlist'],
|
||||
true,
|
||||
TTL.THREE_HOURS()
|
||||
],
|
||||
|
||||
// no coin list is not actively maintained, but it updates daily when being maintained, so we set a 3 days cache ttl
|
||||
['https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt', null, true, TTL.THREE_DAYS()],
|
||||
// have not been updated for more than a year, so we set a 14 days cache ttl
|
||||
@ -20,6 +13,13 @@ export const HOSTS: HostsSource[] = [
|
||||
] as const;
|
||||
|
||||
export const HOSTS_EXTRA: HostsSource[] = [
|
||||
// This stupid hosts blocks t.co, so we determine that this is also bullshit, so it is also extra
|
||||
[
|
||||
'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext',
|
||||
['https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/thirdparties/pgl.yoyo.org/as/serverlist'],
|
||||
true,
|
||||
TTL.THREE_HOURS()
|
||||
],
|
||||
// Dan Pollock's hosts file, 0.0.0.0 version is 30 KiB smaller
|
||||
['https://someonewhocares.org/hosts/zero/hosts', null, true, TTL.THREE_HOURS()],
|
||||
// ad-wars is not actively maintained, so we set a 7 days cache ttl
|
||||
@ -31,18 +31,6 @@ export const DOMAIN_LISTS: HostsSource[] = [
|
||||
// Although the hosts file is still actively maintained, the hosts_browser file is not updated since 2021-07, so we set a 14 days cache ttl
|
||||
['https://zerodot1.gitlab.io/CoinBlockerLists/list_browser.txt', [], true, TTL.TWO_WEEKS()],
|
||||
|
||||
// Curben's PUP Domains Blocklist
|
||||
// 'https://curbengh.github.io/pup-filter/pup-filter-agh.txt'
|
||||
// 'https://pup-filter.pages.dev/pup-filter-agh.txt'
|
||||
// The PUP filter has paused the update since 2023-05, so we set a 14 days cache ttl
|
||||
[
|
||||
'https://curbengh.github.io/pup-filter/pup-filter-domains.txt',
|
||||
[
|
||||
'https://pup-filter.pages.dev/pup-filter-domains.txt',
|
||||
'https://malware-filter.gitlab.io/pup-filter/pup-filter-domains.txt'
|
||||
],
|
||||
true, TTL.TWO_WEEKS()
|
||||
],
|
||||
// Curben's UrlHaus Malicious URL Blocklist
|
||||
[
|
||||
'https://curbengh.github.io/urlhaus-filter/urlhaus-filter-domains.txt',
|
||||
@ -67,7 +55,19 @@ export const DOMAIN_LISTS_EXTRA: HostsSource[] = [
|
||||
['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers_justdomains.txt', [], true, TTL.THREE_DAYS()],
|
||||
['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_clickthroughs_justdomains.txt', [], true, TTL.THREE_DAYS()],
|
||||
['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_microsites_justdomains.txt', [], true, TTL.THREE_DAYS()],
|
||||
['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_mail_trackers_justdomains.txt', [], true, TTL.THREE_DAYS()]
|
||||
['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_mail_trackers_justdomains.txt', [], true, TTL.THREE_DAYS()],
|
||||
// Curben's PUP Domains Blocklist
|
||||
// 'https://curbengh.github.io/pup-filter/pup-filter-agh.txt'
|
||||
// 'https://pup-filter.pages.dev/pup-filter-agh.txt'
|
||||
// The PUP filter has paused the update since 2023-05, so we set a 14 days cache ttl, and move it to extra
|
||||
[
|
||||
'https://curbengh.github.io/pup-filter/pup-filter-domains.txt',
|
||||
[
|
||||
'https://pup-filter.pages.dev/pup-filter-domains.txt',
|
||||
'https://malware-filter.gitlab.io/pup-filter/pup-filter-domains.txt'
|
||||
],
|
||||
true, TTL.TWO_WEEKS()
|
||||
]
|
||||
];
|
||||
|
||||
export const PHISHING_DOMAIN_LISTS_EXTRA: [HostsSource, HostsSource] = [
|
||||
|
||||
15
README.md
15
README.md
@ -27,7 +27,11 @@
|
||||
|
||||
```ini
|
||||
# Non IP
|
||||
# 基础的 12 万拦截域名
|
||||
DOMAIN-SET,https://ruleset.skk.moe/List/domainset/reject.conf,REJECT,extended-matching
|
||||
# 额外 20 万拦截域名,作为基础的补充,启用时需要搭配基础一起使用
|
||||
# 在 Surge 5 for Mac(或更新版本),即使同时启用基础和额外的拦截域名也不会导致匹配性能下降或内存占用过高
|
||||
DOMAIN-SET,https://ruleset.skk.moe/List/domainset/reject_extra.conf,REJECT,extended-matching
|
||||
RULE-SET,https://ruleset.skk.moe/List/non_ip/reject.conf,REJECT,extended-matching
|
||||
RULE-SET,https://ruleset.skk.moe/List/non_ip/reject-no-drop.conf,REJECT-NO-DROP,extended-matching
|
||||
RULE-SET,https://ruleset.skk.moe/List/non_ip/reject-drop.conf,REJECT-DROP,extended-matching
|
||||
@ -65,7 +69,6 @@ rule-providers:
|
||||
interval: 43200
|
||||
url: https://ruleset.skk.moe/Clash/non_ip/reject.txt
|
||||
path: ./sukkaw_ruleset/reject_non_ip.txt
|
||||
# WARNING! Using reject_domainset can cause Clash out of memory due to the insufficient Clash implementation.
|
||||
reject_domainset:
|
||||
type: http
|
||||
behavior: domain
|
||||
@ -73,6 +76,14 @@ rule-providers:
|
||||
interval: 43200
|
||||
url: https://ruleset.skk.moe/Clash/domainset/reject.txt
|
||||
path: ./sukkaw_ruleset/reject_domainset.txt
|
||||
# 在 Clash 上,同时启用基础和额外的拦截域名会导致内存占用过高和匹配用时增加等性能问题
|
||||
reject_extra_domainset:
|
||||
type: http
|
||||
behavior: domain
|
||||
format: text
|
||||
interval: 43200
|
||||
url: https://ruleset.skk.moe/Clash/domainset/reject_extra.txt
|
||||
path: ./sukkaw_ruleset/reject_domainset.txt
|
||||
reject_ip:
|
||||
type: http
|
||||
behavior: classical
|
||||
@ -84,8 +95,8 @@ rule-providers:
|
||||
rules:
|
||||
- RULE-SET,reject_non_ip,REJECT
|
||||
|
||||
# WARNING! Using reject_domainset can cause Clash out of memory due to the insufficient Clash implementation.
|
||||
- RULE-SET,reject_domainset,REJECT
|
||||
- RULE-SET,reject_extra_domainset,REJECT
|
||||
|
||||
- RULE-SET,reject_ip,REJECT
|
||||
- RULE-SET,reject_non_ip_drop,REJECT-DROP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user