您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Ramiro de Zavalia 6e359059e6 first commit 5 年前
.gitignore * ignore go build binary 5 年前
LICENSE Initial commit 5 年前
README.md first commit 5 年前
main.go Added the "addr" parameter 5 年前

README.md

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"}