forked from chiqors/GIO-docker-braindead
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfiddler-script.txt
72 lines (55 loc) · 1.76 KB
/
fiddler-script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
// Enable/Disable entire script
//return;
var blocks =
[
":8888/log",
"/sdk/dataUpload",
"/common/h5log/log/batch",
"/crash/dataUpload"
];
for (var i = 0; i < blocks.length; i++) {
if (oS.uriContains(blocks[i])) {
oS.oRequest.FailSession(404, "Blocked", "Oh no!!!");
return;
}
}
var redirects =
[
".yuanshen.com",
".hoyoverse.com",
".mihoyo.com",
".yuanshen.com:12401"
];
for (var i = 0; i < redirects.length; i++) {
if (oS.host.EndsWith(redirects[i])) {
// For all GIO methods + Soggy (CBT1) except GrassCutter
oS.oRequest.headers.UriScheme = "http";
// For Yuuki servers
//oS.host = "de.game.yuuki.me";
//oS.host = "sg.game.yuuki.me";
// For GIO method 5 + Grasscutter
oS.host = "127.0.0.1";
// For GIO method 5
oS.port = 21000;
// For GIO method 1,2,3
//oS.host = "192.168.200.130";
// For GIO method 1,2,3
//oS.port = 2888;
// For other servers like Yuuki
//oS.port = 8080;
// For GrassCutter
//oS.port = 443;
// Only for Soggy (CBT1)
//oS.port = 8099;
break;
}
}
}
};