-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsetting.json
More file actions
204 lines (204 loc) · 5.45 KB
/
Copy pathsetting.json
File metadata and controls
204 lines (204 loc) · 5.45 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{
"log": {
"level": "info",
"path": "./moto.log"
},
"metrics": {
"enabled": true,
"listen": "127.0.0.1:9090"
},
"rules": [
{
"name": "正常模式",
"listen": "127.0.0.1:9001",
"mode": "normal",
"prewarm": false,
"timeout": 1000,
"healthCheck": {
"type": "tcp",
"interval": 10000,
"timeout": 2000,
"failureThreshold": 3,
"successThreshold": 2
},
"allowlist": ["127.0.0.0/8", "::1/128"],
"maxConnections": 4096,
"maxConnectionsPerIP": 1024,
"blacklist": null,
"targets": [
{
"address": "183.2.172.177:80"
},
{
"address": "180.101.51.73:80"
}
]
},
{
"name": "正则模式",
"listen": "127.0.0.1:9002",
"mode": "regex",
"prewarm": false,
"timeout": 1000,
"healthCheck": {
"type": "tcp",
"interval": 10000,
"timeout": 2000,
"failureThreshold": 3,
"successThreshold": 2
},
"allowlist": ["127.0.0.0/8", "::1/128"],
"maxConnections": 4096,
"maxConnectionsPerIP": 1024,
"blacklist": null,
"targets": [
{
"regexp": "^(GET|POST|HEAD|DELETE|PUT|PATCH|CONNECT|OPTIONS|TRACE) ",
"address": "183.2.172.177:80"
},
{
"regexp": "^(GET|POST|HEAD|DELETE|PUT|PATCH|CONNECT|OPTIONS|TRACE) ",
"address": "180.101.51.73:80"
}
]
},
{
"name": "智能加速",
"listen": "127.0.0.1:9003",
"mode": "boost",
"prewarm": false,
"timeout": 2000,
"hedge": {
"minDelay": 25,
"maxDelay": 250
},
"healthCheck": {
"type": "tcp",
"interval": 10000,
"timeout": 2000,
"failureThreshold": 3,
"successThreshold": 2
},
"allowlist": ["127.0.0.0/8", "::1/128"],
"maxConnections": 4096,
"maxConnectionsPerIP": 1024,
"blacklist": null,
"targets": [
{
"address": "84.17.57.26:80"
},
{
"address": "156.146.44.90:80"
}
]
},
{
"name": "轮询模式",
"listen": "127.0.0.1:9004",
"mode": "roundrobin",
"prewarm": false,
"timeout": 2000,
"healthCheck": {
"type": "tcp",
"interval": 10000,
"timeout": 2000,
"failureThreshold": 3,
"successThreshold": 2
},
"allowlist": ["127.0.0.0/8", "::1/128"],
"maxConnections": 4096,
"maxConnectionsPerIP": 1024,
"blacklist": null,
"targets": [
{
"address": "84.17.57.26:80"
},
{
"address": "156.146.44.90:80"
}
]
},
{
"name": "SOCKS5 to H3/H2",
"listen": "127.0.0.1:9005",
"mode": "boost",
"protocol": "socks5",
"prewarm": false,
"timeout": 2000,
"hedge": {
"minDelay": 25,
"maxDelay": 250
},
"healthCheck": {
"type": "tcp",
"interval": 10000,
"timeout": 2000,
"failureThreshold": 3,
"successThreshold": 2
},
"allowlist": ["127.0.0.0/8", "::1/128"],
"maxConnections": 4096,
"maxConnectionsPerIP": 1024,
"blacklist": null,
"userAgent": [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0",
"Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1",
"Mozilla/5.0 (iPad; CPU OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1",
"Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/133.0.0.0 Mobile/15E148 Safari/604.1"
],
"targets": [
{
"address": "proxy-a.example.com:443",
"connectProxy": {
"protocols": ["h3", "h2"],
"serverName": "proxy-a.example.com",
"basicAuth": {
"username": "a",
"password": "a"
}
}
},
{
"address": "proxy-b.example.com:443",
"connectProxy": {
"protocols": ["h3", "h2"],
"serverName": "proxy-b.example.com",
"basicAuth": {
"username": "b",
"password": "b"
}
}
}
]
},
{
"name": "TLS SNI/ALPN 分流示例",
"listen": "127.0.0.1:9006",
"protocol": "tcp",
"mode": "tls",
"prewarm": false,
"timeout": 2000,
"allowlist": ["127.0.0.0/8", "::1/128"],
"maxConnections": 4096,
"maxConnectionsPerIP": 1024,
"blacklist": null,
"targets": [
{
"address": "127.0.0.1:9443",
"serverNames": ["api.example.com"],
"alpn": ["h2", "http/1.1"]
},
{
"address": "127.0.0.1:9444",
"serverNames": ["*.example.com"]
},
{
"address": "127.0.0.1:9445"
}
]
}
]
}