mirror of
https://github.com/fatedier/frp.git
synced 2025-07-06 16:30:55 +07:00
[Feature] Server Plugin - Ping and NewWorkConn RPC (#1702)
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user