feat(remote): 增加远端控制台与日志汇总导出
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"douyu_go/internal/activity"
|
||||
"douyu_go/internal/constants"
|
||||
@@ -231,11 +232,18 @@ func LoadConfig(path string) types.Config {
|
||||
cfg.RetryStages = defaultRetryStages()
|
||||
}
|
||||
normalizeProxyConfig(&cfg)
|
||||
normalizeRemoteConfig(&cfg)
|
||||
normalizeXiaodianConfig(&cfg)
|
||||
logger.LogEvent("配置", "success", "配置加载完成: %s", path)
|
||||
return cfg
|
||||
}
|
||||
|
||||
func normalizeRemoteConfig(cfg *types.Config) {
|
||||
cfg.RemoteURL = strings.TrimSpace(cfg.RemoteURL)
|
||||
cfg.RemoteToken = strings.TrimSpace(cfg.RemoteToken)
|
||||
cfg.RemoteMachineName = strings.TrimSpace(cfg.RemoteMachineName)
|
||||
}
|
||||
|
||||
func normalizeProxyConfig(cfg *types.Config) {
|
||||
if cfg.AccountsPerProxy <= 0 {
|
||||
cfg.AccountsPerProxy = constants.DefaultAccountsPerProxy
|
||||
|
||||
Reference in New Issue
Block a user