From 112d04adf5e666959884225415407ed2ac7adf09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 1 Jul 2026 16:11:26 +0400 Subject: [PATCH] v5.0.74: fresh Transport (not cloned DefaultTransport) --- TEST_STAND/buck0/main.tf | 2 +- .../internal/provider/provider.go | 23 +++++++++++-------- universal_rebuild/main.go | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/TEST_STAND/buck0/main.tf b/TEST_STAND/buck0/main.tf index e340cb0..8e7da5c 100644 --- a/TEST_STAND/buck0/main.tf +++ b/TEST_STAND/buck0/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { nubes = { source = "terra.k8c.ru/nubes-test/nubes" - version = "5.0.73" + version = "5.0.74" } } } diff --git a/universal_rebuild/internal/provider/provider.go b/universal_rebuild/internal/provider/provider.go index 55c84e2..b34ef81 100644 --- a/universal_rebuild/internal/provider/provider.go +++ b/universal_rebuild/internal/provider/provider.go @@ -120,15 +120,20 @@ func (p *NubesProvider) Configure(ctx context.Context, req provider.ConfigureReq insecureSkipVerify = true } - // HTTP transport: клонируем DefaultTransport чтобы сохранить системные настройки (proxy, timeouts). - transport := http.DefaultTransport.(*http.Transport).Clone() - transport.TLSHandshakeTimeout = 60 * time.Second - // Отключаем HTTP/2: ColdFusion + DDoS-Guard не поддерживают h2 → EOF. - // Пустой TLSNextProto убирает h2 из ALPN → только HTTP/1.1. - transport.TLSNextProto = make(map[string]func(authority string, c *tls.Conn) http.RoundTripper) - transport.TLSClientConfig = &tls.Config{ - InsecureSkipVerify: insecureSkipVerify, - MinVersion: tls.VersionTLS12, + transport := &http.Transport{ + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).DialContext, + TLSHandshakeTimeout: 60 * time.Second, + ResponseHeaderTimeout: 60 * time.Second, + MaxIdleConnsPerHost: 10, + IdleConnTimeout: 90 * time.Second, + TLSNextProto: make(map[string]func(authority string, c *tls.Conn) http.RoundTripper), + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: insecureSkipVerify, + MinVersion: tls.VersionTLS12, + }, } // Определяем уровень логирования операций: none (тихий) / info / debug. diff --git a/universal_rebuild/main.go b/universal_rebuild/main.go index 55b3a2a..fb47bc9 100644 --- a/universal_rebuild/main.go +++ b/universal_rebuild/main.go @@ -10,7 +10,7 @@ import ( ) var ( - version string = "5.0.73" + version string = "5.0.74" ) func main() {