bogdanfinn / tls-client

net/http.Client like HTTP Client with options to select specific client TLS Fingerprints to use for requests.
BSD 4-Clause "Original" or "Old" License
668 stars 133 forks source link

Allow overriding default net.Dialer #78

Closed fidraC closed 7 months ago

fidraC commented 9 months ago

Not sure if this is appropriate but I had a situation pop up where I needed to define my own net.Dialer so that I could override the default DNS resolver.

bogdanfinn commented 9 months ago

@fidraC thank you for your contribution! For me that looks good so far. What do you think about using this option also in the newConnectDialer() not only in the directDialer ? Does that make sense that someone maybe wants to override the underlying net.dialer there aswell?

fidraC commented 9 months ago

What do you think about using this option also in the newConnectDialer() not only in the directDialer ?

This makes sense that if someone wants to override the default dialer, they would want to override all dialers for the particular client. I'll look through the code and see what needs to be changed.

fidraC commented 9 months ago

done!