cherry-pick: 4795-bilibili

Updates #4795.

* commit 'e6ebb8efef4430c48b06469ba566349bba3d9856':
  filtering: fmt
  filtering: add Bilibili and Weibo domains
  filtering: add Bilibili service
This commit is contained in:
Ainar Garipov 2022-08-18 14:56:13 +03:00 committed by Ainar Garipov
parent 3fd467413c
commit c7a8883201
4 changed files with 89 additions and 20 deletions

View File

@ -20,11 +20,16 @@ and this project adheres to
- Weaker cipher suites that use the CBC (cipher block chaining) mode of
operation have been disabled ([#2993]).
### Added
- Bilibili service blocking ([#4795]).
### Deprecated
- Go 1.18 support. v0.109.0 will require at least Go 1.19 to build.
[#2993]: https://github.com/AdguardTeam/AdGuardHome/issues/2993
[#4795]: https://github.com/AdguardTeam/AdGuardHome/issues/4795

File diff suppressed because one or more lines are too long

View File

@ -211,6 +211,10 @@ export const SERVICES = [
id: 'amazon',
name: 'Amazon',
},
{
id: 'bilibili',
name: 'Bilibili',
},
{
id: 'cloudflare',
name: 'CloudFlare',

View File

@ -20,8 +20,11 @@ type svc struct {
// client/src/helpers/constants.js
// client/src/components/ui/Icons.js
var serviceRulesArray = []svc{{
name: "whatsapp",
rules: []string{"||whatsapp.net^", "||whatsapp.com^"},
name: "whatsapp",
rules: []string{
"||whatsapp.com^",
"||whatsapp.net^",
},
}, {
name: "facebook",
rules: []string{
@ -38,8 +41,13 @@ var serviceRulesArray = []svc{{
"||fb.watch^",
},
}, {
name: "twitter",
rules: []string{"||twitter.com^", "||twttr.com^", "||t.co^", "||twimg.com^"},
name: "twitter",
rules: []string{
"||t.co^",
"||twimg.com^",
"||twitter.com^",
"||twttr.com^",
},
}, {
name: "youtube",
rules: []string{
@ -53,8 +61,13 @@ var serviceRulesArray = []svc{{
"||ytimg.com^",
},
}, {
name: "twitch",
rules: []string{"||twitch.tv^", "||ttvnw.net^", "||jtvnw.net^", "||twitchcdn.net^"},
name: "twitch",
rules: []string{
"||jtvnw.net^",
"||ttvnw.net^",
"||twitch.tv^",
"||twitchcdn.net^",
},
}, {
name: "netflix",
rules: []string{
@ -216,41 +229,73 @@ var serviceRulesArray = []svc{{
"||bytedance.map.fastly.net^",
"||douyin.com^",
"||tiktokv.com^",
"||toutiaovod.com^",
"||douyincdn.com^",
},
}, {
name: "vimeo",
rules: []string{"||vimeo.com^", "||vimeocdn.com^", "*vod-adaptive.akamaized.net^"},
name: "vimeo",
rules: []string{
"*vod-adaptive.akamaized.net^",
"||vimeo.com^",
"||vimeocdn.com^",
},
}, {
name: "pinterest",
rules: []string{"||pinterest.*^", "||pinimg.com^"},
name: "pinterest",
rules: []string{
"||pinimg.com^",
"||pinterest.*^",
},
}, {
name: "imgur",
rules: []string{"||imgur.com^"},
}, {
name: "dailymotion",
rules: []string{"||dailymotion.com^", "||dm-event.net^", "||dmcdn.net^"},
name: "dailymotion",
rules: []string{
"||dailymotion.com^",
"||dm-event.net^",
"||dmcdn.net^",
},
}, {
name: "qq",
rules: []string{
// Block qq.com and subdomains excluding WeChat's domains.
"||qq.com^$denyallow=wx.qq.com|weixin.qq.com",
"||qqzaixian.com^",
"||qq-video.cdn-go.cn^",
"||url.cn^",
},
}, {
name: "wechat",
rules: []string{"||wechat.com^", "||weixin.qq.com^", "||wx.qq.com^"},
name: "wechat",
rules: []string{
"||wechat.com^",
"||weixin.qq.com.cn^",
"||weixin.qq.com^",
"||weixinbridge.com^",
"||wx.qq.com^",
},
}, {
name: "viber",
rules: []string{"||viber.com^"},
}, {
name: "weibo",
rules: []string{"||weibo.com^"},
name: "weibo",
rules: []string{
"||weibo.cn^",
"||weibo.com^",
"||weibocdn.com^",
},
}, {
name: "9gag",
rules: []string{"||9cache.com^", "||9gag.com^"},
name: "9gag",
rules: []string{
"||9cache.com^",
"||9gag.com^",
},
}, {
name: "telegram",
rules: []string{"||t.me^", "||telegram.me^", "||telegram.org^"},
name: "telegram",
rules: []string{
"||t.me^",
"||telegram.me^",
"||telegram.org^",
},
}, {
name: "disneyplus",
rules: []string{
@ -284,6 +329,17 @@ var serviceRulesArray = []svc{{
"||tinder.com^",
"||tindersparks.com^",
},
}, {
name: "bilibili",
rules: []string{
"||biliapi.net^",
"||bilibili.com^",
"||biligame.com^",
"||bilivideo.cn^",
"||bilivideo.com^",
"||dreamcast.hk^",
"||hdslb.com^",
},
}}
// convert array to map