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
/create_tunnel

请求参数

Body 参数application/json
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
compression
boolean 
数据压缩
必需
传递true或false,可为string和boolean
extraparams
string 
额外参数
可选
不传递则默认为空
示例
{
  "token": "labore ut dolore",
  "tunnelname": "志场度达到",
  "node": "anim in",
  "localip": "100.5.204.64",
  "porttype": "sint cillum Duis non reprehenderit",
  "localport": 70,
  "remoteport": 93,
  "banddomain": "u.japoen@qq.com",
  "encryption": true,
  "compression": true,
  "extraparams": "culpa commodo"
}

示例代码

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/create_tunnel' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "labore ut dolore",
    "tunnelname": "志场度达到",
    "node": "anim in",
    "localip": "100.5.204.64",
    "porttype": "sint cillum Duis non reprehenderit",
    "localport": 70,
    "remoteport": 93,
    "banddomain": "u.japoen@qq.com",
    "encryption": true,
    "compression": true,
    "extraparams": "culpa commodo"
}'

返回响应

🟢200创建成功
application/json
Body
msg
string 
必需
code
integer 
必需
data
object 
必需
localPort
integer 
必需
node
string 
必需
remotePort
integer 
必需
compression
string 
必需
userID
integer 
必需
tunnelState
string 
必需
tunnelName
string 
必需
encryption
string 
必需
portType
string 
必需
localIP
string 
必需
bandDomain
null 
必需
extraParams
null 
必需
tunnelID
integer 
必需
state
string 
必需
示例
{
  "msg": "隧道创建成功",
  "code": 200,
  "data": {
    "localPort": 7070,
    "node": "test1",
    "remotePort": 12381,
    "compression": "false",
    "userID": 2,
    "tunnelState": "false",
    "tunnelName": "TiT5oUBQ",
    "encryption": "false",
    "portType": "tcp",
    "localIP": "127.0.0.1",
    "bandDomain": null,
    "extraParams": null,
    "tunnelID": 21
  },
  "state": "success"
}
上一页
隧道列表
下一页
删除隧道
Built with