隧道管理

创建隧道

post/tunnels

Request body

namestring required

隧道名

type'tcp' | 'udp' | 'http' | 'https' | 'wol' | 'etcp' | 'eudp' required

隧道类型

nodeinteger required

节点 ID

notestring

备注信息

extrastring

自定义配置数据

local_ipstring

本地 IP, 除 wol 类型外必填

local_portinteger

本地端口, 除 wol 类型外必填

remotestring

远程信息, 端口或绑定域名 (http/https 类型必填)

Example request

{
  "name": "SampleTunnel",
  "node": 5,
  "extra": "key_1 = val_1\nkey_2 = val_2\nauto_https = auto\n",
  "local_ip": "127.0.0.1",
  "local_port": 810,
  "remote": "example.tld"
}

Response

创建成功

idinteger required

创建的隧道 ID

namestring required

创建的隧道名

remotestring

远程信息, 端口或绑定域名

Example response

{
  "id": 114514,
  "name": "SampleTunnel",
  "remote": "example.tld"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.