davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.95k stars 382 forks source link

Flag/option to force DNS resolution #151

Closed jakdept closed 3 years ago

jakdept commented 3 years ago

It'd be nice to be able to shoot httpstat at a specific IP address, instead of the DNS resolution target (thus overriding DNS resolution).

Is this something that already exists and I'm just missing it?

moorereason commented 3 years ago

You should be able to do httpstat -H "Host: blah.com" https://1.2.3.4/

davecheney commented 3 years ago

@jakdept do you want to try that. The alternative may be adding something like curl’s —resolve flag

jakdept commented 3 years ago

I did not think of manually setting a Host: header at command line, but that does work when I tried it.

Further, digging through net/http and crypto/tls they look to check for a Host: header if other methods for setting the server name are not there before connecting, so that seems like it should work in all cases.

moorereason commented 3 years ago

The alternative may be adding something like curl’s —resolve flag

See our previous discussion in #36