https://github.com/jakewmeyer/ifconfig
Public IP API
https://github.com/jakewmeyer/ifconfig
ifconfig ip ipv4 ipv6 public-ip
Last synced: over 1 year ago
JSON representation
Public IP API
- Host: GitHub
- URL: https://github.com/jakewmeyer/ifconfig
- Owner: jakewmeyer
- License: apache-2.0
- Created: 2019-07-14T03:22:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T02:12:00.000Z (over 3 years ago)
- Last Synced: 2025-03-28T18:51:50.446Z (over 1 year ago)
- Topics: ifconfig, ip, ipv4, ipv6, public-ip
- Language: Rust
- Homepage: https://ifconfig.jakemeyer.sh
- Size: 153 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ifconfig - Public IP address API
[](https://github.com/jakewmeyer/ifconfig/actions?query=workflow%3ACICD)
## Usage
### Plaintext
```bash
curl -s 'https://ifconfig.jakemeyer.sh'
```
```text
192.168.1.1
```
### JSON
```bash
curl -s 'https://ifconfig.jakemeyer.sh/json' | jq
```
```json
{"ip":"192.168.1.1"}
```
## Setup
### Docker Compose v3+
`docker-compose.yml`
```yaml
services:
ifconfig:
container_name: "ifconfig"
image: ghcr.io/jakewmeyer/ifconfig:latest
ports:
- "7000:7000"
restart: "unless-stopped"
```
```bash
docker-compose up
```
### Docker run
```bash
docker run -p 7000:7000 ghcr.io/jakewmeyer/ifconfig:latest
```