shadowsocks / shadowsocks-hub

A web app managing shadowsocks users, servers, nodes, products, accounts, and traffic. Suitable for internal use by companies, organizations, and friends.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何获取当前服务器在线用户及IP地址

perfect-network opened this issue · comments

如何获取当前服务器在线用户及IP地址 LIKE THIS

Get All Online User

Request method: POST
Request URL: https://host_name:port/online/all
Request Header: Content-Type: application/json
Response HTTP Status Code: 201 Created
Response Body: {"token","your_authentication_token"}
Response Error Status Code: 401 Unauthorized
500 Internal Server Error

Request example (curl):

curl -ik -H "Content-Type: application/json" -X POST https://localhost:4001/online/all   

Response example:

[{"user": user1,"ip":"122.44.55.66"},{"user": user2,"ip":"122.44.55.66"}]