Lightweight Node.js API for resolving client external IP over HTTP and Kaven protocol.
Docker image: kavenzero/kaven-public-api
X-Real-IPX-Forwarded-For (first value)pnpm install
copy config.example.json config.json
pnpm start
By default, it listens on 0.0.0.0:80.
docker run --name kaven-public-api \
-p 80:80 \
-d kavenzero/kaven-public-api:latest
Configuration is loaded from config.json in the project root.
Example (config.example.json):
{
"host": "0.0.0.0",
"port": 80
}
Fields:
host: bind addressport: bind portSend any HTTP request to the server, for example:
curl http://127.0.0.1/
Response:
203.0.113.10
The server resolves IP using this priority:
remoteAddress / forwarding headersThe server can switch from HTTP parsing to a custom packet mode when a signature handshake is detected.
Packet types currently handled:
Initialize (91) -> InitializeOK (92)RequestExternalIP (101) -> RequestExternalIPOK (102)Error (-1)pnpm start: run server.jsMIT
Content type
Image
Digest
sha256:092cb76d7…
Size
91.7 MB
Last updated
3 months ago
docker pull kavenzero/kaven-public-api