feat: 优化代理准备并完善远端部署

- 增加严格代理、两分钟预取、白名单去重与分组状态展示\n- 增加远端注册令牌和安全地址校验\n- 增加 Docker Compose、Caddy 示例与控制中心部署文档
This commit is contained in:
yml
2026-11-21 20:59:35 +08:00
parent d176c421a8
commit 9c83be798d
43 changed files with 2755 additions and 119 deletions
+3 -1
View File
@@ -175,6 +175,7 @@ func defaultConfig() types.Config {
RetryStages: defaultRetryStages(),
SeckillMode: types.SeckillModeAggressive,
XiaodianPageSize: 200,
ProxyRequired: true,
AccountsPerProxy: constants.DefaultAccountsPerProxy,
ProxySparePercent: constants.DefaultProxySparePercent,
}
@@ -240,6 +241,7 @@ func LoadConfig(path string) types.Config {
func normalizeRemoteConfig(cfg *types.Config) {
cfg.RemoteURL = strings.TrimSpace(cfg.RemoteURL)
cfg.RemoteEnrollmentToken = strings.TrimSpace(cfg.RemoteEnrollmentToken)
cfg.RemoteToken = strings.TrimSpace(cfg.RemoteToken)
cfg.RemoteMachineName = strings.TrimSpace(cfg.RemoteMachineName)
}
@@ -251,7 +253,7 @@ func normalizeProxyConfig(cfg *types.Config) {
if cfg.AccountsPerProxy > constants.MaxAccountsPerProxy {
cfg.AccountsPerProxy = constants.MaxAccountsPerProxy
}
if cfg.ProxySparePercent <= 0 {
if cfg.ProxySparePercent < constants.MinProxySparePercent {
cfg.ProxySparePercent = constants.DefaultProxySparePercent
}
if cfg.ProxySparePercent > constants.MaxProxySparePercent {