You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 456B

yourip

Simple web service that returns your own IP. Similar to http://ifconfig.me

You can specify the address to bind with the --addr parameter.

# ./yourip --help
Usage of ./yourip:
  -addr string
    	local ip:port to bind (default ":8080")

When querying the service, you can get a JSON output using the /json path

Examples:

  # curl 'http://127.0.0.1:3000/'
  127.0.0.1
  # curl 'http://127.0.0.1:3000/json'
  {"ip":"127.0.0.1"}