Skip to content

创建隧道

  • 接口

    POST /create_tunnel

  • 请求参数

    JSON:

    参数类型必填说明
    tokenstr用户令牌
    tunnelnamestr隧道名称
    nodestr节点名称
    porttypestr详见下方
    localipstr本地ip
    localportint本地端口
    remoteportint详见下方
    banddomainstr详见下方
    encryptionbool是否数据加密
    compressionbool是否数据压缩
    extraparamsstrfrp额外参数

    porttyp 隧道类型 : 值为tcp/udp/http/https

    banddomain 绑定域名 : 当porttype值为http/https需填

    remoteport内网端口 : 当porttype值为tcp/udp需填

  • 返回

    JSON

    参数类型必返说明
    codeint返回状态码
    statestr请求是否成功
    msgstr返回消息
    datamap详见下方

    data

    当上方 statesuccess 返回

    参数类型必返说明
    namestr隧道名
    nodestr所属节点
    typestr隧道类型
    localipstr内网ip
    nportint内网端口
    dorpstr外网端口/连接域名
    encryptionstr是否数据加密
    compressionstr是否数据压缩
    apstrfrp额外参数
    statestr隧道状态
    client_versionstr上次启动frpc版本
    useridint隧道拥有者id
    today_traffic_inint今日该隧道上传流量
    today_traffic_outint今日该隧道下载流量
    cur_connsint当前隧道连接数
    idnull值为null
    ipnull值为null
    nodestatenull值为null
    uptimenull值为null

Released under the MIT License.