Skip to content

Commit

Permalink
feat: 增加 netflixFilter 规则
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Oct 31, 2019
1 parent 3751dbf commit 5cc52f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/utils/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const useRegexp = (regexp: RegExp): NodeNameFilterType => {
export const netflixFilter: NodeNameFilterType = item => {
return [
'netflix',
'nf',
'hkbn',
'hkt',
'hgc',
Expand Down
8 changes: 8 additions & 0 deletions test/utils/filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 5cc52f1

Please sign in to comment.