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:
NanamiAdmin committed 2026-08-12 22:53:23 +08:00
1 parent 105fa47811
commit 56cc3485a7
7 files changed
+243 -55

No files matched your search

+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),
}
}