mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-18 18:49:23 +08:00
feat: 添加自定义HTTP客户端和WebSocket拨号器,支持TLS配置
This commit is contained in:
@@ -47,9 +47,7 @@ func CheckAndUpdate() error {
|
||||
return fmt.Errorf("failed to parse current version: %v", err)
|
||||
}
|
||||
|
||||
// 使用dnsresolver创建自定义HTTP客户端并设置为全局默认客户端
|
||||
// 这会影响所有HTTP请求,包括selfupdate库中的请求
|
||||
http.DefaultClient = dnsresolver.GetHTTPClient(60 * time.Second) // Create selfupdate configuration
|
||||
http.DefaultClient = dnsresolver.GetHTTPClient(60 * time.Second)
|
||||
config := selfupdate.Config{}
|
||||
updater, err := selfupdate.NewUpdater(config)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user