networkcat/proxyd

By networkcat

Updated 6 months ago

IP reputation API service with gRPC and REST interfaces

Image
Security
API management
0

1.6K

networkcat/proxyd repository overview

ProxyD

IP reputation API service with gRPC and REST interfaces.

https://github.com/NetworkCats/ProxyD

Features

  • Query IP reputation via REST or gRPC
  • Supports IPv4 and IPv6, including CIDR ranges
  • Automatic daily sync from OpenProxyDB (02:00 UTC)
  • LMDB storage for optimal performance
  • Prometheus metrics endpoint

Quick Start

docker run -d \
  --name proxyd \
  -p 7891:7891 \
  -p 7892:7892 \
  -v proxyd-data:/data \
  networkcat/proxyd

API

REST (port 7891)
# Query single IP
curl http://localhost:7891/v1/ip/1.0.0.13

# Query CIDR range
curl "http://localhost:7891/v1/range?cidr=1.0.0.0/24"

# Batch IP lookup
curl -X POST -H "Content-Type: application/json" \
  -d '{"ips": ["8.8.8.8", "1.1.1.1"]}' \
  http://localhost:7891/v1/ip/batch

# Batch range lookup
curl -X POST -H "Content-Type: application/json" \
  -d '{"cidrs": ["8.8.8.0/24", "1.1.1.0/24"]}' \
  http://localhost:7891/v1/range/batch

# Health check
curl http://localhost:7891/health

# Metrics
curl http://localhost:7891/metrics
gRPC (port 7892)
service ProxyD {
  rpc LookupIP(IPRequest) returns (ReputationResponse);
  rpc LookupRange(RangeRequest) returns (ReputationResponse);
  rpc BatchLookupIP(BatchIPRequest) returns (BatchReputationResponse);
  rpc BatchLookupRange(BatchRangeRequest) returns (BatchReputationResponse);
}

Configuration

Environment VariableDefaultDescription
PROXYD_DATA_DIR/dataData directory path
PROXYD_REST_PORT7891REST API port
PROXYD_GRPC_PORT7892gRPC API port
PROXYD_SYNC_HOUR_UTC2Daily sync hour (UTC)
PROXYD_CSV_URLOpenProxyDB URLCSV source URL

Build

cargo build --release

License

MIT

Tag summary

Content type

Image

Digest

sha256:9e58094e8

Size

8.3 MB

Last updated

6 months ago

docker pull networkcat/proxyd