feat: 完善代理池与抢购链路,发布 0.5.0

This commit is contained in:
yml
2026-11-20 00:48:21 +08:00
parent 2f087ac7f1
commit 98b3dc4b16
28 changed files with 1522 additions and 204 deletions
+15 -11
View File
@@ -3,19 +3,21 @@ package constants
import "time"
// Version 应用版本号,与 wails.json version 同步。
const Version = "0.4.0"
const Version = "0.5.0"
// BuildTime 构建时间,由编译时 ldflags 注入。
var BuildTime = "unknown"
const (
BaseURL = "https://www.douyu.com"
UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36"
DefaultAttempts = 2
DefaultConcurrency = 150
DefaultAccountsPerProxy = 5
MaxAccountsPerProxy = 100
ProductCacheTTL = 30 * time.Second
BaseURL = "https://www.douyu.com"
UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/157.0.0.0 Safari/537.36"
DefaultAttempts = 2
DefaultConcurrency = 150
DefaultAccountsPerProxy = 5
MaxAccountsPerProxy = 100
DefaultProxySparePercent = 25
MaxProxySparePercent = 100
ProductCacheTTL = 30 * time.Second
DefaultAppDataDirName = "douyu-go"
DefaultConfigFile = "config.json"
@@ -28,9 +30,11 @@ const (
LegacyDefaultAccountFile = "data/user.txt"
// DefaultTimeAPI 服务端时间校准接口。
// 斗鱼服务器时间与活动无关,统一用精英手册的 storedetail(能稳定返回
// data.preExchange.currentTime),所有活动共用。
DefaultTimeAPI = BaseURL + "/wgapi/ordnc/activity/peace/storedetail?manualID=G4KA4Qnz4LDp7&commodityID=20260120QYOOB_bag274&rid=9263298"
// 斗鱼服务器时间与活动无关,优先使用轻量级 data=Unix秒 接口;
// 客户端同时兼容旧配置中的 storedetail data.preExchange.currentTime。
DefaultTimeAPI = BaseURL + "/api/v1/timestamp"
// LegacyDefaultTimeAPI 用于迁移曾保存到 config.json 的旧默认时间接口。
LegacyDefaultTimeAPI = BaseURL + "/wgapi/ordnc/activity/peace/storedetail?manualID=G4KA4Qnz4LDp7&commodityID=20260120QYOOB_bag274&rid=9263298"
)
// CST 中国标准时间 UTC+8。