API Overview
CloakProbe provides a simple REST API to retrieve IP information in multiple formats.
Base URL
Section titled “Base URL”https://ip.cloakprobe.devOr your own deployment URL.
Endpoints
Section titled “Endpoints”| Endpoint | Description | Content-Type |
|---|---|---|
GET / | HTML web interface | text/html |
GET /api/v1/info | Full JSON response | application/json |
GET /api/v1/plain | Plain text output | text/plain |
GET /healthz | Health check | application/json |
Authentication
Section titled “Authentication”No authentication required. CloakProbe is designed to be publicly accessible.
Rate Limiting
Section titled “Rate Limiting”CloakProbe itself has no rate limiting. If you’re running behind Cloudflare, you can configure rate limiting there.
All endpoints include permissive CORS headers, allowing browser-based requests from any origin.
IP Detection
Section titled “IP Detection”CloakProbe detects your IP address from these headers (in order):
CF-Connecting-IP(Cloudflare)X-Real-IPX-Forwarded-For(first IP)- Direct connection IP
Quick Examples
Section titled “Quick Examples”Get JSON Info
Section titled “Get JSON Info”curl https://ip.cloakprobe.dev/api/v1/infoGet Plain Text
Section titled “Get Plain Text”curl https://ip.cloakprobe.dev/api/v1/plainHealth Check
Section titled “Health Check”curl https://ip.cloakprobe.dev/healthz# {"status":"ok"}Use in Scripts
Section titled “Use in Scripts”# Get just your IPMY_IP=$(curl -s https://ip.cloakprobe.dev/api/v1/plain | head -1 | cut -d' ' -f2)echo "My IP: $MY_IP"Error Handling
Section titled “Error Handling”CloakProbe returns standard HTTP status codes:
| Status | Meaning |
|---|---|
200 | Success |
500 | Internal server error |
Errors are returned as JSON:
{ "error": "Description of the error"}