This guide demonstrates how to detect VPN, proxy, TOR, and bot IP addresses in Rust using the reqwest crate and the Focsec API.
We'll build a type-safe client that checks IP addresses and flags suspicious connections.
Add dependencies
Add the required crates to your Cargo.toml:
Define the response types
Create structs to deserialize the API response:
Check an IP for VPN or proxy
Make an API request to detect VPN and proxy IPs.
Grab your free API key if you haven't already.
API Response
Each request returns a structured response with threat indicators and IP metadata:
Next steps
Your Rust application can now identify VPN and proxy connections. Explore the API Reference for the full specification.
Sign up for a free account and start detecting VPNs, proxies, and bots in your application.
Get your API key »