2017-08-04 20:38:22 +00:00
|
|
|
# API
|
|
|
|
The API system is intended for use with Desktop and Mobile clients.
|
|
|
|
It must be accessed using one of the following domains as the Host header:
|
|
|
|
|
|
|
|
```
|
|
|
|
admin.invalid
|
|
|
|
localhost.admin.daplie.me
|
|
|
|
```
|
|
|
|
|
2017-08-10 00:30:18 +00:00
|
|
|
All requests require an OAuth3 token in the request headers.
|
|
|
|
|
|
|
|
## Tunnel
|
|
|
|
|
|
|
|
### Check Status
|
2017-08-10 16:41:16 +00:00
|
|
|
* **URL** `/api/goldilocks@daplie.com/tunnel`
|
2017-08-10 00:30:18 +00:00
|
|
|
* **Method** `POST`
|
|
|
|
* **Reponse**: An object whose keys are the URLs for the tunnels, and whose
|
|
|
|
properties are arrays of the tunnel tokens.
|
|
|
|
|
|
|
|
This route with return only the sessions started by the same user who is
|
|
|
|
checking the status.
|
|
|
|
|
|
|
|
### Start Tunnel
|
2017-08-10 16:41:16 +00:00
|
|
|
* **URL** `/api/goldilocks@daplie.com/tunnel`
|
2017-08-10 00:30:18 +00:00
|
|
|
* **Method** `POST`
|
|
|
|
|
|
|
|
This route will use the stored token for the user matching the request
|
|
|
|
header to request a tunnel token from the audience of the stored token.
|
|
|
|
|
2017-08-04 20:38:22 +00:00
|
|
|
## Socks5 Proxy
|
|
|
|
|
|
|
|
### Check Status
|
2017-08-10 16:41:16 +00:00
|
|
|
* **URL** `/api/goldilocks@daplie.com/socks5`
|
2017-08-04 20:38:22 +00:00
|
|
|
* **Method** `GET`
|
|
|
|
* **Response**: The returned object will have up to two values inside
|
|
|
|
* `running`: boolean value to indicate if the proxy is currently active
|
|
|
|
* `port`: if the proxy is running this is the port it's running on
|
|
|
|
|
|
|
|
### Start Proxy
|
2017-08-10 16:41:16 +00:00
|
|
|
* **URL** `/api/goldilocks@daplie.com/socks5`
|
2017-08-04 20:38:22 +00:00
|
|
|
* **Method** `POST`
|
|
|
|
* **Response**: Same response as for the `GET` resquest
|
|
|
|
|
|
|
|
### Stop Proxy
|
2017-08-10 16:41:16 +00:00
|
|
|
* **URL** `/api/goldilocks@daplie.com/socks5`
|
2017-08-04 20:38:22 +00:00
|
|
|
* **Method** `DELETE`
|
|
|
|
* **Response**: Same response as for the `GET` resquest
|