From 5cc52f1c237b9c4fcf2dee56ea3c0caaf82695ad Mon Sep 17 00:00:00 2001 From: Roy Li Date: Fri, 1 Nov 2019 00:55:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20netflixFilter=20?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/filter.ts | 1 + test/utils/filter.test.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib/utils/filter.ts b/lib/utils/filter.ts index 075b41db5..d2009f275 100644 --- a/lib/utils/filter.ts +++ b/lib/utils/filter.ts @@ -38,6 +38,7 @@ export const useRegexp = (regexp: RegExp): NodeNameFilterType => { export const netflixFilter: NodeNameFilterType = item => { return [ 'netflix', + 'nf', 'hkbn', 'hkt', 'hgc', diff --git a/test/utils/filter.test.ts b/test/utils/filter.test.ts index 6aa2c7c96..8e42f1dfd 100644 --- a/test/utils/filter.test.ts +++ b/test/utils/filter.test.ts @@ -72,6 +72,14 @@ test('netflixFilter', t => { nodeName: 'HK', type: NodeTypeEnum.Shadowsocks, })); + t.true(filter.netflixFilter({ + nodeName: 'HK NF', + type: NodeTypeEnum.Shadowsocks, + })); + t.true(filter.netflixFilter({ + nodeName: 'HK Netflix', + type: NodeTypeEnum.Shadowsocks, + })); }); test('youtubePremiumFilter', t => {