v5.0.67: fix proxy nil crash + net/url import

This commit is contained in:
“Naeel”
2026-07-01 14:59:49 +04:00
parent dbc426b861
commit e06e8de134
@@ -7,6 +7,7 @@ import (
"fmt" "fmt"
"net" "net"
"net/http" "net/http"
"net/url"
"os" "os"
"strings" "strings"
"time" "time"
@@ -137,7 +138,7 @@ func (p *NubesProvider) Configure(ctx context.Context, req provider.ConfigureReq
proxyFunc := transport.Proxy proxyFunc := transport.Proxy
target := addr target := addr
if proxyFunc != nil { if proxyFunc != nil {
proxy, err := proxyFunc(nil) proxy, err := proxyFunc(&http.Request{URL: &url.URL{Scheme: "https", Host: target}})
if err == nil && proxy != nil { if err == nil && proxy != nil {
conn, err := dialer.DialContext(ctx, "tcp", proxy.Host) conn, err := dialer.DialContext(ctx, "tcp", proxy.Host)
if err != nil { if err != nil {