feat: add debug log stream support

This commit is contained in:
2026-04-02 23:27:46 +08:00
parent f1c16e89f0
commit 9ec25b94f1
15 changed files with 624 additions and 15 deletions

View File

@@ -37,11 +37,17 @@ func NewWK(username, password, host string, cookies []*http.Cookie) *WK {
return nil
}
req := request.NewClient(&request.Config{
reqCfg := &request.Config{
UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 Edg/140.0.0.0",
// Proxy: "http://127.0.0.1:9000",
// VerifySSL: false,
})
VerifySSL: true,
Debug: conf.IsDebugMode(),
}
if conf.IsDebugMode() {
reqCfg.Proxy = conf.DebugProxy
reqCfg.VerifySSL = !conf.DebugSkipSSLVerify
}
req := request.NewClient(reqCfg)
if len(cookies) > 0 {
req.SetCookies(cookies)
}