shadowsocks-hub icon indicating copy to clipboard operation
shadowsocks-hub copied to clipboard

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

Open perfect-network opened this issue 5 years ago • 0 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"}]

perfect-network avatar Jun 15 '19 08:06 perfect-network