Quick Navigation
Overview
apiproxyd is a high-performance API caching daemon that enables businesses to deploy on-premises caching infrastructure for api.apiproxy.app. Reduce API costs by up to 90% and improve response times from 200ms to under 5ms.
High Performance
Built in Go, handles 10K-100K cached requests/sec
Dual Cache Backends
SQLite for single-server, PostgreSQL for multi-server
Secure
API key authentication, whitelisted endpoints, encrypted storage
Offline Mode
Continue serving cached responses without internet connectivity
Note: apiproxyd is available for Government, Enterprise, and Custom pricing tiers. Contact sales to add it to your plan.
Installation
Using Go
go install github.com/afterdarksys/apiproxyd@latestClone and Build
git clone https://github.com/afterdarksys/apiproxyd.git cd apiproxyd make build
Using the Installer
python3 install.pyDocker
# Build image make docker-build # Run container docker run -p 9002:9002 \ -v $(pwd)/config.json:/app/config.json:ro \ apiproxyd:latest
Configuration
Create a config.json file:
{
"server": {
"host": "127.0.0.1",
"port": 9002
},
"entry_point": "https://api.apiproxy.app",
"api_key": "apx_live_your_key_here",
"cache": {
"backend": "sqlite",
"path": "~/.apiproxy/cache.db",
"ttl": 86400
},
"offline_endpoints": ["/v1/darkapi/ip/*", "/health"],
"whitelisted_endpoints": ["/v1/darkapi/*", "/v1/nerdapi/*"]
}Configuration Reference
| Field | Type | Description | Default |
|---|---|---|---|
| server.host | string | Listen address | 127.0.0.1 |
| server.port | int | Listen port | 9002 |
| api_key | string | Your API key | (required) |
| cache.backend | string | sqlite or postgres | sqlite |
| cache.ttl | int | Cache TTL (seconds) | 86400 (24h) |
Usage
Authentication
# Interactive login apiproxy login # Login with API key apiproxy login --api-key apx_live_xxxxx
Daemon Management
apiproxy daemon start # Start background service apiproxy daemon stop # Stop daemon apiproxy daemon status # Check daemon status apiproxy daemon restart # Restart daemon
Making API Requests
# Using CLI apiproxy api GET /v1/darkapi/ip/8.8.8.8 # Using HTTP proxy curl http://localhost:9002/api/v1/darkapi/ip/8.8.8.8 \ -H "X-API-Key: apx_live_xxxxx"
Monitoring
# Health check curl http://localhost:9002/health # Cache statistics curl http://localhost:9002/cache/stats
Performance Benchmarks
SQLite Backend
- Cache Hit: <5ms
- Throughput: 10K-100K req/sec
- Storage: ~1KB per response
PostgreSQL Backend
- Cache Hit: ~10ms
- Throughput: Scales horizontally
- Storage: Unlimited capacity
Need Help?
Our team is here to help you deploy and optimize apiproxyd for your infrastructure