Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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).