From c595db19b919decd77381576daa105fa6173cd06 Mon Sep 17 00:00:00 2001 From: avengexyz <58532751+avengexyz@users.noreply.github.com> Date: Sun, 5 Jan 2020 22:20:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=8625.4=E7=89=88?= =?UTF-8?q?=E6=9C=ACwebapi=E5=8F=82=E6=95=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自己测试的25.4版本 webapi 需要的参数 --- docs/webapi.md | 231 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 docs/webapi.md diff --git a/docs/webapi.md b/docs/webapi.md new file mode 100644 index 0000000..539766b --- /dev/null +++ b/docs/webapi.md @@ -0,0 +1,231 @@ +获取客户端列表 + +url='http://你的域名或者网址/client/list/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| search | 搜索 | +| order | 排序asc 正序 desc倒序 | +| offset | 分页(第几页) | +| limit | 条数(分页显示的条数) | + +*** +获取单个客户端 + +url='http://你的域名或者网址/client/getclient/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 客户端id | + +*** +添加客户端 + +url='http://你的域名或者网址/client/add/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| remark | 备注 | +| u | basic权限认证用户名 | +| p | basic权限认证密码 | +| limit | 条数(分页显示的条数) | +| vkey | 客户端验证密钥 | +| config\_conn\_allow | 是否允许客户端以配置文件模式连接 1允许 0不允许 | +| compress | 压缩1允许 0不允许 | +| crypt | 是否加密(1或者0)1允许 0不允许 | +| rate\_limit | 带宽限制 单位KB/S 空则为不限制 | +| flow\_limit | 流量限制 单位M 空则为不限制 | +| max\_conn | 客户端最大连接数量 空则为不限制 | +| max\_tunnel | 客户端最大隧道数量 空则为不限制 | + +*** +修改客户端(25.4版本有问题暂时不能用) + +url='http://你的域名或者网址/client/edit/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| remark | 备注 | +| u | basic权限认证用户名 | +| p | basic权限认证密码 | +| limit | 条数(分页显示的条数) | +| vkey | 客户端验证密钥 | +| config\_conn\_allow | 是否允许客户端以配置文件模式连接 1允许 0不允许 | +| compress | 压缩1允许 0不允许 | +| crypt | 是否加密(1或者0)1允许 0不允许 | +| rate\_limit | 带宽限制 单位KB/S 空则为不限制 | +| flow\_limit | 流量限制 单位M 空则为不限制 | +| max\_conn | 客户端最大连接数量 空则为不限制 | +| max\_tunnel | 客户端最大隧道数量 空则为不限制 | +| id | 要修改的客户端id | + +*** +删除客户端 + +url='http://你的域名或者网址/client/del/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 要删除的客户端id | + +*** +获取域名解析列表 + +url='http://你的域名或者网址/index/hostlist/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| search | 搜索(可以搜域名/备注什么的) | +| offset | 分页(第几页) | +| limit | 条数(分页显示的条数) | + +*** +添加域名解析 + +url='http://你的域名或者网址/index/addhost/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| remark | 备注 | +| host | 域名 | +| scheme | 协议类型(三种 all http https) | +| location | url路由 空则为不限制 | +| client\_id | 客户端id | +| target | 内网目标(ip:端口) | +| header | request header 请求头 | +| hostchange | request host 请求主机 | + +*** +修改域名解析 + +url='http://你的域名或者网址/index/edithost/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| remark | 备注 | +| host | 域名 | +| scheme | 协议类型(三种 all http https) | +| location | url路由 空则为不限制 | +| client\_id | 客户端id | +| target | 内网目标(ip:端口) | +| header | request header 请求头 | +| hostchange | request host 请求主机 | +| id | 需要修改的域名解析id | + +*** +删除域名解析 + +url='http://你的域名或者网址/index/delhost/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 需要删除的域名解析id | + +*** +获取单条隧道信息 + +url='http://你的域名或者网址/index/getonetunnel/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 隧道的id | + +*** +获取隧道列表 + +url='http://你的域名或者网址/index/gettunnel/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| client\_id | 穿透隧道的客户端id | +| type | 类型tcp udp httpProx socks5 secret p2p | +| search | 搜索 | +| offset | 分页(第几页) | +| limit | 条数(分页显示的条数) | + +*** +添加隧道 + +url='http://你的域名或者网址/index/add/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| type | 类型tcp udp httpProx socks5 secret p2p | +| remark | 备注 | +| port | 服务端端口 | +| target | 目标(ip:端口) | +| client\_id | 客户端id | + +*** +修改隧道 + +url='http://你的域名或者网址/index/edit/'; + +*** +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| type | 类型tcp udp httpProx socks5 secret p2p | +| remark | 备注 | +| port | 服务端端口 | +| target | 目标(ip:端口) | +| client\_id | 客户端id | +| id | 隧道id | + +*** +删除隧道 + +url='http://你的域名或者网址/index/del/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 隧道id | + +*** +隧道停止工作 + +url='http://你的域名或者网址/index/stop/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 隧道id | + +*** +隧道开始工作 + +url='http://你的域名或者网址/index/start/'; + +post提交的数据 + +| 参数 | 含义 | +| --- | --- | +| id | 隧道id | \ No newline at end of file From 103268a5dca130df2890c13969aea1d0d70faafe Mon Sep 17 00:00:00 2001 From: avengexyz <58532751+avengexyz@users.noreply.github.com> Date: Mon, 6 Jan 2020 01:11:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=87=8D=E6=96=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=9A=84wenapi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重新修改的wenapi --- docs/webapi.md | 96 ++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/docs/webapi.md b/docs/webapi.md index 539766b..836358b 100644 --- a/docs/webapi.md +++ b/docs/webapi.md @@ -1,8 +1,9 @@ 获取客户端列表 -url='http://你的域名或者网址/client/list/'; +``` +POST /client/list/ +``` -post提交的数据 | 参数 | 含义 | | --- | --- | @@ -14,9 +15,10 @@ post提交的数据 *** 获取单个客户端 -url='http://你的域名或者网址/client/getclient/'; +``` +POST /client/getclient/ +``` -post提交的数据 | 参数 | 含义 | | --- | --- | @@ -25,9 +27,9 @@ post提交的数据 *** 添加客户端 -url='http://你的域名或者网址/client/add/'; - -post提交的数据 +``` +POST /client/add/ +``` | 参数 | 含义 | | --- | --- | @@ -47,9 +49,9 @@ post提交的数据 *** 修改客户端(25.4版本有问题暂时不能用) -url='http://你的域名或者网址/client/edit/'; - -post提交的数据 +``` +POST /client/edit/ +``` | 参数 | 含义 | | --- | --- | @@ -70,9 +72,9 @@ post提交的数据 *** 删除客户端 -url='http://你的域名或者网址/client/del/'; - -post提交的数据 +``` +POST /client/del/ +``` | 参数 | 含义 | | --- | --- | @@ -81,9 +83,9 @@ post提交的数据 *** 获取域名解析列表 -url='http://你的域名或者网址/index/hostlist/'; - -post提交的数据 +``` +POST /index/hostlist/ +``` | 参数 | 含义 | | --- | --- | @@ -94,9 +96,10 @@ post提交的数据 *** 添加域名解析 -url='http://你的域名或者网址/index/addhost/'; +``` +POST /index/addhost/ +``` -post提交的数据 | 参数 | 含义 | | --- | --- | @@ -112,9 +115,9 @@ post提交的数据 *** 修改域名解析 -url='http://你的域名或者网址/index/edithost/'; - -post提交的数据 +``` +POST /index/edithost/ +``` | 参数 | 含义 | | --- | --- | @@ -131,9 +134,9 @@ post提交的数据 *** 删除域名解析 -url='http://你的域名或者网址/index/delhost/'; - -post提交的数据 +``` +POST /index/delhost/ +``` | 参数 | 含义 | | --- | --- | @@ -142,9 +145,9 @@ post提交的数据 *** 获取单条隧道信息 -url='http://你的域名或者网址/index/getonetunnel/'; - -post提交的数据 +``` +POST /index/getonetunnel/ +``` | 参数 | 含义 | | --- | --- | @@ -153,9 +156,9 @@ post提交的数据 *** 获取隧道列表 -url='http://你的域名或者网址/index/gettunnel/'; - -post提交的数据 +``` +POST /index/gettunnel/ +``` | 参数 | 含义 | | --- | --- | @@ -168,9 +171,9 @@ post提交的数据 *** 添加隧道 -url='http://你的域名或者网址/index/add/'; - -post提交的数据 +``` +POST /index/add/ +``` | 参数 | 含义 | | --- | --- | @@ -183,10 +186,9 @@ post提交的数据 *** 修改隧道 -url='http://你的域名或者网址/index/edit/'; - -*** -post提交的数据 +``` +POST /index/edit/ +``` | 参数 | 含义 | | --- | --- | @@ -200,9 +202,9 @@ post提交的数据 *** 删除隧道 -url='http://你的域名或者网址/index/del/'; - -post提交的数据 +``` +POST /index/del/ +``` | 参数 | 含义 | | --- | --- | @@ -211,9 +213,9 @@ post提交的数据 *** 隧道停止工作 -url='http://你的域名或者网址/index/stop/'; - -post提交的数据 +``` +POST /index/stop/ +``` | 参数 | 含义 | | --- | --- | @@ -222,10 +224,10 @@ post提交的数据 *** 隧道开始工作 -url='http://你的域名或者网址/index/start/'; - -post提交的数据 +``` +POST /index/start/ +``` | 参数 | 含义 | | --- | --- | -| id | 隧道id | \ No newline at end of file +| id | 隧道id |