feat(proxy): 增加代理池演练并修复账号密码提取,发布 0.5.1
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package types
|
||||
|
||||
// ProxyDrillRequest 配置一次不依赖真实账号的代理池演练。
|
||||
type ProxyDrillRequest struct {
|
||||
SimulatedAccounts int `json:"simulatedAccounts"`
|
||||
}
|
||||
|
||||
// ProxyDrillItem 是单个代理的演练结果。
|
||||
type ProxyDrillItem struct {
|
||||
Role string `json:"role"` // 活动代理 / 备用代理
|
||||
Group int `json:"group"`
|
||||
Proxy string `json:"proxy"`
|
||||
IP string `json:"ip"`
|
||||
Region string `json:"region"`
|
||||
Provider string `json:"provider"`
|
||||
Requests int `json:"requests"`
|
||||
Success int `json:"success"`
|
||||
Failed int `json:"failed"`
|
||||
AvgLatencyMs int64 `json:"avgLatencyMs"`
|
||||
MaxLatencyMs int64 `json:"maxLatencyMs"`
|
||||
Bytes int64 `json:"bytes"`
|
||||
ExpiresAt int64 `json:"expiresAt,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// ProxyDrillResult 是代理池演练汇总。
|
||||
type ProxyDrillResult struct {
|
||||
Success bool `json:"success"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
SimulatedAccounts int `json:"simulatedAccounts"`
|
||||
AccountsPerProxy int `json:"accountsPerProxy"`
|
||||
ActiveCount int `json:"activeCount"`
|
||||
StandbyCount int `json:"standbyCount"`
|
||||
HealthyActive int `json:"healthyActive"`
|
||||
HealthyStandby int `json:"healthyStandby"`
|
||||
DurationMs int64 `json:"durationMs"`
|
||||
Items []ProxyDrillItem `json:"items"`
|
||||
}
|
||||
Reference in New Issue
Block a user