Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maveonair/whoamip

Provides a HTTP endpoint that returns your current IP address
https://github.com/maveonair/whoamip

Last synced: 27 days ago
JSON representation

Provides a HTTP endpoint that returns your current IP address

Awesome Lists containing this project

README

        

# whoamip

Whoamip provides a HTTP endpoint that returns your current IP address.

## Usage

```$
$ whoami
Usage of whoamip:
-metricsPort int
Metrics Listening Port (default 9100)
-port int
Listening Port (default 8080)

$ whoamip
INFO[0000] Listening on tcp://0.0.0.0:8080
INFO[0000] Metrics listening on tcp://0.0.0.0:9100
```

## Example

```$
$ curl http://192.168.1.51:8080 | jq
{
"ip": "192.168.1.109"
}
```

## Use with Docker Image

```$
$ docker run -p 8080:8080 maveonair/whoamip
```