端口映射管理

创建端口映射

管理员创建新的端口映射(异步执行)

post/admin/port-mappings

Request

  • Base URL
    http://localhost:8888/api/v1
  • URL
    http://localhost:8888/api/v1/admin/port-mappings
  • Auth
    API key in header Authorization

Request body

descriptionstring

端口用途描述

guestPortinteger required

起始端口

hostPortinteger

可选,不指定则自动分配,指定时作为起始端口

instanceIdinteger required
internalHoststring

控制端转发目标地址(容器IP)

ipv6Enabledboolean

IPv6Enabled is optional for backwards compatibility. NAT dual-stack providers default to both families; callers can explicitly set false when they intentionally need an IPv4-only mapping.

mappingType'node' | 'controller'

"node"(默认)或 "controller"(控制端转发)

portCountinteger

端口数量,默认1(单端口),最多1500个

protocol'tcp' | 'udp' | 'both' required

协议类型

Response

创建成功,返回任务ID

codeinteger
dataobject
messagestring
msgstring

Changes

No recorded changes to this operation across all 122 revisions of this API.