|
|
@@ -2,6 +2,7 @@ package doppel
|
|
2
|
2
|
|
|
3
|
3
|
import (
|
|
4
|
4
|
"context"
|
|
|
5
|
+ "net"
|
|
5
|
6
|
"net/http"
|
|
6
|
7
|
"time"
|
|
7
|
8
|
|
|
|
@@ -28,11 +29,15 @@ type Network interface {
|
|
28
|
29
|
// Dial establishes context-free TCP connections.
|
|
29
|
30
|
Dial(network, address string) (essentials.Conn, error)
|
|
30
|
31
|
|
|
31
|
|
- // DialContext dials using a context. This is a preferrable way of
|
|
|
32
|
+ // DialContext dials using a context. This is a preferable way of
|
|
32
|
33
|
// establishing TCP connections.
|
|
33
|
34
|
DialContext(ctx context.Context, network, address string) (essentials.Conn, error)
|
|
34
|
35
|
|
|
35
|
36
|
// MakeHTTPClient build an HTTP client with given dial function. If nothing is
|
|
36
|
37
|
// provided, then DialContext of this interface is going to be used.
|
|
37
|
38
|
MakeHTTPClient(func(ctx context.Context, network, address string) (essentials.Conn, error)) *http.Client
|
|
|
39
|
+
|
|
|
40
|
+ // NativeDialer returns a configured instance of native dialer that
|
|
|
41
|
+ // skips proxy connections or any other irrelevant settings.
|
|
|
42
|
+ NativeDialer() *net.Dialer
|
|
38
|
43
|
}
|