{ // VLESS + Reality
"log": {
"access": "/var/log/xray/access.log",
"error": "/var/log/xray/error.log",
"loglevel": "warning"
},
"inbounds": [
// [inbound] 如果你想使用其它翻墙服务端如(HY2或者NaiveProxy)对接v2ray的分流规则, 那么取消下面一段的注释, 并让其它翻墙服务端接到下面这个socks 1080端口
// {
// "listen":"127.0.0.1",
// "port":1080,
// "protocol":"socks",
// "sniffing":{
// "enabled":true,
// "destOverride":[
// "http",
// "tls"
// ]
// },
// "settings":{
// "auth":"noauth",
// "udp":false
// }
// },
{
"listen": "0.0.0.0",
"port": 443, //
"protocol": "vless",
"settings": {
"clients": [
{
"id": "2256c1e1-ec87-4b8b-9939-55da9f1a77c3", // This is an example of uuid. Run 'xray uuid' on your server to get uuid
"flow": "xtls-rprx-vision"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"show": false,
"dest": "learn.microsoft.com:443", //
"xver": 0,
"serverNames": ["learn.microsoft.com"], //
"privateKey": "YDgxNzUyNTk2ZjIxYjRjZjI1YTllYzQyZDEzYzRlNDI", // This is an example key. Run xray x25519 on your server to get your own private key
"shortIds": ["1bb1d10704adf0ba"] //
}
},
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls", "quic"]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
// [outbound]
{
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv4"
},
"tag": "force-ipv4"
},
{
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv6"
},
"tag": "force-ipv6"
},
{
"protocol": "socks",
"settings": {
"servers": [{
"address": "127.0.0.1",
"port": 40000 //warp socks5 port
}]
},
"tag": "socks5-warp"
},
{
"protocol": "blackhole",
"tag": "block"
}
],
"dns": {
"servers": [
"8.8.8.8",
"1.1.1.1",
"2001:4860:4860::8888",
"2606:4700:4700::1111",
"localhost"
]
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
// [routing-rule]
//{
// "type": "field",
// "domain": ["geosite:google", "geosite:openai"], //
// "outboundTag": "force-ipv6" // force-ipv6 // force-ipv4 // socks5-warp
//},
//{
// "type": "field",
// "domain": ["geosite:cn"], //
// "outboundTag": "force-ipv6" // force-ipv6 // force-ipv4 // socks5-warp // blocked
//},
//{
// "type": "field",
// "ip": ["geoip:cn"], // ***
// "outboundTag": "force-ipv6" // force-ipv6 // force-ipv4 // socks5-warp // blocked
//},
{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "block"
}
]
}
}