-
Notifications
You must be signed in to change notification settings - Fork 188
/
config_full.json
259 lines (214 loc) · 6.15 KB
/
config_full.json
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
{
"Log": {
// V2bX 的日志配置,独立于各 Core 的 log 配置
// 日志等级,info, warn, error, none
"Level": "error",
// 日志输出路径,默认输出到标准输出
"Output": ""
},
"Cores": [
{
// Core类型
"Type": "sing",
// Core标识名,可选,如果需要启动多个同类型内核则必填
"Name": "sing1",
"Log": {
// 同 SingBox log 部分配置
"Level": "error",
"Timestamp": true
},
"NTP": {
// 同 SingBox ntp 部分配置
// VMess VLESS 建议开启
"Enable": true,
"Server": "time.apple.com",
"ServerPort": 0
},
"DnsConfigPath": "/etc/V2bX/dns.json",
// SingBox源配置文件目录,用于引用标准SingBox配置文件
"OriginalPath": "/etc/V2bX/sing_origin.json"
},
{
"Type": "sing",
"Name": "sing2",
"Log": {
"Level": "info",
"Timestamp": false
}
},
{
"Type": "xray",
"Log": {
// 同 Xray-core log 部分配置
"Level": "error"
},
// 静态资源文件目录
"AssetPath": "",
// DNS配置文件目录
"DnsConfigPath": "",
// 路由配置文件目录
"RouteConfigPath": "",
// 本地策略相关配置
"ConnectionConfig": {
// 详见 https://xtls.github.io/config/policy.html#levelpolicyobject
"handshake": 4,
"connIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 5,
"statsUserUplink": false,
"statsUserDownlink": false,
"bufferSize": 4
},
// Inbound配置文件目录
"InboundConfigPath": "",
// Outbound配置文件目录
"OutboundConfigPath": ""
}
],
"Nodes": [
// Node配置有两种写法
{
// 写法1
// sing内核
// Node标识名,便于查看日志,不填将通过下发的节点配置自动生成
// 务必注意不要重复,否则会出现问题
"Name": "sing_node1",
// 要使用的Core的类型
// 如果填写了CoreName可不填,但单内核务必填写
// 建议视情况填写Core和CoreName其中一个,如果均没有填写将随机选择支持的内核
"Core": "sing",
// 要使用的Core的标识名,如果没有定义多个同类型内核可不填
"CoreName": "sing1",
// API接口地址
"ApiHost": "http://127.0.0.1",
// API密钥,即Token
"ApiKey": "test",
// 节点ID
"NodeID": 33,
// 节点类型
"NodeType": "shadowsocks",
// 请求超时时间
"Timeout": 30,
// 监听IP
"ListenIP": "0.0.0.0",
// 发送IP
"SendIP": "0.0.0.0",
// 开启 Proxy Protocol,参见 https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt
"EnableProxyProtocol": false,
// 开启 TCP Fast Open
"EnableTFO": true,
// 开启 DNS
"EnableDNS" : true,
// 设置 Domain Strategy 需要开启 DNS ,默认 AsIS
// 可选 prefer_ipv4 / prefer_ipv6 / ipv4_only / ipv6_only
"DomainStrategy": "ipv4_only",
// 限制器相关配置
"LimitConfig": {
// 开启实时连接数及IP数限制
"EnableRealtime": false,
// 用户速度限制
"SpeedLimit": 0,
// 用户IP限制
"IPLimit": 0,
// 用户连接数限制
"ConnLimit": 0,
// 开启动态限速
"EnableDynamicSpeedLimit": false,
// 动态限速相关配置
"DynamicSpeedLimitConfig": {
// 检查周期
"Periodic": 60,
// 检查周期内触发限制的流量数
"Traffic": 1000,
// 触发限制后的速度限制
"SpeedLimit": 100,
// 速度限制过期时间
"ExpireTime": 60
}
},
// 证书相关配置
"CertConfig": {
// 证书申请模式,none、http、dns、self
"CertMode": "none",
"RejectUnknownSni": false,
// 证书域名
"CertDomain": "test.com",
// 证书文件目录
"CertFile": "/etc/V2bX/cert/1.pem",
// 密钥文件目录
"KeyFile": "/etc/V2bX/cert/1.key",
// 申请证书时使用的用户邮箱
"Email": "1@test.com",
// DNS解析提供者
"Provider": "cloudflare",
// DNS解析提供者的环境变量,详见 https://go-acme.github.io/lego/dns/
"DNSEnv": {
"EnvName": "env1"
}
}
},
{
// xray内核
"Name": "xray_node1",
"Core": "xray",
"CoreName": "",
"ApiHost": "http://127.0.0.1",
"ApiKey": "test",
"NodeID": 33,
"NodeType": "shadowsocks",
"Timeout": 30,
"ListenIP": "0.0.0.0",
"SendIP": "0.0.0.0",
"EnableProxyProtocol": true,
"EnableTFO": true,
// 以上同 sing
// 开启自定义DNS
"EnableDNS": false,
// DNS解析类型,AsIs、UseIP、UseIPv4、UseIPv6
"DNSType": "AsIs",
// 开启udp over tcp
"EnableUot": false,
// 禁用IVCheck
"DisableIVCheck": false,
// 禁用嗅探
"DisableSniffing": false,
// 开启回落
"EnableFallback": false,
// 回落相关配置
"FallBackConfigs":{
// 详见 https://xtls.github.io/config/features/fallback.html#fallbackobject
"SNI": "",
"Alpn": "",
"Path": "",
"Dest": "",
"ProxyProtocolVer": 0
}
},
{
// 写法2
// 类似旧配置文件 ApiConfig 部分
"ApiConfig": {
"ApiHost": "http://127.0.0.1",
"ApiKey": "test",
"NodeID": 33,
"Timeout": 30
},
// 类似旧配置文件 ControllerConfig 部分
"Options": {
"Core": "sing",
"EnableProxyProtocol": true,
"EnableTFO": true,
"DomainStrategy": "ipv4_only"
// More
}
},
{
// 引用本地其他配置文件
"Include": "../example/config_full_node1.json"
},
{
// 通过Http引用远端配置文件
"Include": "http://127.0.0.1:11451/config_full_node1.json"
}
]
}