mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-08-16 22:20:30 +03:00
Added several blocked services
Closes #2224
Closes #2401
Squashed commit of the following:
commit 8d422091187d03273393775ddc691bdd2a6913f4
Merge: 7a8f598b fa33568f
Author: Andrey Meshkov <am@adguard.com>
Date: Thu Feb 4 17:57:32 2021 +0300
Merge branch 'master' into fix-2224
commit 7a8f598b19a877c19cb1537047c0ae14fa8a0064
Author: Andrey Meshkov <am@adguard.com>
Date: Thu Feb 4 17:34:53 2021 +0300
Review comments
commit 181db867fc56d89dd13a4d50a24922604eed4eae
Author: Andrey Meshkov <am@adguard.com>
Date: Thu Feb 4 17:20:20 2021 +0300
fixed review comments
commit fd5b0816d63952664c6e89a91494ca09dc4fc52d
Author: Ildar Kamalov <ik@adguard.com>
Date: Thu Feb 4 16:10:29 2021 +0300
+ client: add service icons
commit 724e0c26691488fdf7cd8215d200867ed3a86198
Author: Andrey Meshkov <am@adguard.com>
Date: Thu Feb 4 15:42:53 2021 +0300
Added several blocked services
Closes #2224
Closes #2401
This commit is contained in:
parent
fa33568fab
commit
8aec08727c
@ -15,6 +15,7 @@ and this project adheres to
|
||||
|
||||
### Added
|
||||
|
||||
- Added more services to the "Blocked services" list ([#2224], [#2401]).
|
||||
- `ipset` subdomain matching, just like `dnsmasq` does ([#2179]).
|
||||
- Client ID support for DNS-over-HTTPS, DNS-over-QUIC, and DNS-over-TLS
|
||||
([#1383]).
|
||||
@ -33,10 +34,12 @@ and this project adheres to
|
||||
[#1383]: https://github.com/AdguardTeam/AdGuardHome/issues/1383
|
||||
[#2102]: https://github.com/AdguardTeam/AdGuardHome/issues/2102
|
||||
[#2179]: https://github.com/AdguardTeam/AdGuardHome/issues/2179
|
||||
[#2224]: https://github.com/AdguardTeam/AdGuardHome/issues/2224
|
||||
[#2302]: https://github.com/AdguardTeam/AdGuardHome/issues/2302
|
||||
[#2304]: https://github.com/AdguardTeam/AdGuardHome/issues/2304
|
||||
[#2305]: https://github.com/AdguardTeam/AdGuardHome/issues/2305
|
||||
[#2337]: https://github.com/AdguardTeam/AdGuardHome/issues/2337
|
||||
[#2401]: https://github.com/AdguardTeam/AdGuardHome/issues/2401
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -303,7 +303,7 @@ Here is a link to AdGuard Home project: https://crowdin.com/project/adguard-appl
|
||||
Here's what you can also do to contribute:
|
||||
|
||||
1. [Look for issues](https://github.com/AdguardTeam/AdGuardHome/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) marked as "help wanted".
|
||||
2. Actualize the list of *Blocked services*. It it can be found in [dnsfilter/blocked_services.go](https://github.com/AdguardTeam/AdGuardHome/blob/master/internal/dnsfilter/blocked_services.go).
|
||||
2. Actualize the list of *Blocked services*. It it can be found in [dnsfilter/blocked.go](https://github.com/AdguardTeam/AdGuardHome/blob/master/internal/dnsfilter/blocked.go).
|
||||
3. Actualize the list of known *trackers*. It it can be found in [client/src/helpers/trackers/adguard.json](https://github.com/AdguardTeam/AdGuardHome/blob/master/client/src/helpers/trackers/adguard.json).
|
||||
4. Actualize the list of vetted *blocklists*. It it can be found in [client/src/helpers/filters/filters.json](https://github.com/AdguardTeam/AdGuardHome/blob/master/client/src/helpers/filters/filters.json).
|
||||
|
||||
|
Binary file not shown.
@ -200,92 +200,144 @@ export const FILTERS_URLS = {
|
||||
|
||||
export const SERVICES = [
|
||||
{
|
||||
id: 'facebook',
|
||||
name: 'Facebook',
|
||||
},
|
||||
{
|
||||
id: 'whatsapp',
|
||||
name: 'WhatsApp',
|
||||
},
|
||||
{
|
||||
id: 'instagram',
|
||||
name: 'Instagram',
|
||||
},
|
||||
{
|
||||
id: 'twitter',
|
||||
name: 'Twitter',
|
||||
},
|
||||
{
|
||||
id: 'youtube',
|
||||
name: 'YouTube',
|
||||
},
|
||||
{
|
||||
id: 'netflix',
|
||||
name: 'Netflix',
|
||||
},
|
||||
{
|
||||
id: 'snapchat',
|
||||
name: 'Snapchat',
|
||||
},
|
||||
{
|
||||
id: 'twitch',
|
||||
name: 'Twitch',
|
||||
},
|
||||
{
|
||||
id: 'discord',
|
||||
name: 'Discord',
|
||||
},
|
||||
{
|
||||
id: 'skype',
|
||||
name: 'Skype',
|
||||
id: '9gag',
|
||||
name: '9Gag',
|
||||
},
|
||||
{
|
||||
id: 'amazon',
|
||||
name: 'Amazon',
|
||||
},
|
||||
{
|
||||
id: 'ebay',
|
||||
name: 'eBay',
|
||||
},
|
||||
{
|
||||
id: 'origin',
|
||||
name: 'Origin',
|
||||
},
|
||||
{
|
||||
id: 'cloudflare',
|
||||
name: 'Cloudflare',
|
||||
name: 'CloudFlare',
|
||||
},
|
||||
{
|
||||
id: 'steam',
|
||||
name: 'Steam',
|
||||
id: 'dailymotion',
|
||||
name: 'Dailymotion',
|
||||
},
|
||||
{
|
||||
id: 'discord',
|
||||
name: 'Discord',
|
||||
},
|
||||
{
|
||||
id: 'disneyplus',
|
||||
name: 'Disney+',
|
||||
},
|
||||
{
|
||||
id: 'ebay',
|
||||
name: 'EBay',
|
||||
},
|
||||
{
|
||||
id: 'epic_games',
|
||||
name: 'Epic Games',
|
||||
},
|
||||
{
|
||||
id: 'facebook',
|
||||
name: 'Facebook',
|
||||
},
|
||||
{
|
||||
id: 'hulu',
|
||||
name: 'Hulu',
|
||||
},
|
||||
{
|
||||
id: 'imgur',
|
||||
name: 'Imgur',
|
||||
},
|
||||
{
|
||||
id: 'instagram',
|
||||
name: 'Instagram',
|
||||
},
|
||||
{
|
||||
id: 'mail_ru',
|
||||
name: 'Mail.ru',
|
||||
},
|
||||
{
|
||||
id: 'netflix',
|
||||
name: 'Netflix',
|
||||
},
|
||||
{
|
||||
id: 'ok',
|
||||
name: 'OK.ru',
|
||||
},
|
||||
{
|
||||
id: 'origin',
|
||||
name: 'Origin',
|
||||
},
|
||||
{
|
||||
id: 'pinterest',
|
||||
name: 'Pinterest',
|
||||
},
|
||||
{
|
||||
id: 'qq',
|
||||
name: 'QQ',
|
||||
},
|
||||
{
|
||||
id: 'reddit',
|
||||
name: 'Reddit',
|
||||
},
|
||||
{
|
||||
id: 'ok',
|
||||
name: 'OK',
|
||||
id: 'skype',
|
||||
name: 'Skype',
|
||||
},
|
||||
{
|
||||
id: 'vk',
|
||||
name: 'VK',
|
||||
id: 'snapchat',
|
||||
name: 'Snapchat',
|
||||
},
|
||||
{
|
||||
id: 'mail_ru',
|
||||
name: 'mail.ru',
|
||||
id: 'spotify',
|
||||
name: 'Spotify',
|
||||
},
|
||||
{
|
||||
id: 'steam',
|
||||
name: 'Steam',
|
||||
},
|
||||
{
|
||||
id: 'telegram',
|
||||
name: 'Telegram',
|
||||
},
|
||||
{
|
||||
id: 'tiktok',
|
||||
name: 'TikTok',
|
||||
},
|
||||
{
|
||||
id: 'qq',
|
||||
name: 'QQ',
|
||||
id: 'tinder',
|
||||
name: 'Tinder',
|
||||
},
|
||||
{
|
||||
id: 'twitch',
|
||||
name: 'Twitch',
|
||||
},
|
||||
{
|
||||
id: 'twitter',
|
||||
name: 'Twitter',
|
||||
},
|
||||
{
|
||||
id: 'viber',
|
||||
name: 'Viber',
|
||||
},
|
||||
{
|
||||
id: 'vimeo',
|
||||
name: 'Vimeo',
|
||||
},
|
||||
{
|
||||
id: 'vk',
|
||||
name: 'VK.com',
|
||||
},
|
||||
{
|
||||
id: 'wechat',
|
||||
name: 'WeChat',
|
||||
},
|
||||
{
|
||||
id: 'weibo',
|
||||
name: 'Weibo',
|
||||
},
|
||||
{
|
||||
id: 'whatsapp',
|
||||
name: 'WhatsApp',
|
||||
},
|
||||
{
|
||||
id: 'youtube',
|
||||
name: 'YouTube',
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -161,7 +161,73 @@ var serviceRulesArray = []svc{
|
||||
"||douyin.com^",
|
||||
"||tiktokv.com^",
|
||||
}},
|
||||
{"qq", []string{"||qq.com^", "||qqzaixian.com^"}},
|
||||
{"vimeo", []string{
|
||||
"||vimeo.com^",
|
||||
"||vimeocdn.com^",
|
||||
"*vod-adaptive.akamaized.net^",
|
||||
}},
|
||||
{"pinterest", []string{
|
||||
"||pinterest.*^",
|
||||
"||pinimg.com^",
|
||||
}},
|
||||
{"imgur", []string{
|
||||
"||imgur.com^",
|
||||
}},
|
||||
{"dailymotion", []string{
|
||||
"||dailymotion.com^",
|
||||
"||dm-event.net^",
|
||||
"||dmcdn.net^",
|
||||
}},
|
||||
{"qq", []string{
|
||||
// block qq.com and subdomains excluding WeChat domains
|
||||
"^(?!weixin|wx)([^.]+\\.)?qq\\.com$",
|
||||
"||qqzaixian.com^",
|
||||
}},
|
||||
{"wechat", []string{
|
||||
"||wechat.com^",
|
||||
"||weixin.qq.com^",
|
||||
"||wx.qq.com^",
|
||||
}},
|
||||
{"viber", []string{
|
||||
"||viber.com^",
|
||||
}},
|
||||
{"weibo", []string{
|
||||
"||weibo.com^",
|
||||
}},
|
||||
{"9gag", []string{
|
||||
"||9cache.com^",
|
||||
"||gag.com^",
|
||||
}},
|
||||
{"telegram", []string{
|
||||
"||t.me^",
|
||||
"||telegram.me^",
|
||||
"||telegram.org^",
|
||||
}},
|
||||
{"disneyplus", []string{
|
||||
"||disney-plus.net^",
|
||||
"||disneyplus.com^",
|
||||
}},
|
||||
{"hulu", []string{
|
||||
"||hulu.com^",
|
||||
}},
|
||||
{"spotify", []string{
|
||||
"/_spotify-connect._tcp.local/",
|
||||
"||spotify.com^",
|
||||
"||scdn.co^",
|
||||
"||spotify.com.edgesuite.net^",
|
||||
"||spotify.map.fastly.net^",
|
||||
"||spotify.map.fastlylb.net^",
|
||||
"||spotifycdn.net^",
|
||||
"||audio-ak-spotify-com.akamaized.net^",
|
||||
"||audio4-ak-spotify-com.akamaized.net^",
|
||||
"||heads-ak-spotify-com.akamaized.net^",
|
||||
"||heads4-ak-spotify-com.akamaized.net^",
|
||||
}},
|
||||
{"tinder", []string{
|
||||
"||gotinder.com^",
|
||||
"||tinder.com^",
|
||||
"||tindersparks.com^",
|
||||
}},
|
||||
}
|
||||
|
||||
// convert array to map
|
||||
|
37
internal/dnsfilter/blocked_test.go
Normal file
37
internal/dnsfilter/blocked_test.go
Normal file
@ -0,0 +1,37 @@
|
||||
// +build ignore
|
||||
|
||||
package dnsfilter
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// This is a simple tool that takes a list of services and prints them to the output.
|
||||
// It is supposed to be used to update:
|
||||
// client/src/helpers/constants.js
|
||||
// client/src/components/ui/Icons.js
|
||||
//
|
||||
// Usage:
|
||||
// 1. go run ./internal/dnsfilter/blocked_test.go
|
||||
// 2. Use the output to replace `SERVICES` array in "client/src/helpers/constants.js".
|
||||
// 3. You'll need to enter services names manually.
|
||||
// 4. Don't forget to add missing icons to "client/src/components/ui/Icons.js".
|
||||
//
|
||||
// TODO(ameshkov): Rework generator: have a JSON file with all the metadata we need
|
||||
// then use this JSON file to generate JS and Go code
|
||||
func TestGenServicesArray(t *testing.T) {
|
||||
services := make([]svc, len(serviceRulesArray))
|
||||
copy(services, serviceRulesArray)
|
||||
|
||||
sort.Slice(services, func(i, j int) bool {
|
||||
return services[i].name < services[j].name
|
||||
})
|
||||
|
||||
fmt.Println("export const SERVICES = [")
|
||||
for _, s := range services {
|
||||
fmt.Printf(" {\n id: '%s',\n name: '%s',\n },\n", s.name, s.name)
|
||||
}
|
||||
fmt.Println("];")
|
||||
}
|
Loading…
Reference in New Issue
Block a user