Skip to content

Commit d916bc0

Browse files
Merge pull request #91 from y1shiny1shin/RemoveDirtyPackageHistory
Create RemoveDirtyPackageHistory
2 parents 727abe6 + 36f0cfd commit d916bc0

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
Remove some unwanted packets in the process of catching packets,
3+
you can block out the corresponding domain name according to your own demand
4+
For example, if you do not want to see any google request, use the regular ". *google.*", baidu is the same operation!
5+
If you just don't want to see requests from firefox.com, then use ". *firefox.com"
6+
7+
Easy to understand, easy to modify
8+
9+
@Author y1shin
10+
*/
11+
12+
var host = requestResponse.request().httpService().host();
13+
14+
String[] excludeDomain = {
15+
".*google.*",
16+
".*freebuf.com",
17+
".*googleapis.com",
18+
".*firefox.com",
19+
".*mozilla.*",
20+
".*baidu.com",
21+
".*gtimg.com",
22+
".*github.com",
23+
".*csdn.net",
24+
".*aliyun.com",
25+
".*adtidy.org",
26+
".*qianxin.com",
27+
".*immersivetranslate.com",
28+
".*mozilla.com",
29+
".*openjfx.cn",
30+
".*feishu.cn",
31+
".*grok.com",
32+
".*map.qq.com",
33+
".*mozilla.net",
34+
".*qpic.cn",
35+
".*amazonaws.com",
36+
".*gstatic.com",
37+
".*aliapp.org",
38+
".*alicdn.com",
39+
".*greasyfork.org",
40+
".*sohu.com",
41+
".*youtube.com",
42+
".*piwik.pro",
43+
".*googletagmanager.com",
44+
".*doubleclick.net",
45+
".*portswigger.net",
46+
".*geetest.com",
47+
".*licdn.com",
48+
".*csdnimg.cn",
49+
".*intercom.io",
50+
".*tampermonkey.net",
51+
".*chatgpt.com",
52+
".*aliyun.com",
53+
".*52pojie.cn",
54+
".*bing.com",
55+
".*darkreader.org",
56+
};
57+
boolean isExcluded = Arrays.stream(excludeDomain)
58+
.map(Pattern::compile)
59+
.anyMatch(pattern -> pattern.matcher(host).find());
60+
if (isExcluded) {
61+
return false;
62+
}
63+
return true;
64+
65+

0 commit comments

Comments
 (0)