Macchina-CLI / libmacchina

A library providing access to all sorts of system information.
https://crates.io/crates/libmacchina
MIT License
68 stars 20 forks source link

Add a public IP address readout. #26

Closed ngirard closed 3 years ago

ngirard commented 3 years ago

Displaying the global IP address would be useful.

I'd suggest taking a look at http://ifconfig.co

grtcdr commented 3 years ago

I'll see what I can do :)

I might scratch the idea if it slows down the program, or maybe add these readouts but they are disabled by default.

EDIT: This concerns libmacchina, by the way.

ngirard commented 3 years ago

Sure, it should be disabled by default !

ngirard commented 3 years ago

EDIT: This concerns libmacchina, by the way.

Noted. Feel free to move this issue to the right repo.

grtcdr commented 3 years ago

Hey @ngirard

This feature is most likely not going to be added anytime soon, here's why:

ngirard commented 3 years ago

Hey @grtcdr , thanks for the heads up!

Alright, maybe that's for the best: I'd have felt uncomfortable making an http request with each interactive shell instance, so I'd have switched off the feature ; which defeats the purpose.

While it's all still fresh in your head, I'm curious to know, which crates are the best equivalent of curl / wget, in your opinion ?

grtcdr commented 3 years ago

Alright, maybe that's for the best: I'd have felt uncomfortable making an http request with each interactive shell instance, so I'd have switched off the feature ; which defeats the purpose.

Yeah, I wouldn't either, most of these websites are HTTP only, and you may be exposing your IP address (and other stuff?) by making (constant) requests.

While it's all still fresh in your head, I'm curious to know, which crates are the best equivalent of curl / wget, in your opinion ?

There's a very mature library (HTTP client as they like to call) that a lot of popular tools use, it's called reqwest

ngirard commented 3 years ago

Aha, nice ! Thanks for your feedback.

Feel free to close this issue anytime.

grtcdr commented 3 years ago

Thank you, have a good one :)