Use native dialer for scout

This commit is contained in:
9seconds
2026-03-12 21:47:03 +01:00
parent a85348d6be
commit cc63e762e3
3 changed files with 13 additions and 3 deletions
+6 -1
View File
@@ -2,6 +2,7 @@ package doppel
import (
"context"
"net"
"net/http"
"time"
@@ -28,11 +29,15 @@ type Network interface {
// Dial establishes context-free TCP connections.
Dial(network, address string) (essentials.Conn, error)
// DialContext dials using a context. This is a preferrable way of
// DialContext dials using a context. This is a preferable way of
// establishing TCP connections.
DialContext(ctx context.Context, network, address string) (essentials.Conn, error)
// MakeHTTPClient build an HTTP client with given dial function. If nothing is
// provided, then DialContext of this interface is going to be used.
MakeHTTPClient(func(ctx context.Context, network, address string) (essentials.Conn, error)) *http.Client
// NativeDialer returns a configured instance of native dialer that
// skips proxy connections or any other irrelevant settings.
NativeDialer() *net.Dialer
}