创建隧道
POST
http://cf-v2.uapis.cn/create_tunnel
请求参数
Body 参数application/json
token
string
用户Token
tunnelname
string
隧道名
node
string
节点名
localip
string
本地IP
porttype
string
端口类型
localport
integer
本地端口
remoteport
integer
外网端口
banddomain
string
绑定域名
encryption
boolean
数据加密
compression
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?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--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"
}
修改于 2024-09-21 14:55:24