mirror of
https://github.com/EvgenyNerush/easy-xray.git
synced 2025-12-13 21:35:03 +03:00
add statistics support
This commit is contained in:
@@ -7,8 +7,44 @@
|
||||
"loglevel": "warning",
|
||||
"dnsLog": false
|
||||
},
|
||||
// Turns on traffic statistics, see https://xtls.github.io/en/config/stats.html#statsobject
|
||||
// and https://xtls.github.io/en/config/policy.html#policyobject
|
||||
// and special "api" tag below
|
||||
"stats": {
|
||||
},
|
||||
"policy": {
|
||||
"levels": {
|
||||
// default level
|
||||
"0": {
|
||||
"statsUserUplink": true,
|
||||
"statsUserDownlink": true
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"statsInboundUplink": true,
|
||||
"statsInboundDownlink": true,
|
||||
"statsOutboundUplink": true,
|
||||
"statsOutboundDownlink": true
|
||||
}
|
||||
},
|
||||
// enables API interface https://xtls.github.io/en/config/api.html#apiobject
|
||||
"api": {
|
||||
"tag": "api",
|
||||
"services": [ "StatsService" ]
|
||||
},
|
||||
// client-side inbound configuration
|
||||
"inbounds": [
|
||||
// gRPC API inbound, used to get statistics
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 8080,
|
||||
"protocol": "dokodemo-door",
|
||||
"settings": {
|
||||
"address": "127.0.0.1"
|
||||
},
|
||||
"tag": "api"
|
||||
},
|
||||
// socks proxy
|
||||
{
|
||||
"tag": "socks",
|
||||
"port": 800,
|
||||
@@ -22,12 +58,13 @@
|
||||
"tls"
|
||||
]
|
||||
},
|
||||
// settings of inbound `protocol` (see above)
|
||||
// settings of inbound "protocol" (see above)
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
}
|
||||
},
|
||||
// http/https proxy
|
||||
{
|
||||
"tag": "http",
|
||||
"port": 801,
|
||||
@@ -42,7 +79,7 @@
|
||||
],
|
||||
"routeOnly": false
|
||||
},
|
||||
// settings of inbound `protocol` (see above)
|
||||
// settings of inbound "protocol" (see above)
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
@@ -105,6 +142,13 @@
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"api"
|
||||
],
|
||||
"outboundTag": "api"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
|
||||
Reference in New Issue
Block a user