添加单条四层转发
请求URL
{{url}}/api/stream/create
请求方式
post
Header
字段名
示例值
必选
类型
说明
x-api-key
{{x-api-key}}
是
string
无
x-api-secret
{{x-api-secret}}
是
string
无
请求参数示例
{
"user_package": 7,
"listen": [
{
"protocol": "tcp",
"port": "88"
}
],
"balance_way": "ip_hash",
"proxy_protocol": true,
"backend_port": 80,
"backend": [
{
"addr": "1.1.1.1",
"weight": 1,
"state": "up"
}
],
"conn_limit": 100,
"acl": {
"default_action": "allow",
"rule": [
{
"ip": "1.1.1.1",
"action": "deny"
}
]
}
}
请求json字段说明
字段名
必选
类型
说明
user_package
是
string
已购套餐ID
listen
是
array
无
listen.protocol
是
string
可选为tcp或udp
listen.port
是
string
端口
balance_way
是
string
源站负载均衡方式,可选为ip_hash、rr、least_conn、random
proxy_protocol
是
boolean
回源是否使用proxy protocol协议
backend_port
是
string
无
backend
是
array
无
backend.addr
是
string
无
backend.weight
是
string
无
backend.state
是
string
state可选为up、down、backup
conn_limit
是
string
连接数限制
acl
是
object
无
acl.default_action
是
string
default_action可选为allow、deny
acl.rule
是
array
无
acl.rule.ip
是
string
无
acl.rule.action
是
string
rule中的action可选为allow,deny
成功返回示例
{
"code": 0,
"data": null,
"msg": "四层转发添加成功"
}
Last updated