Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/majd/ip-curl
A lightweight tool that starts a web server and returns the client's IP address on every request
https://github.com/majd/ip-curl
docker go golang http ip ip-address web
Last synced: 4 months ago
JSON representation
A lightweight tool that starts a web server and returns the client's IP address on every request
- Host: GitHub
- URL: https://github.com/majd/ip-curl
- Owner: majd
- License: mit
- Created: 2022-03-05T18:54:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-06T20:26:16.000Z (almost 3 years ago)
- Last Synced: 2024-05-01T14:43:44.948Z (9 months ago)
- Topics: docker, go, golang, http, ip, ip-address, web
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ip-curl
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/majd/ip-curl/blob/main/LICENSE)
![Go](https://img.shields.io/badge/Go-1.17-blue.svg)A lightweight tool that starts a web server and returns the client's IP address on every request.
![Demo](./demo.gif)
## Usage
The tool can be ran in a Docker container or compiled directly on the host.
### Docker (recommended)
Start container
```
$ docker run --rm -p 3000:80 -e PORT=80 ghcr.io/majd/ip-curl
```### Manual
Clone repository
```
$ git clone [email protected]:majd/ip-curl.git && cd ip-curl
```Compile code
```
$ go mod download
$ go build
```Run compiled binary
```
$ PORT=3000 ./ip-curl
```## License
ip-curl is released under the [MIT license](https://github.com/majd/ip-curl/blob/main/LICENSE).