-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathv2ray_config.json.example
More file actions
executable file
·265 lines (260 loc) · 8.09 KB
/
v2ray_config.json.example
File metadata and controls
executable file
·265 lines (260 loc) · 8.09 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
{
"log":
{
"access": "/tmp/access.log", // 访问日志文件
"error": "/var/log/v2ray/error.log", // 错误日志文件
"loglevel": "warning" // 错误日志等级
},
"reverse":{ //反向代理设置 用于穿透内网 https://toutyrater.github.io/app/reverse2.html
"portals":
[{
"tag":"portal",
"domain":"foo.bar" // 必须和内网服务器设定的域名一样
}]
},
"inbounds":[
// shadowsocks
{
"tag": "shadowsocks",
"port": "35001-35050",
"protocol": "shadowsocks",
"settings": {
"method": "aes-256-gcm",
"password": "fuckgongfeiwall"
}
},
// TG MTProto
{
"tag": "tg-in",
"port": 35101,
"protocol": "mtproto",
"settings": {
"users": [{"secret": "1234567890123456789012"}]
}
},
// reverse proxy server 接受内网机器请求
{
"tag": "reverse-server",// 标签,路由中用到
"port":35102,
"protocol":"vmess",
"settings":{
"clients":[
{
"id":"12345678-1234-1234-1234-123456789012",
"alterId":64
}]
}
},
// reverse proxy client 接受客户访问请求
{
"tag":"reverse-client", // 标签,路由中用到
"port":35103,
"protocol":"dokodemo-door",
"settings":{
"clients":[
{
"id":"12345678-1234-1234-1234-123456789012",
"alterId":64
}]
}
},
// VMess TCP port
{
"tag":"tcpHostPort",
"port": 35200,
"protocol": "vmess",
"settings": {
"clients": [{
"id": "12345678-1234-1234-1234-123456789012",
"alterId": 64
}],
"detour": { //绕行配置,即指示客户端使用 dynamicPort 的配置通信
"to": "tcpDynPorts"
}
}
},
{
"protocol": "vmess",
"port": "35201-35232", // 端口范围
"tag": "tcpDynPorts", // 与上面的 detour to 相同
"settings": {
"clients": [
{
"id": "12345678-1234-1234-1234-123456789012",
"alterId": 64
}]
},
"allocate": { // 分配模式
"strategy": "always",
"refresh": 10, //minutes
"concurrency": 3
}
},
// VMess KCP port
{
"tag":"kcpHostPort",
"port": 35300,
"protocol": "vmess",
"settings": {
"clients": [{
"id": "12345678-1234-1234-1234-123456789012",
"alterId": 64
}],
"detour": { //绕行配置,即指示客户端使用 dynamicPort 的配置通信
"to": "kcpDynPorts"
}
},
"streamSettings": {
"network": "kcp"
}
},
{
"protocol": "vmess",
"port": "35301-35332", // 端口范围
"tag": "kcpDynPorts", // 与上面的 detour to 相同
"settings": {
"clients": [
{
"id": "12345678-1234-1234-1234-123456789012",
"alterId": 64
}]
},
"allocate": { // 分配模式
"strategy": "always",
"refresh": 10, //minutes
"concurrency": 3
},
"streamSettings": {
"network": "kcp",
"kcpSettings":
{
"uplinkCapacity": 4,
"downlinkCapacity": 20
//"congestion": true,
}
}
},
// Vmess
{
"protocol": "vmess",
"port": "35400-35410", // 端口范围
"tag": "vmess-wechat",
"settings": {
"clients": [
{
"id": "12345678-1234-1234-1234-123456789012",
"alterId": 64
}]
},
"allocate": { // 分配模式
"strategy": "always",
"refresh": 10, //minutes
"concurrency": 3
},
"streamSettings": {
"network": "kcp",
"kcpSettings":
{
"header": { "type": "wechat-video" },
"uplinkCapacity": 4,
"downlinkCapacity": 20
//"congestion": true,
}
}
},
// api
{
"listen": "127.0.0.1",
"port": 35104,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
}
],
"outbounds": [
// direct
{
"protocol": "freedom",
"settings": {},
"tag":"direct"
},
// block
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
},
// telegram MTProto
{
"tag": "tg-out",
"protocol": "mtproto",
"settings": {}
}
],
// routing
"routing": {
"strategy": "rules",
"settings": {
"rules": [
// telegram MTProto
{
"type": "field",
"inboundTag": ["tg-in"],
"outboundTag": "tg-out"
},
// api
{
"type": "field",
"inboundTag": [ "api" ],
"outboundTag": "api"
},
// ban local address for security
{
"type": "field",
"ip": [
"0.0.0.0/8","10.0.0.0/8","100.64.0.0/10","127.0.0.0/8","169.254.0.0/16",
"172.16.0.0/12","192.0.0.0/24","192.0.2.0/24","192.168.0.0/16","198.18.0.0/15",
"198.51.100.0/24","203.0.113.0/24","::1/128","fc00::/7","fe80::/10"
],
"outboundTag": "blocked"
},
// reverse proxy
{
"type":"field",
"inboundTag":[ "reverse-client" ],
"outboundTag":"portal"
},
{
"type":"field",
"inboundTag":[ "reverse-server" ],
"domain":[ "full:foo.bar" ],
"outboundTag":"portal"
}
]
}
},
"stats": {},
"policy":{
"levels": {
"0": {
"handshake": 20,
"connIdle": 600,
"statsUserUplink": true,
"statsUserDownlink": true,
"bufferSize": 8192
}
},
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true
}
},
"api": {
"services": [
"HandlerService","StatsService"
],
"tag": "api"
}
}