https://github.com/hightemp/ip_info_service
Service for searching information about ip (country, organization).
https://github.com/hightemp/ip_info_service
database geoip golang ip ip-lookup ipinfodb service
Last synced: 2 months ago
JSON representation
Service for searching information about ip (country, organization).
- Host: GitHub
- URL: https://github.com/hightemp/ip_info_service
- Owner: hightemp
- Created: 2024-10-29T15:57:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T20:22:01.000Z (over 1 year ago)
- Last Synced: 2025-04-12T06:32:16.045Z (about 1 year ago)
- Topics: database, geoip, golang, ip, ip-lookup, ipinfodb, service
- Language: Go
- Homepage:
- Size: 3.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ip_info_service
Service for searching information about ip in local database (country, organization).
## API Endpoints
### 1. Lookup IP Information
```
GET /lookup?ip=
```
```bash
curl "http://localhost:8080/lookup?ip=8.8.8.8"
```
### 2. Add Country Range
```
POST /ranges/add/country
```
```bash
curl -X POST "http://localhost:8080/ranges/add/country" \
-H "Content-Type: application/json" \
-d '{
"ip_start": "192.168.0.0",
"ip_end": "192.168.255.255",
"name": "RU"
}'
```
### 3. Add Organization Range
```
POST /ranges/add/organization
```
```bash
curl -X POST "http://localhost:8080/ranges/add/organization" \
-H "Content-Type: application/json" \
-d '{
"ip_start": "8.8.8.0",
"ip_end": "8.8.8.255",
"name": "Google"
}'
```