[Feature] Server Plugin - Ping and NewWorkConn RPC (#1702)

This commit is contained in:
Guy Lewin
2020-03-17 13:52:44 -04:00
committed by GitHub
parent 10acf638f8
commit a4b105dedb
6 changed files with 161 additions and 15 deletions

View File

@ -70,7 +70,7 @@ The response can look like any of the following:
### Operation
Currently `Login` and `NewProxy` operations are supported.
Currently `Login`, `NewProxy`, `Ping` and `NewWorkConn` operations are supported.
#### Login
@ -135,6 +135,43 @@ Create new proxy
}
```
#### Ping
Heartbeat from frpc
```
{
"content": {
"user": {
"user": <string>,
"metas": map<string>string
"run_id": <string>
},
"timestamp": <int64>,
"privilege_key": <string>
}
}
```
#### NewWorkConn
New work connection received from frpc (RPC sent after `run_id` is matched with an existing frp connection)
```
{
"content": {
"user": {
"user": <string>,
"metas": map<string>string
"run_id": <string>
},
"run_id": <string>
"timestamp": <int64>,
"privilege_key": <string>
}
}
```
### Server Plugin Configuration
```ini
@ -155,7 +192,7 @@ ops = NewProxy
addr: the address where the external RPC service listens on.
path: http request url path for the POST request.
ops: operations plugin needs to handle (e.g. "Login", "NewProxy").
ops: operations plugin needs to handle (e.g. "Login", "NewProxy", ...).
### Metadata