ChmlFrpApi
  1. 隧道操作
ChmlFrpApi
  • 用户验证
    • 登录
      GET
    • 发送邮箱验证码
      POST
    • 注册
      GET
    • 用户信息
      GET
    • 重置令牌
      GET
    • 用户签到
      POST
    • 重置密码
      GET
    • 修改用户名
      GET
    • 修改QQ
      GET
    • 重置头像
      GET
    • 获取消息
      GET
  • 隧道操作
    • 隧道列表
      GET
    • 创建隧道
      POST
    • 删除隧道
      POST
    • 修改隧道
      POST
    • 获取配置文件
      GET
  • 节点操作
    • 节点列表
      GET
    • 节点详情
      GET
    • 节点状态
      GET
    • 节点在线率
      GET
    • 节点状态详情
      GET
  • 面板信息
    • 面板信息
      GET
    • API状态
      GET
  • 域名管理
    • 获取可用域名列表
      GET
    • 创建免费二级域名
      POST
    • 删除免费二级域名
      POST
    • 修改免费二级域名
      POST
    • 获取用户免费二级域名
      GET
  • 模组插件
    • 版本获取
  1. 隧道操作

修改隧道

POST
/update_tunnel
这里除了tunnelid、token参数是用于验证权限及隧道的之外,其他的均用于更新隧道。如tunnelname传递"tunnel1",则隧道名更新为"tunnel1"

请求参数

Body 参数application/json
tunnelid
integer 
隧道ID
必需
token
string 
用户Token
必需
tunnelname
string 
隧道名
必需
node
string 
节点名
必需
localip
string 
本地IP
可选
可选,不传递则默认为127.0.0.1
porttype
string 
端口类型
必需
仅允许tcp、udp、http、https,可为大写,也可大小写混用
localport
integer 
本地端口
必需
remoteport
integer 
外网端口
可选
如果porttype参数为tcp、udp,则这个字段为必须,同时禁止传递banddomain
banddomain
string 
绑定域名
可选
如果porttype参数为http、https,则这个字段为必须,同时禁止传递remoteport
encryption
boolean 
数据加密
可选
传递true或false,可为string和boolean。不传递则默认为false
compression
boolean 
数据压缩
可选
传递true或false,可为string和boolean。不传递则默认为false
extraparams
string 
额外参数
可选
不传递则默认为空
示例
{
  "tunnelid": 0,
  "token": "string",
  "tunnelname": "string",
  "node": "string",
  "localip": "string",
  "porttype": "string",
  "localport": 0,
  "remoteport": 0,
  "banddomain": "string",
  "encryption": true,
  "compression": true,
  "extraparams": "string"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://cf-v2.uapis.cn/update_tunnel' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tunnelid": 0,
    "token": "string",
    "tunnelname": "string",
    "node": "string",
    "localip": "string",
    "porttype": "string",
    "localport": 0,
    "remoteport": 0,
    "banddomain": "string",
    "encryption": true,
    "compression": true,
    "extraparams": "string"
}'

返回响应

🟢200成功
application/json
Body
code
integer 
状态码
必需
state
string 
状态
必需
msg
string 
返回
必需
这里的信息仅为示例,请以实际为准
示例
{
  "code": 0,
  "state": "string",
  "msg": "string"
}
上一页
删除隧道
下一页
获取配置文件
Built with