添加域名(20230518)
开发中
开发环境
http://39.100.59.112:8000
开发环境
http://39.100.59.112:8000
POST
http://39.100.59.112:8000
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Accept
string
必需
默认值:
application/json
Body 参数application/json
domain
string
加速域名
config_list
array [object {10}]
七层配置列表
protocol
string
代理协议
port
integer
代理端口
uri_forward
string
uri转发
redirect
boolean
301跳转
overload_type
integer
并发超限类型
overload_status_code
integer
并发超限阻断状态码
overload_redirect_url
string
并发超限跳转
load_balancing
integer
负载均衡
server
string
必需
source_addresses
array [object {6}]
源地址
primary_domain
string
主域名
domain_config
object
域名相关配置
cache_total_size_limit
integer
必需
cache_file_size_limit
integer
必需
nodes
array [object {3}]
节点列表
node_uuid
string
节点uuid
priority
integer
优先级
node_type
string
主备标记
four_layers_config
array [object {10}]
四层转发配置
protocol
string
协议
tcp_version
integer
TCP版本
port
integer
端口号
max_connection
string
最大并行连接数
new_connection
string
新建连接数量限制
load_balancing
string
负载均衡
health_check_active
boolean
可选
source_address
array [object {3}]
源地址
proxy_protocol
integer
转发真实IP
rate_limit
integer
可选
示例
{
"domain": "string",
"config_list": [
{
"protocol": "string",
"port": 0,
"uri_forward": "string",
"redirect": true,
"overload_type": 0,
"overload_status_code": 0,
"overload_redirect_url": "string",
"load_balancing": 0,
"server": "string",
"source_addresses": [
{
"address": "string",
"protocol": "string",
"concurrent": 0,
"weight": 0,
"port": 0,
"sni": "string"
}
]
}
],
"primary_domain": "string",
"domain_config": {
"cache_total_size_limit": 0,
"cache_file_size_limit": 0
},
"nodes": [
{
"node_uuid": "string",
"priority": 0,
"node_type": "string"
}
],
"four_layers_config": [
{
"protocol": "string",
"tcp_version": 0,
"port": 0,
"max_connection": "string",
"new_connection": "string",
"load_balancing": "string",
"health_check_active": true,
"source_address": [
{
"address": "string",
"port": 0,
"weight": 0
}
],
"proxy_protocol": 0,
"rate_limit": 0
}
]
}
示例代码
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://39.100.59.112:8000/domain' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain": "string",
"config_list": [
{
"protocol": "string",
"port": 0,
"uri_forward": "string",
"redirect": true,
"overload_type": 0,
"overload_status_code": 0,
"overload_redirect_url": "string",
"load_balancing": 0,
"server": "string",
"source_addresses": [
{
"address": "string",
"protocol": "string",
"concurrent": 0,
"weight": 0,
"port": 0,
"sni": "string"
}
]
}
],
"primary_domain": "string",
"domain_config": {
"cache_total_size_limit": 0,
"cache_file_size_limit": 0
},
"nodes": [
{
"node_uuid": "string",
"priority": 0,
"node_type": "string"
}
],
"four_layers_config": [
{
"protocol": "string",
"tcp_version": 0,
"port": 0,
"max_connection": "string",
"new_connection": "string",
"load_balancing": "string",
"health_check_active": true,
"source_address": [
{
"address": "string",
"port": 0,
"weight": 0
}
],
"proxy_protocol": 0,
"rate_limit": 0
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object (节点信息(全量))
必需
id
integer
必需
primary_ip
string
主IP(20230429新增)
node_ip
array [object {3}]
必需
node_name
string
名称
node_uuid
string
节点uuid
alive
boolean
节点存活性(20230429新增)
示例
{
"code": 0,
"message": "string",
"data": {
"id": 0,
"primary_ip": "string",
"node_ip": [
{
"node_ip": "string",
"isp": "string",
"connectivity": true
}
],
"node_name": "string",
"node_uuid": "string",
"alive": true
}
}