- Check current status (on/off)
- Turn on/off or toggle the client
- Get server list
- Get current server
- Activate server
- Add new server
- Modify server
- Delete server
- Get current mode
- Switch mode
PORT: 9528
- 200 - Succeed
- 400 - Fail
- 404 (For
PATCH /servers/{ID}andDELETE /servers/{ID}) -{ID}Not found - 404 (For
GET /current) No server is activated
Note: To run the sample shell commands, replace the Id (if any) below for your own ones.
$ curl -X GET http://localhost:9528/status{"Enable": true}curl -X PUT http://localhost:9528/status -d 'Enable=false'Omit the argument Enable to toggle.
$ curl -X GET http://localhost:9528/servers[
{
"Id" : "93C127E0-49C9-4332-9CAD-EE6B9A3D1A8F",
"Method" : "chacha20-ietf-poly1305",
"Password" : "password",
"Plugin" : "",
"PluginOptions" : "",
"Remark" : "jp1",
"ServerHost" : "jp1-sta40.somehost.com",
"ServerPort" : 49234
},
{
"Id" : "71552DCD-B298-4591-B59A-82DA4B07AEF8",
"Method" : "chacha20-ietf-poly1305",
"Password" : "password",
"Plugin" : "",
"PluginOptions" : "",
"Remark" : "us1",
"ServerHost" : "us1-sta40.somehost.com",
"ServerPort" : 49234
},...
]$ curl -X GET http://localhost:9528/current{
"Id" : "93C127E0-49C9-4332-9CAD-EE6B9A3D1A8F",
"Method" : "chacha20-ietf-poly1305",
"Password" : "password",
"Plugin" : "",
"PluginOptions" : "",
"Remark" : "jp1",
"ServerHost" : "jp1-sta40.somehost.com",
"ServerPort" : 49234
}$ curl -X PUT http://localhost:9528/current -d 'Id=71552DCD-B298-4591-B59A-82DA4B07AEF8'$ curl -X POST http://localhost:9528/servers -d 'ServerPort=6666&ServerHost=tw1-sta40.somehost.com&Remark=someRemark&PluginOptions=&Plugin=&Password=myPassword&Method=chacha20-ietf-poly1305'$ curl -X PATCH http://localhost:9528/servers/71552DCD-B298-4591-B59A-82DA4B07AEF8 -d 'ServerPort=6666&Remark=someRemark'$ curl -X DELETE http://localhost:9528/servers/71552DCD-B298-4591-B59A-82DA4B07AEF8$ curl -X GET http://localhost:9528/mode{"Mode": "auto"}mode∈ {"auto", "global", "manual"}.
$ curl -X PUT http://localhost:9528/status -d 'Mode=global'