gip 0.1.0

A library and command-line frontend to check global IP address
docs.rs failed to build gip-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: gip-0.7.1

gip

Build Status Build status

gip is a command-line tool and Rust library to check global IP address.

Install

Download from release page, and extract to the directory in PATH.

Usage

gip                    // show global IP address by plane text.
gip -s                 // show global IP address by plane text without line break.
gip -j                 // show global IP address by JSON.                        ( ex. {"ip", "xxx.xxx.xxx.xxx"} )
gip -j --json-key key  // show global IP address by JSON with the specified key. ( ex. {"key", "xxx.xxx.xxx.xxx"} )

Providers

Currently built-in service providers are the followings.

If you want to change providers, providers can be set by $HOME/.gip.toml like the following.

[[providers]]
    name    = "inet-ip.info"
    ptype   = "Plane"
    timeout = 1000
    url     = "http://inet-ip.info/ip"

[[providers]]
    name    = "httpbin.org"
    ptype   = "Json"
    timeout = 1000
    url     = "http://httpbin.org/ip"
    key     = ["origin"]

Library

gip is provided as Rust library.

gip = "*"

Documentation