Skip to content

Problem with API #4632

Answered by vrnobody
seneaLL asked this question in Q&A
Apr 20, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

In order to use the statistics feature, you need to enable the corresponding options in "policy" object and add an empty "stats" object in config file.
I don't know much about the "statsUserOnline" feature, sorry I can't help you with that.

config.json:

{
  "log": {
    "loglevel": "debug"
  },
  "api": {
    "tag": "api",
    "listen": "127.0.0.1:10085",
    "services": [
      "StatsService"
    ]
  },
  "stats": {},
  "policy": {
    "levels": {
      "0": {
        "statsUserUplink": true,
        "statsUserDownlink": true,
        "statsUserOnline": true
      }
    },
    "system": {
      "statsInboundUplink": true,
      "statsInboundDownlink": true
    }
  },
  "inbounds": [
    …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@seneaLL
Comment options

@vrnobody
Comment options

Answer selected by seneaLL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants