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: 6 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 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-06T20:26:16.000Z (almost 4 years ago)
- Last Synced: 2025-04-14T06:11:27.271Z (10 months ago)
- Topics: docker, go, golang, http, ip, ip-address, web
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ip-curl
[](https://github.com/majd/ip-curl/blob/main/LICENSE)

A lightweight tool that starts a web server and returns the client's IP address on every request.

## 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 git@github.com: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).