2022-11-03 01:17:10 +00:00
|
|
|
|
{
|
|
|
|
|
"log": {
|
|
|
|
|
"loglevel": "warning"
|
|
|
|
|
},
|
|
|
|
|
"routing": {
|
|
|
|
|
"domainStrategy": "IPIfNonMatch",
|
|
|
|
|
"rules": [
|
|
|
|
|
{
|
|
|
|
|
"type": "field",
|
|
|
|
|
"ip": [
|
2022-11-21 00:02:01 +00:00
|
|
|
|
"geoip:cn"
|
2022-11-03 01:17:10 +00:00
|
|
|
|
],
|
|
|
|
|
"outboundTag": "block"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"inbounds": [
|
|
|
|
|
{
|
2023-03-07 04:57:12 +00:00
|
|
|
|
"listen": "0.0.0.0", // "0.0.0.0" 表示同时监听IPv4和IPv6
|
|
|
|
|
"port": 443, // 服务端监听的端口
|
2022-11-03 01:17:10 +00:00
|
|
|
|
"protocol": "vless",
|
|
|
|
|
"settings": {
|
|
|
|
|
"clients": [
|
|
|
|
|
{
|
2023-03-07 04:57:12 +00:00
|
|
|
|
"id": "", // 用户ID,执行 xray uuid 生成,或 1-30 字节的字符串
|
2022-11-03 01:17:10 +00:00
|
|
|
|
"flow": "xtls-rprx-vision"
|
|
|
|
|
}
|
|
|
|
|
],
|
2023-03-07 04:57:12 +00:00
|
|
|
|
"decryption": "none",
|
|
|
|
|
"fallbacks": [
|
|
|
|
|
{
|
|
|
|
|
"dest": "8001",
|
|
|
|
|
"xver": 1
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"alpn": "h2",
|
|
|
|
|
"dest": "8002",
|
|
|
|
|
"xver": 1
|
|
|
|
|
}
|
|
|
|
|
]
|
2022-11-03 01:17:10 +00:00
|
|
|
|
},
|
|
|
|
|
"streamSettings": {
|
|
|
|
|
"network": "tcp",
|
|
|
|
|
"security": "tls",
|
|
|
|
|
"tlsSettings": {
|
2023-03-07 04:57:12 +00:00
|
|
|
|
"rejectUnknownSni": true,
|
|
|
|
|
"minVersion": "1.2",
|
2022-11-03 01:17:10 +00:00
|
|
|
|
"certificates": [
|
|
|
|
|
{
|
2023-03-07 04:57:12 +00:00
|
|
|
|
"ocspStapling": 3600,
|
|
|
|
|
"certificateFile": "/etc/ssl/private/fullchain.cer", // 证书文件,建议用fullchain(全SSL证书链),若只有网站证书,会出现v2rayN能使用,v2rayNG不能使用的情况,通常不区分扩展名
|
|
|
|
|
"keyFile": "/etc/ssl/private/private.key" // 私钥文件
|
2022-11-03 01:17:10 +00:00
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"sniffing": {
|
|
|
|
|
"enabled": true,
|
|
|
|
|
"destOverride": [
|
|
|
|
|
"http",
|
|
|
|
|
"tls"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outbounds": [
|
|
|
|
|
{
|
|
|
|
|
"protocol": "freedom",
|
|
|
|
|
"tag": "direct"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"protocol": "blackhole",
|
|
|
|
|
"tag": "block"
|
|
|
|
|
}
|
2023-03-07 04:57:12 +00:00
|
|
|
|
],
|
|
|
|
|
"policy": {
|
|
|
|
|
"levels": {
|
|
|
|
|
"0": {
|
2023-03-08 15:59:02 +00:00
|
|
|
|
"handshake": 2, // 连接建立时的握手时间限制,单位为秒,默认值为 4,建议与默认值不同
|
|
|
|
|
"connIdle": 120 // 连接空闲的时间限制,单位为秒,默认值为 300,建议与默认值不同
|
|
|
|
|
}
|
2023-03-07 04:57:12 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-11-03 01:17:10 +00:00
|
|
|
|
}
|