Skip to content

Should HttpClient support specifying IP directly, bypassing DNS-resolution? #98425

Answered by abjugard
abjugard asked this question in Q&A
Discussion options

You must be logged in to vote

That's actually what I did initially, but that fails with "The SSL connection could not be established" against e.g. redirects to Cloudflare-proxied domains (as in, initial target is not Cloudflare-proxied, but the 302 it returns is proxied) if using a HttpClientHandler with AllowAutoRedirect set to true. Disabling that and handling redirects myself is an alternative that works as well.

I hadn't figured out the exact cause of the failures when I made this post yesterday, I consider handling the redirects myself an acceptable workaround actually, and have now thrown out the ConnectCallback approach, so thanks for getting me to take another look at it @MihaZupan!

I still feel that this ques…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@abjugard
Comment options

Answer selected by abjugard
Comment options

You must be logged in to vote
1 reply
@abjugard
Comment options

Comment options

You must be logged in to vote
1 reply
@abjugard
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants