Crates.io | pub-ip |
lib.rs | pub-ip |
version | 0.1.0 |
source | src |
created_at | 2022-06-13 17:53:41.570679 |
updated_at | 2022-06-13 17:53:41.570679 |
description | A tool to retrieve the public ip of a machine that is behind a NAT |
homepage | https://enricoch.gitlab.io/get-ip/ |
repository | https://gitlab.com/EnricoCh/get-ip |
max_upload_size | |
id | 605228 |
size | 46,283 |
Pub-ip is a command-line utility to get the public ip address of your machine when your machine is hidden behind a NAT, like home computers usually are.
Warning This tool uses third-party services to retrieve the public IP address
You can install this program using cargo:
cargo install pub-ip
In the future, I'd like to provide pre-built executables on this progect repository using CI/CD
Simply run pub-ip
on your terminal.
You can specify which server to use:
pub-ip ipify
pub-ip httpbin
pub-ip myip
pub-ip ifconfig
When no server is specified, all servers are queried, in the above order, until there is a result.
By default, when all servers fail, pub-ip outputs NOTFOUND
.
You can override this behavior by using the --notfound
flag (or -f
):
pub-ip ipify --notfound
orpub-ip ipify -f
By default pub-ip prints a newline character at the end.
You can override this behaviour by using the --newline
flag (or -l
)
pub-ip ipify --newline
orpub-ip ipify -l
Use pub-ip --help
to display help informations.
Use pub-ip --version
to display version informations.
Licensed under Apache License, Version 2.0 (LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.