浏览代码

Tightrn the Phishing Hosts & Add default fetch cache

SukkaW 1 年之前
父节点
当前提交
c5b88362ef
共有 2 个文件被更改,包括 9 次插入10 次删除
  1. 7 9
      Build/constants/phishing-score-source.ts
  2. 2 1
      Build/lib/fetch-retry.ts

+ 7 - 9
Build/constants/phishing-score-source.ts

@@ -63,6 +63,7 @@ export const leathalKeywords = createKeywordFilter([
   '.de-',
   '.eu-',
   '.us-',
+  '.uk-',
   '.ru-'
 ]);
 
@@ -86,19 +87,18 @@ export const sensitiveKeywords = createKeywordFilter([
   'staemco',
   'oferta',
   'txtag',
-  'paypal'
+  'paypal',
+  'dropbox',
+  'payment',
+  'instagram'
 ]);
 
 export const lowKeywords = createKeywordFilter([
-  'transactions-',
-  'payment',
+  'transactions',
   'wallet',
-  '-transactions',
   '-faceb', // facebook fake
   '.faceb', // facebook fake
-  'facebook',
   'virus-',
-  'apple-',
   '-roblox',
   '-co-jp',
   'customer.',
@@ -106,10 +106,8 @@ export const lowKeywords = createKeywordFilter([
   '.www-',
   '.www.',
   '.www2',
-  'instagram',
   'microsof',
-  'passwordreset',
-  '.google-',
+  'password',
   'recover',
   'banking',
   'shop'

+ 2 - 1
Build/lib/fetch-retry.ts

@@ -120,7 +120,8 @@ setGlobalDispatcher(agent.compose(
     store: new BetterSqlite3CacheStore({
       location: path.join(CACHE_DIR, 'undici-better-sqlite3-cache-store.db'),
       maxEntrySize: 1024 * 1024 * 100 // 100 MiB
-    })
+    }),
+    cacheByDefault: 180 // 3 minutes
   })
 ));