Commit graph

4 commits

Author SHA1 Message Date
Claude
a5f28d5f6f
security: fix critical + high code review findings
CRITICAL:
- DaemonRpc: only cache successful responses as stale fallback (not errors)
- Records endpoint: replaced file_get_contents with Http::timeout(3)

HIGH:
- WalletRpc: removed exception message from API response (IP leak)
- Ticket/session IDs: replaced MD5(predictable) with random_bytes (CSPRNG)
- Race condition lock: Cache::add() atomic instead of has()+put()

MEDIUM:
- Block caching: getBlockByHeight cached 1hr (blocks are immutable)
- Sunrise meta description: fixed Blade variable syntax

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:08:18 +01:00
Claude
94f0b454b2
feat(proxy): billing endpoint for Blesta metered invoicing
- GET /v1/proxy/billing/{apiKey} — usage + charges per tier
- Mobile: $5/GB, Residential: $2.50/GB, SEO: $1/1K requests
- Period, usage bytes/GB/requests, per-tier cost breakdown
- Blesta cron queries this to generate overage invoices

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 05:25:40 +01:00
Claude
7c38f1a836
feat(proxy): prefer live paired gateways over chain discovery
- connect endpoint checks GatewayRegistry first for paired nodes
- Returns real WireGuard/proxy endpoints, region, load from live data
- Falls back to chain alias discovery when no paired gateways available
- Response includes source: 'paired' or 'chain' for transparency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 04:56:46 +01:00
Claude
a7fa7ca087
feat(proxy): api.lthn.io proxy gateway module
- POST /v1/proxy/connect — get gateway node for service type (mobile/residential/seo)
- GET /v1/proxy/usage — usage tracking per API key (bytes, GB, requests)
- GET /v1/proxy/nodes — list available nodes by capability
- GET /v1/proxy/status — network availability + service pricing
- NodeSelector: round-robin selection from chain aliases by capability
- UsageMeter: per-key tracking of bytes and requests
- Three billing models: mobile ($5/GB), residential ($2.50/GB), SEO (per-request)
- Auth required for connect/usage, public for status/nodes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 04:33:13 +01:00