Skip to content

Allow for developer/commandline control of name resolution #2072

Answered by tomchristie
toppk asked this question in Ideas
Discussion options

You must be logged in to vote

Great question!

As it happens httpx and httpcore do currently allow you to connect to a different IP than is used in the Host: header, but that's not a lot of use on it's own, because, eg...

# This will connect to 1.2.3.4 but using the `www.example.com` header,
# *but* the sni hostname will also be 1.2.3.4 which isn't what we wanted.
$ httpx https://1.2.3.4 --header Host www.example.com

I think we've got space for two different request extensions here...

r = httpx.get("https://www.example.com", extensions={"connect_to": ...})
r = httpx.get("https://www.example.com", extensions={"sni_hostname": ...})

We'd then probably want to expose these to the command line client in a way that maps obvi…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@toppk
Comment options

toppk Feb 9, 2022
Collaborator Author

@tomchristie
Comment options

@Allgot
Comment options

Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants