package constants import "time" // Version 应用版本号,与 wails.json version 同步。 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/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" DefaultAccountFile = "accounts.txt" DefaultLogDir = "logs" DefaultSuccessDir = "success_images" // LegacyDefault* 是旧版本相对工作目录存储的位置,仅用于首次迁移。 LegacyDefaultConfigFile = "config.json" LegacyDefaultAccountFile = "data/user.txt" // DefaultTimeAPI 服务端时间校准接口。 // 斗鱼服务器时间与活动无关,优先使用轻量级 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。 var CST = time.FixedZone("CST", 8*3600)