Files
mmw-agent/internal/handler/xray_default_config.json
T
2026-04-07 16:35:45 +08:00

104 lines
2.5 KiB
JSON

{
"log": {
"access": "/var/log/xray/access.log",
"error": "/var/log/xray/error.log",
"loglevel": "error"
},
"dns": {},
"api": {
"tag": "api",
"services": [
"HandlerService",
"LoggerService",
"StatsService",
"RoutingService"
]
},
"stats": {},
"policy": {
"levels": {
"0": {
"handshake": 5,
"connIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 2,
"statsUserUplink": true,
"statsUserDownlink": true
}
},
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true,
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"protocol": [
"bittorrent"
],
"marktag": "ban_bt",
"outboundTag": "block"
},
{
"type": "field",
"ip": [
"geoip:cn"
],
"marktag": "ban_geoip_cn",
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geosite:openai"
],
"marktag": "fix_openai",
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "block"
}
]
},
"inbounds": [
{
"tag": "api",
"port": 46736,
"listen": "127.0.0.1",
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "block",
"protocol": "blackhole"
}
],
"metrics": {
"tag": "Metrics",
"listen": "127.0.0.1:38889"
}
}