if no dns param then use whatever pipe chose
This commit is contained in:
@@ -28,7 +28,10 @@ func NewServer(c *Config) *Server {
|
||||
PreferGo: true,
|
||||
Dial: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
d := net.Dialer{Timeout: c.Timeout}
|
||||
return d.DialContext(ctx, network, c.DNS)
|
||||
if c.DNS != "" {
|
||||
addr = c.DNS
|
||||
}
|
||||
return d.DialContext(ctx, network, addr)
|
||||
},
|
||||
}
|
||||
transport := &http.Transport{}
|
||||
|
||||
Reference in New Issue
Block a user