package v1 type User struct { ID int64 `json:"id" form:"id"` Username string `json:"username" form:"username"` Password string `json:"password" form:"password"` Fullname string `json:"fullname" form:"fullname"` Mobile string `json:"mobile" form:"mobile"` Tel string `json:"tel" form:"tel"` Email string `json:"email" form:"email"` Remark string `json:"remark" form:"remark"` Source string `json:"source" form:"source"` // 用户来源 NodeClusterId int64 `json:"nodeClusterId" form:"nodeClusterId"` // 节点集群ID } type Group struct { Name string `json:"name" form:"name"` } type Plan struct { UserId int64 `json:"userId" form:"userId"` PlanId int64 `json:"planId" form:"planId"` DayTo string `json:"dayTo" form:"dayTo"` // 结束日期,格式:YYYY-MM-DD,适用于按带宽和流量计费的套餐 Period string `json:"period" form:"period"` // 周期类型:yearly、seasonally、monthly,适用于按时间周期计费的套餐 CountPeriod int64 `json:"countPeriod" form:"countPeriod"` // 周期数量,适用于带宽和流量计费 Name string `json:"name" form:"name"` // 备注名称 IsFree bool `json:"isFree" form:"isFree"` // 可选项,是否免费 PeriodDayTo string `json:"periodDayTo" form:"periodDayTo"` // 可选项, 按周期计费的套餐结束日期 } type RenewalPlan struct { UserPlanId int64 `json:"userPlanId" form:"userPlanId"` DayTo string `json:"dayTo" form:"dayTo"` // 结束日期,格式:YYYY-MM-DD,适用于按带宽和流量计费的套餐 Period string `json:"period" form:"period"` // 周期类型:yearly、seasonally、monthly,适用于按时间周期计费的套餐 CountPeriod int64 `json:"countPeriod" form:"countPeriod"` // 周期数量,适用于带宽和流量计费 IsFree bool `json:"isFree" form:"isFree"` // 可选项,是否免费 PeriodDayTo string `json:"periodDayTo" form:"periodDayTo"` // 可选项, 按周期计费的套餐结束日期 } type Website struct { UserId int64 `json:"userId" form:"userId"` //可选项,用户ID,如果不想指定用户,此值可以为0 AdminId int64 `json:"adminId" form:"adminId"` //可选项,管理员ID Type string `json:"type" form:"type"` // 类型:httpProxy(HTTP反向代理,一般CDN服务都选这个)、httpWeb(静态文件服务,只会从服务器上读取文件内容,不会转发到源站)、tcpProxy(TCP反向代理)、udpProxy(UDP反向代理) Name string `json:"name" form:"name"` // 网站名称 Description string `json:"description" form:"description"` // 可选项,网站描述 ServerNamesJSON []byte `json:"serverNamesJSON,omitempty" form:"serverNamesJSON"` // 域名列表 json:server_names HttpJSON TypeJSON `json:"httpJSON,omitempty" form:"httpJSON"` // HTTP协议设置,当type为httpProxy或者httpWeb时填写 json:http_protocol HttpsJSON TypeJSON `json:"httpsJSON,omitempty" form:"httpsJSON"` // HTTPS协议设置,当type为httpProxy或者httpWeb时填写 json:https_protocol TcpJSON []byte `json:"tcpJSON,omitempty" form:"tcpJSON"` // TCP协议设置,当type为tcpProxy时填写 json:tcp_protocol TlsJSON []byte `json:"tlsJSON,omitempty" form:"tlsJSON"` // TLS协议设置,当type为tcpProxy时填写 json:tls_protocol UdpJSON []byte `json:"udpJSON,omitempty" form:"udpJSON"` // UDP协议设置,当type为udpProxy时填写 json:udp_protocol WebId int64 `json:"webId" form:"webId"` // 可选项,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作= ReverseProxyJSON []byte `json:"reverseProxyJSON,omitempty" form:"reverseProxyJSON"` // 反向代理(包含源站)配置引用,此项可以在创建网站后再设置 json:reverse_proxy_ref ServerGroupIds []int64 `json:"serverGroupIds" form:"serverGroupIds"` // 可选项,所属网站分组ID列表 UserPlanId int64 `json:"userPlanId" form:"userPlanId"` // 可选项,套餐ID NodeClusterId int64 `json:"nodeClusterId" form:"nodeClusterId"` // 所部署的集群ID IncludeNodesJSON string `json:"includeNodesJSON" form:"includeNodesJSON"` // 备用参数,不用填写 ExcludeNodesJSON string `json:"excludeNodesJSON" form:"excludeNodesJSON"` // 备用参数,不用填写 } type WebsiteSend struct { UserId int64 `json:"userId" form:"userId"` //可选项,用户ID,如果不想指定用户,此值可以为0 AdminId int64 `json:"adminId" form:"adminId"` //可选项,管理员ID Type string `json:"type" form:"type"` // 类型:httpProxy(HTTP反向代理,一般CDN服务都选这个)、httpWeb(静态文件服务,只会从服务器上读取文件内容,不会转发到源站)、tcpProxy(TCP反向代理)、udpProxy(UDP反向代理) Name string `json:"name" form:"name"` // 网站名称 Description string `json:"description" form:"description"` // 可选项,网站描述 ServerNamesJSON []byte `json:"serverNamesJSON,omitempty" form:"serverNamesJSON"` // 域名列表 json:server_names HttpJSON []byte `json:"httpJSON,omitempty" form:"httpJSON"` // HTTP协议设置,当type为httpProxy或者httpWeb时填写 json:http_protocol HttpsJSON []byte `json:"httpsJSON,omitempty" form:"httpsJSON"` // HTTPS协议设置,当type为httpProxy或者httpWeb时填写 json:https_protocol TcpJSON []byte `json:"tcpJSON,omitempty" form:"tcpJSON"` // TCP协议设置,当type为tcpProxy时填写 json:tcp_protocol TlsJSON []byte `json:"tlsJSON,omitempty" form:"tlsJSON"` // TLS协议设置,当type为tcpProxy时填写 json:tls_protocol UdpJSON []byte `json:"udpJSON,omitempty" form:"udpJSON"` // UDP协议设置,当type为udpProxy时填写 json:udp_protocol WebId int64 `json:"webId" form:"webId"` // 可选项,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作= ReverseProxyJSON []byte `json:"reverseProxyJSON,omitempty" form:"reverseProxyJSON"` // 反向代理(包含源站)配置引用,此项可以在创建网站后再设置 json:reverse_proxy_ref ServerGroupIds []int64 `json:"serverGroupIds" form:"serverGroupIds"` // 可选项,所属网站分组ID列表 UserPlanId int64 `json:"userPlanId" form:"userPlanId"` // 可选项,套餐ID NodeClusterId int64 `json:"nodeClusterId" form:"nodeClusterId"` // 所部署的集群ID IncludeNodesJSON string `json:"includeNodesJSON" form:"includeNodesJSON"` // 备用参数,不用填写 ExcludeNodesJSON string `json:"excludeNodesJSON" form:"excludeNodesJSON"` // 备用参数,不用填写 } type TypeJSON struct { IsOn bool `json:"isOn" form:"isOn"` // 是否开启 Listen []Listen `json:"listen" form:"listen"` // 监听端口 SslPolicyRef SslPolicyRef `json:"sslPolicyRef" form:"sslPolicyRef"` // SSL策略 } type Listen struct { Protocol string `json:"protocol" form:"protocol"` // 协议类型:tcp、udp Host string `json:"host" form:"host"` // 监听地址 Port string `json:"portRange" form:"portRange"` // 端口 } type SslPolicyRef struct { IsOn bool `json:"isOn" form:"isOn"` // 是否开启 isOn SslPolicyId int64 `json:"sslPolicyId" form:"sslPolicyId"` // SSL策略ID } type EditWebsite struct { Id int64 `json:"id" form:"id"` TypeJSON []byte `json:"typeJSON" form:"typeJSON"` } type ProxyJson struct { ServerId int64 `json:"serverId" form:"serverId"` // 网站ID JSON byte `json:"JSON" form:"JSON"` // TCP协议设置 } type Origin struct { OriginId int64 `json:"originId" form:"originId"` Name string `json:"name" form:"name"` // 源站名称 Addr Addr `json:"addr" form:"addr"` // 源站地址 OssJSON []byte `json:"ossJSON" form:"ossJSON"` // Oss配置 json:oss_config Description string `json:"description" form:"description"` // 备注 Weight int64 `json:"weight" form:"weight"` // 权重 IsOn bool `json:"isOn" form:"isOn"` // 是否开启 Domains []string `json:"domains" form:"domains"` // 域名 CertRefJSON []byte `json:"certRefJSON" form:"certRefJSON"` // 证书引用,可选项 Host string `json:"host" form:"host"` // 回源主机域名,可选项 FollowPort bool `json:"followPort" form:"followPort"` // 是否跟随端口,可选项 Http2Enabled bool `json:"http2Enabled" form:"http2Enabled"` //可选项,是否支持HTTP/2,只在HTTPS源站时生效 TlsSecurityVerifyMode string `json:"tlsSecurityVerifyMode" form:"tlsSecurityVerifyMode"` // // 安全校验模式:auto系统默认,force强校验,skip不校验 } type Addr struct { Protocol string `json:"protocol" form:"protocol"` // 协议类型:tcp、udp Host string `json:"host" form:"host"` // 监听地址 Port string `json:"portRange" form:"portRange"` // 端口 } type SSlCert struct { SslCertId int64 `json:"sslCertId" form:"sslCertId"` IsOn bool `json:"isOn" form:"isOn"` //是否开启 UserId int64 `json:"userId" form:"userId"` //用户id Name string `json:"name" form:"name"` //证书名称 Description string `json:"description" form:"description"` //证书描述 ServerName string `json:"serverName" form:"serverName"` //证书绑定的域名 IsCA bool `json:"isCA" form:"isCA"` //是否是CA证书 CertData []byte `json:"certData" form:"certData"` //证书内容 KeyData []byte `json:"keyData" form:"keyData"` //证书内容 TimeBeginAt int64 `json:"timeBeginAt" form:"timeBeginAt"` //证书生效时间 TimeEndAt int64 `json:"timeEndAt" form:"timeEndAt"` //证书失效时间 DnsNames []string `json:"dnsNames" form:"dnsNames"` // 包含的DNS域名 CommonNames []string `json:"commonNames" form:"commonNames"` // 包含的COMMON域名 IsSelfSigned bool `json:"isSelfSigned" form:"isSelfSigned"` //是否是自签名证书 } type EditServerNames struct { ServerId int64 `json:"serverId" form:"serverId"` ServerNamesJSON []byte `json:"serverNamesJSON" form:"serverNamesJSON"` } type AddSSLPolicy struct { Http2Enabled bool `json:"http2Enabled" form:"http2Enabled"` //是否支持HTTP/2 Http3Enabled bool `json:"http3Enabled" form:"http3Enabled"` //是否支持Http3Enabled MinVersion string `json:"minVersion" form:"minVersion"` //最小TLS版本 SslCertsJSON []byte `json:"sslCertsJSON" form:"sslCertsJSON"` //SslCertsJSON HstsJSON []byte `json:"hstsJSON" form:"hstsJSON"` //HstsJSON ClientAuthType int32 `json:"clientAuthType" form:"clientAuthType"` //可选项,客户端校验类型:0 无需证书,1 需要客户端证书,2 需要任一客户端证书,3 如果客户端上传了证书才校验,4 需要客户端证书而且需要校验 CipherSuites []string `json:"cipherSuites" form:"cipherSuites"` //可选项,支持的TLS加密套件 CipherSuitesIsOn bool `json:"cipherSuitesIsOn" form:"cipherSuitesIsOn"` //可选项,是否启用自定义加密套件 OcspIsOn bool `json:"ocspIsOn" form:"ocspIsOn"` //可选项,是否开启OCSP } type SSLPolicy struct { SslPolicyId int64 `json:"sslPolicyId" form:"sslPolicyId"` Http2Enabled bool `json:"http2Enabled" form:"http2Enabled"` //是否支持HTTP/2 Http3Enabled bool `json:"http3Enabled" form:"http3Enabled"` //是否支持Http3Enabled MinVersion string `json:"minVersion" form:"minVersion"` //最小TLS版本 SslCertsJSON []byte `json:"sslCertsJSON" form:"sslCertsJSON"` //SslCertsJSON HstsJSON []byte `json:"hstsJSON" form:"hstsJSON"` //HstsJSON ClientAuthType int32 `json:"clientAuthType" form:"clientAuthType"` //可选项,客户端校验类型:0 无需证书,1 需要客户端证书,2 需要任一客户端证书,3 如果客户端上传了证书才校验,4 需要客户端证书而且需要校验 CipherSuites []string `json:"cipherSuites" form:"cipherSuites"` //可选项,支持的TLS加密套件 CipherSuitesIsOn bool `json:"cipherSuitesIsOn" form:"cipherSuitesIsOn"` //可选项,是否启用自定义加密套件 OcspIsOn bool `json:"ocspIsOn" form:"ocspIsOn"` //可选项,是否开启OCSP } type SslCertsJSON struct { IsOn bool `json:"isOn" form:"isOn"` CertId int64 `json:"certId" form:"certId"` } type WebLog struct { IsPrior bool `json:"isPrior" form:"isPrior"` IsOn bool `json:"isOn" form:"isOn"` Fields []int64 Status1 bool `json:"status1" form:"status1"` Status2 bool `json:"status2" form:"status2"` Status3 bool `json:"status3" form:"status3"` Status4 bool `json:"status4" form:"status4"` Status5 bool `json:"status5" form:"status5"` EnableClientClosed bool `json:"enableClientClosed" form:"enableClientClosed"` FirewallOnly bool `json:"firewallOnly" form:"firewallOnly"` } type CcConfig struct { IsOn bool `json:"isOn"` Level string `json:"level"` Action string `json:"action"` IsPrior bool `json:"isPrior"` Thresholds []struct { MaxRequests int `json:"maxRequests"` BlockSeconds int `json:"blockSeconds"` PeriodSeconds int `json:"periodSeconds"` } `json:"thresholds"` MinQPSPerIP int `json:"minQPSPerIP"` EnableGET302 bool `json:"enableGET302"` OnlyURLPatterns []interface{} `json:"onlyURLPatterns"` ThresholdMethod string `json:"thresholdMethod"` WithRequestPath bool `json:"withRequestPath"` EnableFingerprint bool `json:"enableFingerprint"` ExceptURLPatterns []interface{} `json:"exceptURLPatterns"` IgnoreCommonFiles bool `json:"ignoreCommonFiles"` IgnoreCommonAgents bool `json:"ignoreCommonAgents"` UseDefaultThresholds bool `json:"useDefaultThresholds"` } type WebSocket struct { WebsocketId int64 `json:"websocketId" form:"websocketId"` HandshakeTimeoutJSON []byte `json:"handshakeTimeoutJSON" form:"handshakeTimeoutJSON"` AllowAllOrigins bool `json:"allowAllOrigins" form:"allowAllOrigins"` AllowedOrigins []string `json:"allowedOrigins" form:"allowedOrigins"` RequestSameOrigin bool `json:"requestSameOrigin" form:"requestSameOrigin"` RequestOrigin string `json:"requestOrigin" form:"requestOrigin"` } type HandshakeTimeoutJSON struct { Unit string `json:"unit" form:"unit"` Count int `json:"count" form:"count"` } type AddWafPolicy struct { IsOn bool `json:"isOn" form:"isOn"` Name string `json:"name" form:"name"` Description string `json:"description" form:"description"` ServerId int64 `json:"serverId" form:"serverId"` ServerGroupId int64 `json:"serverGroupId" form:"serverGroupId"` } type Firewall struct { IsPrior bool `json:"isPrior" form:"isPrior"` // 是否覆盖上级配置 IsOn bool `json:"isOn" form:"isOn"` // 是否启用配置 FirewallPolicyId int64 `json:"firewallPolicyId" form:"firewallPolicyId"` // WAF策略ID IgnoreGlobalRules bool `json:"ignoreGlobalRules" form:"ignoreGlobalRules"` // 是否忽略系统定义的全局规则 DefaultCaptchaType string `json:"defaultCaptchaType" form:"defaultCaptchaType"` // 默认人机识别方式,可以选none(不设置)、default(默认)、oneClick(单击验证)、slide(滑动解锁)、geetest(极验) } type IPListRequest struct { Type string `json:"type" form:"type"` Name string `json:"name" form:"name"` Code string `json:"code" form:"code"` TimeoutJSON []byte `json:"timeoutJSON" form:"timeoutJSON"` IsPublic bool `json:"isPublic" form:"isPublic"` Description string `json:"description" form:"description"` IsGlobal bool `json:"isGlobal" form:"isGlobal"` ServerId int64 `json:"serverId" form:"serverId"` } type AddIpItem struct { IpItemId int64 `json:"ipItemId" form:"ipItemId"` IpListId int64 `json:"ipListId" form:"ipListId"` // 所属IP列表ID Value string `json:"value" form:"value"` // IP原始值,比如单个IP、IP范围或者CIDR,指定了原始值后,无需设置ipFrom和ipTo两个参数 IpFrom string `json:"ipFrom" form:"ipFrom"` // 开始IP IpTo string `json:"ipTo" form:"ipTo"` // 结束IP(可选) ExpiredAt int64 `json:"expiredAt" form:"expiredAt"` // 过期时间戳(可选) Reason string `json:"reason" form:"reason"` // 加入理由(可选) Type string `json:"type" form:"type"` // IP类型,值为ipv4或ipv6 EventLevel string `json:"eventLevel" form:"eventLevel"` // 级别:debug, notice, warning, error, critical, fatal NodeId int64 `json:"nodeId" form:"nodeId"` // 可选项,所属节点ID(如果大于0,则不应用于其他节点) ServerId int64 `json:"serverId" form:"serverId"` // 可选项,所属网站ID(如果大于0,则不应用于其他网站) SourceNodeId int64 `json:"sourceNodeId" form:"sourceNodeId"` // 可选项,来源节点 SourceServerId int64 `json:"sourceServerId" form:"sourceServerId"` // 可选项,来源网站ID SourceHTTPFirewallPolicyId int64 `json:"sourceHTTPFirewallPolicyId" form:"sourceHTTPFirewallPolicyId"` // 可选项,来源WAF策略ID SourceHTTPFirewallRuleGroupId int64 `json:"sourceHTTPFirewallRuleGroupId" form:"sourceHTTPFirewallRuleGroupId"` // 可选项,来源WAF规则分组ID SourceHTTPFirewallRuleSetId int64 `json:"sourceHTTPFirewallRuleSetId" form:"sourceHTTPFirewallRuleSetId"` // 可选项,来源WAF规则集ID SourceURL string `json:"sourceURL" form:"sourceURL"` // 可选项,来源URL SourceUserAgent string `json:"sourceUserAgent" form:"sourceUserAgent"` // 可选项,来源UA SourceCategory string `json:"sourceCategory" form:"sourceCategory"` // 分类:cc:CC防御 }