0
0
Fork
You've already forked ip_api
0
A simple API to request you're public IP
Rust 58.1%
Shell 41.9%
squirl df825e030e
All checks were successful
build / build (push) Successful in 1m51s
updated packages and ci version
2025年12月16日 19:27:43 +01:00
.forgejo/workflows updated packages and ci version 2025年12月16日 19:27:43 +01:00
scripts User services only run when the user is logged in, thus breaking on headless systems. removed auto updates, as i'm not running online code as root 2025年05月19日 19:19:56 +02:00
src Refactored the getting of environment variables with defaults 2025年05月22日 21:57:00 +02:00
.gitignore Initial commit 2025年05月15日 23:04:21 +02:00
Cargo.lock updated packages and ci version 2025年12月16日 19:27:43 +01:00
Cargo.toml updated packages and ci version 2025年12月16日 19:27:43 +01:00
readme.md User services only run when the user is logged in, thus breaking on headless systems. removed auto updates, as i'm not running online code as root 2025年05月19日 19:19:56 +02:00

IP finder

An API to get you're ip address.

Installation

To install the API and updater services run cargo build --release --locked && sudo -E ./scripts/service_install.sh. To uninstall run sudo ./scripts/service_uninstall.sh. To update run cargo build --release --locked && sudo ./scripts/service_update.sh.

Once installed the services will reference some parts of the repo and build output. Please uninstall before (re)moving or renaming the parent folder, then reinstall.

Environment

Name Default value Description
LISTEN_ADDRESS 0.0.0.0:8080 The address and port the api will be listening on
IP_HEADER X-Real-IP The header in the request to respond, set to this value for use with nginx

When installed via the service scripts, the variables are stored in a .env file in the root of the repo.

Documentation

API documentation is found on the endpoint /docs.