feat(netproxy): add network proxy module to provide unified network proxy connection.

feat(internal/controller): make email, ntft, webhook, qq_napcat able to use network proxy.
This commit is contained in:
2026-08-12 22:53:23 +08:00
parent 105fa47811
commit 56cc3485a7
7 changed files with 243 additions and 55 deletions
+3 -4
View File
@@ -8,6 +8,7 @@ import (
"time"
"nukumizu-backend/config"
"nukumizu-backend/internal/netproxy"
"nukumizu-backend/internal/node"
"nukumizu-backend/internal/template"
"nukumizu-backend/postLog"
@@ -22,10 +23,8 @@ type WebhookController struct {
// NewWebhookController creates a new Webhook controller.
func NewWebhookController(cfg config.WebhookConfig) *WebhookController {
return &WebhookController{
cfg: cfg,
httpClient: &http.Client{
Timeout: 10 * time.Second,
},
cfg: cfg,
httpClient: netproxy.HTTPClient(cfg.NetworkUseProxy, 10*time.Second),
}
}