URL: http://your_ip:port/api/server/getPage
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 获取server分页列表
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
current | int32 | 当前页数(从1开始) | true | - |
limit | int32 | 每页数量(默认为10) | true | - |
keywords | string | 查询关键字 | true | - |
Request-example:
curl -i http://your_ip:port/api/server/getPage?current=am28jh&limit=10&keywords=gmci3u
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
└─count | int64 | 总记录数 | - |
└─curr | int32 | 起始页(从1开始) | - |
└─limit | int32 | 每页记录数 | - |
└─records | array | 列表内容 | - |
└─id | string | 主键 | - |
└─serverName | string | 监听域名 | - |
└─listen | string | 监听ip端口 (格式 ip:port或port) | - |
└─def | int32 | 是否为默认server 0否(默认) 1是 | - |
└─rewrite | int32 | 是否http跳转https 0否(默认) 1是 | - |
└─rewriteListen | string | http跳转https监听ip端口,默认为80 (格式 ip:port或port) | - |
└─ssl | int32 | 是否开启ssl 0否(默认) 1是 | - |
└─http2 | int32 | 是否开启http2 0否(默认) 1是 | - |
└─proxyProtocol | int32 | 是否开启proxy_protocol 0否(默认) 1是 | - |
└─pem | string | ssl证书pem文件路径 | - |
└─key | string | ssl证书key文件路径 | - |
└─proxyType | int32 | 代理类型 0:http(默认) 1:tcp 2:udp | - |
└─proxyUpstreamId | string | 代理upstream的id | - |
└─enable | boolean | 是否启用 true:启用(默认) false:禁用 | - |
└─descr | string | 描述 | - |
└─protocols | string | 加密协议 (默认:TLSv1 TLSv1.1 TLSv1.2 TLSv1.3) | - |
└─passwordId | string | 使用的password文件Id | - |
Response-example:
{
"success":true,
"status":"5apfo5",
"msg":"yt3ai7",
"obj":{
"count":986,
"curr":530,
"limit":10,
"records":[
{
"id":"45",
"serverName":"鹤轩.白",
"listen":"0prb73",
"def":168,
"rewrite":182,
"rewriteListen":"6ggh7u",
"ssl":735,
"http2":539,
"proxyProtocol":159,
"pem":"inoiaq",
"key":"c44lt0",
"proxyType":323,
"proxyUpstreamId":"45",
"enable":true,
"descr":"vvpe1q",
"protocols":"zq3ak2",
"passwordId":"45"
}
]
}
}
URL: http://your_ip:port/api/server/insertOrUpdate
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 添加或编辑server
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | 主键 | false | - |
serverName | string | 监听域名 | false | - |
listen | string | 监听ip端口 (格式 ip:port或port) | true | - |
def | int32 | 是否为默认server 0否(默认) 1是 | false | - |
rewrite | int32 | 是否http跳转https 0否(默认) 1是 | false | - |
rewriteListen | string | http跳转https监听ip端口,默认为80 (格式 ip:port或port) | false | - |
ssl | int32 | 是否开启ssl 0否(默认) 1是 | false | - |
http2 | int32 | 是否开启http2 0否(默认) 1是 | false | - |
proxyProtocol | int32 | 是否开启proxy_protocol 0否(默认) 1是 | false | - |
pem | string | ssl证书pem文件路径 | false | - |
key | string | ssl证书key文件路径 | false | - |
proxyType | int32 | 代理类型 0:http(默认) 1:tcp 2:udp | false | - |
proxyUpstreamId | string | 代理upstream的id | false | - |
enable | boolean | 是否启用 true:启用(默认) false:禁用 | false | - |
descr | string | 描述 | false | - |
protocols | string | 加密协议 (默认:TLSv1 TLSv1.1 TLSv1.2 TLSv1.3) | false | - |
passwordId | string | 使用的password文件Id | false | - |
Request-example:
curl -i http://your_ip:port/api/server/insertOrUpdate?rewriteListen=3r7p63&key=w4l1bh&listen=09xusm&protocols=ulhmpa&proxyProtocol=948&seq=0&pem=qm42n3&descr=n6q0ov&updateTime=1641871596310&serverName=鹤轩.白&proxyType=303&pemStr=btwgd2&def=448&enable=true&proxyUpstreamId=45&id=45&passwordId=45&ssl=812&keyStr=c9535u&http2=928&createTime=1641871596310&rewrite=128
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"ibmlr3",
"msg":"ml9q3z",
"obj":{
}
}
URL: http://your_ip:port/api/server/delete
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 删除server
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | 反向代理id | true | - |
Request-example:
curl -i http://your_ip:port/api/server/delete?id=45
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"iqy47a",
"msg":"azv4p7",
"obj":{
}
}
URL: http://your_ip:port/api/server/getLocationByServerId
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 根据serverId获取location列表
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
serverId | string | 反向代理id | true | - |
Request-example:
curl -i http://your_ip:port/api/server/getLocationByServerId?serverId=45
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
└─id | string | 主键 | - |
└─serverId | string | 所属反向代理serverId | - |
└─path | string | 监控路径 例:/ | - |
└─type | int32 | 代理类型 0:动态代理(默认) 1:静态代理 2:负载均衡 3:空白代理 | - |
└─value | string | 动态代理目标 (例:http://10.10.10.1:8080/) | - |
└─upstreamType | string | 代理负载协议,http or https | - |
└─upstreamId | string | 代理负载均衡upstream的id | - |
└─upstreamPath | string | 代理负载额外路径,默认为空 | - |
└─rootPath | string | 静态代理路径 (例:/home/www) | - |
└─rootPage | string | 静态代理默认页面 (例:index.html) | - |
└─rootType | string | 静态代理类型 root:根路径模式 alias:别名模式 | - |
└─header | int32 | 是否携带Host参数 0否 1是(默认) | - |
└─websocket | int32 | 是否开启websocket支持 0否(默认) 1是 | - |
Response-example:
{
"success":true,
"status":"kilgm4",
"msg":"um1ium",
"obj":[
{
"id":"45",
"serverId":"45",
"path":"q6c9bl",
"type":828,
"value":"suqxyi",
"upstreamType":"d3i9xl",
"upstreamId":"45",
"upstreamPath":"l45vw3",
"rootPath":"2hjcec",
"rootPage":"ws27nb",
"rootType":"5ccy8i",
"header":241,
"websocket":252
}
]
}
URL: http://your_ip:port/api/server/insertOrUpdateLocation
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 添加或编辑location
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | 主键 | false | - |
serverId | string | 所属反向代理serverId | true | - |
path | string | 监控路径 例:/ | true | - |
type | int32 | 代理类型 0:动态代理(默认) 1:静态代理 2:负载均衡 3:空白代理 | false | - |
value | string | 动态代理目标 (例:http://10.10.10.1:8080/) | false | - |
upstreamType | string | 代理负载协议,http or https | false | - |
upstreamId | string | 代理负载均衡upstream的id | false | - |
upstreamPath | string | 代理负载额外路径,默认为空 | false | - |
rootPath | string | 静态代理路径 (例:/home/www) | false | - |
rootPage | string | 静态代理默认页面 (例:index.html) | false | - |
rootType | string | 静态代理类型 root:根路径模式 alias:别名模式 | false | - |
header | int32 | 是否携带Host参数 0否 1是(默认) | false | - |
websocket | int32 | 是否开启websocket支持 0否(默认) 1是 | false | - |
Request-example:
curl -i http://your_ip:port/api/server/insertOrUpdateLocation?createTime=1641871596310&locationParamJson=30rgac&upstreamType=lebfju&updateTime=1641871596310&path=mgt8hc&type=21&rootPage=6mixs1&header=807&value=llfa10&upstreamId=45&rootType=46asvm&rootPath=mdejkj&websocket=224&id=45&serverId=45&upstreamPath=mqqzqf
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"tw4lux",
"msg":"77ywvi",
"obj":{
}
}
URL: http://your_ip:port/api/server/deleteLocation
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 删除location
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | 代理目标location的id | true | - |
Request-example:
curl -i http://your_ip:port/api/server/deleteLocation?id=45
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"z7plds",
"msg":"rgom7n",
"obj":{
}
}