reorx / httpstat

curl statistics made simple
MIT License
5.94k stars 384 forks source link

Option to display the IP address used to contact destination #18

Closed InAnimaTe closed 7 years ago

InAnimaTe commented 7 years ago

It would be nice to find out the exact IP that was used to make the connection. This helps for things like debugging round-robin records etc..

Maybe something like HTTPSTAT_SHOW_IP

Great work on this btw, definitely my go to utility now ;)

reorx commented 7 years ago

I've also came up with this before, and since httpstat wraps curl with minimum restriction, I think it would be easy to get the IP address and port showing by add -v option, like this:

$ httpstat google.com -v
* Rebuilt URL to: google.com/
*   Trying 216.58.221.238...
* Connected to google.com (216.58.221.238) port 80 (#0)
...

But you are right, IP is one of the most important information we need to know about a HTTP request, besides, -v seems a bit tedious. I'm going to add IP display soon, with HTTPSTAT_SHOW_IP=true by default :)

reorx commented 7 years ago

@InAnimaTe BTW, what do you think of local IP/port when requesting, is it also necessary to show with remote IP/port ?

InAnimaTe commented 7 years ago

Yeah actually local IP/Port used would also be really useful. This way, I know exactly how the packet left me without having to fire up wireshark (but I still could if I wanted more information). For this information, maybe a HTTPSTAT_SHOW_LOCAL variable of some sort.

Glad you like the idea! Can't wait to see it implemented!

reorx commented 7 years ago

I have made an implementation on branch show-ip , how do you think of it?

reorx commented 7 years ago

Implemented and merged in #20

InAnimaTe commented 7 years ago

@reorx sorry for not getting back to you before. This looks absolutely wonderful! Glad its now the default!