From e0f2c3d170f8c9bf74ad03285614142dbbed4c5a Mon Sep 17 00:00:00 2001 From: NeP <2996023783@qq.com> Date: Sat, 30 Jul 2022 12:22:24 +0800 Subject: [PATCH] filtering: add Bilibili service --- client/src/components/ui/Icons.js | 4 ++++ client/src/helpers/constants.js | 4 ++++ internal/filtering/blocked.go | 26 +++++++++++++++++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/client/src/components/ui/Icons.js b/client/src/components/ui/Icons.js index e2186529..47e71f59 100644 --- a/client/src/components/ui/Icons.js +++ b/client/src/components/ui/Icons.js @@ -408,6 +408,10 @@ const Icons = () => ( + + + + ); diff --git a/client/src/helpers/constants.js b/client/src/helpers/constants.js index 6598530c..184e7a24 100644 --- a/client/src/helpers/constants.js +++ b/client/src/helpers/constants.js @@ -211,6 +211,10 @@ export const SERVICES = [ id: 'amazon', name: 'Amazon', }, + { + id: 'bilibili', + name: 'Bilibili', + }, { id: 'cloudflare', name: 'CloudFlare', diff --git a/internal/filtering/blocked.go b/internal/filtering/blocked.go index 48996a6d..75fafa62 100644 --- a/internal/filtering/blocked.go +++ b/internal/filtering/blocked.go @@ -216,6 +216,8 @@ var serviceRulesArray = []svc{{ "||bytedance.map.fastly.net^", "||douyin.com^", "||tiktokv.com^", + "||toutiaovod.com^", + "||douyincdn.com^", }, }, { name: "vimeo", @@ -235,16 +237,24 @@ var serviceRulesArray = []svc{{ // 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^", + "||wx.qq.com^", + "||weixin.qq.com^", + "||weixin.qq.com.cn^", + "||weixinbridge.com^", + }, }, { name: "viber", rules: []string{"||viber.com^"}, }, { name: "weibo", - rules: []string{"||weibo.com^"}, + rules: []string{"||weibo.com^", "||weibo.cn^"}, }, { name: "9gag", rules: []string{"||9cache.com^", "||9gag.com^"}, @@ -284,6 +294,16 @@ var serviceRulesArray = []svc{{ "||tinder.com^", "||tindersparks.com^", }, +}, { + name: "bilibili", + rules: []string{ + "||bilibili.com^", + "||bilivideo.com^", + "||biligame.com^", + "||biliapi.net^", + "||dreamcast.hk^", + "||hdslb.com^", + }, }} // convert array to map