Skip to content

REST API

ByteInternetHK edited this page Jul 6, 2021 · 14 revisions

全部接口均以json格式传输
参数均以小驼峰方式命名


获取用户接口

GET /api/users

参数名称 参数类型 是否必须 备注
key string true 对接key
nodeId number true 节点id
all boolean false 是否请求所有用户数据

返回参数格式参考如下

{
  "add":[
    {
      "id": 1,
      "password": 123456,
      "method": "aes-256-gcm"
    },
    {
      "id": 2,
      "password": 123456,
      "method": "aes-256-gcm"
    },
  ],
  "delete":[
    {
      "id": 1,
      "password": 123456,
      "method": "aes-256-gcm"
    },
    {
      "id": 2,
      "password": 123456,
      "method": "aes-256-gcm"
    },
  ]
}

上报用户流量接口

POST /api/users


获取节点信息接口

此接口需根据具体后端去请求对应类型的接口

  • GET /api/ss
  • GET /api/v2ray
  • GET /api/trojan

考虑将其合并为 GET /api/{type}

参数名称 参数类型 是否必须 备注
key string true 对接key
nodeId number true 节点id

返回值根据具体的节点类型有不同字段返回值


上报节点流量接口

此接口需根据具体后端去请求对应类型的接口

  • GET /api/ss
  • GET /api/v2ray
  • GET /api/trojan

考虑将其合并为 GET /api/{type}


Clone this wiki locally