Commit Graph

2 Commits

Author SHA1 Message Date
08ca75966e Fix dependency injection and implement proper CIDR checking
- Add http module for proper FX dependency injection
- Fix router to accept state manager parameter
- Implement proper CIDR-based checking for RFC1918 and documentation IPs
- Add reasonable timeouts (30s) for database downloads
- Update tests to download databases to temporary directories
- Add tests for multiple IP lookups and error cases
- All tests passing
2025-07-27 18:44:53 +02:00
2a1710cca8 Implement IP API daemon with GeoIP database support
- Create modular architecture with separate packages for config, database, HTTP, logging, and state management
- Implement Cobra CLI with daemon command
- Set up Uber FX dependency injection
- Add Chi router with health check and IP lookup endpoints
- Implement GeoIP database downloader with automatic updates
- Add state persistence for tracking database download times
- Include comprehensive test coverage for all components
- Configure structured logging with slog
- Add Makefile with test, lint, and build targets
- Support both IPv4 and IPv6 lookups
- Return country, city, ASN, and location data in JSON format
2025-07-27 18:15:38 +02:00