Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/maveonair/whoamip
- Owner: maveonair
- License: mit
- Created: 2021-04-16T19:21:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T19:05:41.000Z (8 months ago)
- Last Synced: 2024-06-20T10:21:42.092Z (6 months ago)
- Language: Go
- Size: 73.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```