Blog
VPN detection: spotting VPNs, proxies, Tor and data center traffic at signup
How VPN, proxy, Tor and data center detection works from an IP address, what it misses, and how to add friction at signup without turning real users away.
Updated 2026-11-23
VPN detection checks whether an IP address belongs to a network known to run VPN servers, proxies or Tor exits, or to a hosting network where servers rather than people sit. It is best effort: the Tor Project's exit list is reliable, data center classification casts a wide net, and VPN and proxy lists only catch services that have been identified, while residential proxies are generally invisible. At signup, use the flags to add friction, such as an email or phone confirmation, rather than to block.
Four signals, four kinds of evidence
The word "VPN detection" covers four different checks. They come from different sources and deserve different responses.
| Signal | How it is detected | What it catches | What it misses |
|---|---|---|---|
| Tor exit node | Exact match on the list the Tor Project publishes | Every exit relay on the published list | Relays added since the last refresh |
| Data center | The address's network is classified as hosting | Any server in a hosting or cloud network: VPN servers, proxies, scrapers, cloud desktops | Servers in networks not classified as hosting |
| VPN | The address belongs to a network known to be run by a VPN service | Identified VPN services, including outside data centers | New ranges, small or private services |
| Proxy | The address belongs to a network known to be run by a proxy service | Identified proxy services | Residential proxies |
The data center flag is the widest net. It does not need to know which service runs on a server, only that the address is a server's. That is also why it catches legitimate traffic, from company gateways to your own monitoring.
How each signal is built
Tor. Tor routes traffic through three relays and releases it from an exit node. The Tor Project publishes the addresses of current exit nodes, so a match is close to certain. The Qelka API refreshes its copy of the bulk exit list on a schedule; a relay that joined in the last hours may not be on it yet.
Data center. Every public address is announced by an autonomous system (ASN). Networks are classified from their registered names and a curated list of hosting networks. If the ASN is hosting, flags.datacenter is true and asn.type is hosting.
VPN and proxy. Commercial VPN and proxy services run servers in ranges that can be identified, either their own networks or blocks inside hosting providers. A list of those ranges sets the flags. It only knows services someone has identified, which is why both flags are documented as best effort.
Risk score. The API combines the flags into risk.score, from 0 to 100, and risk.level: low under 30, medium from 30 to 69, high from 70.
What an IP address cannot reveal
- Residential proxies. Traffic relayed through ordinary home connections arrives from an ordinary provider's address, with no flag.
- A VPN on a home or office line. Someone who runs their own VPN server exits through a normal provider or business network.
- New services. A VPN range is flagged only after it is identified.
- The person. An anonymizer hides the user's own address from every site. Detection says how they connect, not who they are.
A false flag therefore means "not detected", never "clean".
How common setups show up in a lookup
The same flags read differently depending on what the user actually runs. This table helps you read a result in context.
| What the user runs | What the lookup shows | Detectable from the address? |
|---|---|---|
| A commercial VPN app | The VPN server's address: data center when the server is in a hosting network, VPN when the network is a known VPN service | Often, not always |
| A VPN on a rented cloud server | The cloud provider's network: data center, asn.type of hosting, no VPN flag unless the range is known |
As a server, yes; as a VPN, no |
| A company VPN | The company's network (business) or its cloud provider (hosting) |
As corporate traffic, yes |
| Tor Browser | A Tor exit address | Yes, from the published list |
| An open or paid proxy | The proxy server's address: data center in a hosting network, proxy for a known proxy network | Often, not always |
| A residential proxy network | An ordinary internet provider's address, no flags | No |
| A phone on mobile data | A mobile carrier's address, asn.type of mobile, shared by many subscribers |
Not an anonymizer at all |
"Often, not always" is the honest answer for every commercial service: detection depends on the network being identified before the user shows up. When the VPN flag and the network type disagree, for example a VPN flag on an isp network, trust the flag. It comes from a list of known VPN networks, while the network type describes the autonomous system as a whole.
Signals you can add on your side
The IP address is not the only evidence available at signup. A few checks of your own fill some of the gaps:
- Time zone against country. In the browser,
Intl.DateTimeFormat().resolvedOptions().timeZonereturns the device's time zone, such asEurope/Paris. A device set to one continent behind an IP address on another is worth a second look, though travelers produce it too. - Velocity per network. Count signups per ASN and per address in a sliding window. Ten accounts from one hosting network in an hour say more than any single lookup.
- Repeated devices. The same browser or device behind several new accounts is a stronger signal than any network.
- Speed. Forms completed faster than a person can type point to a script, whatever its address.
These are your heuristics, run on your own data. Combine them with the flags rather than replacing one with the other.
Read the right client address
A lookup is only as good as the address you send. Get this wrong and every check is meaningless.
- Behind Cloudflare, read the
CF-Connecting-IPheader. - Behind a load balancer or reverse proxy, read the address it appends to
X-Forwarded-For, and trust that proxy only. In Express,app.set('trust proxy', 1)trusts one hop and makesreq.ipthe client address. - Never trust
X-Forwarded-Forblindly on a server reachable directly: anyone can send that header with any value. - In local development, the client address is
127.0.0.1or::1. The API answers422 unprocessable_inputfor such addresses and does not bill the call. Treat it as "no signal".
Check an address with the API
curl https://api.qelka.com/v1/ip \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"ip": "8.8.8.8"}'
{
"id": "lkp_01M84BQ42CYKZT70N43DNMM29E",
"object": "ip",
"input": "8.8.8.8",
"version": 4,
"country": { "code": "US", "name": "United States" },
"region": null,
"city": null,
"asn": { "number": 15169, "org": "Google LLC", "type": "hosting" },
"flags": { "tor": false, "vpn": false, "proxy": false, "datacenter": true },
"risk": { "score": 35, "level": "medium" },
"credits_used": 1,
"cached": false
}
Values are illustrative. The address belongs to a hosting network, so flags.datacenter is true and the risk is medium, with no VPN or proxy flag. In JavaScript, a function that turns the result into a level of friction, failing open:
export async function signupFriction(ip) {
const response = await fetch('https://api.qelka.com/v1/ip', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ip }),
signal: AbortSignal.timeout(3000),
}).catch(() => null)
if (!response?.ok) return { friction: 'none', flags: [] }
const result = await response.json()
const flags = Object.entries(result.flags)
.filter(([, isSet]) => isSet)
.map(([name]) => name)
if (result.flags.tor || result.risk.level === 'high') return { friction: 'verify_before_active', flags }
if (result.risk.level === 'medium') return { friction: 'verify_before_rewards', flags }
return { friction: 'none', flags }
}
Store the returned flags with the account. A pattern across accounts, such as several signups from one data center network, says more than one lookup, and the flags are what you will want when you investigate abuse later. Each lookup costs 1 credit, cached or not, so look an address up at signup, login or checkout, not on every page view.
What to do with each signal at signup
| Signal | Consumer product | Developer or B2B product | Payment or promotion |
|---|---|---|---|
| Tor exit node | Verify email or phone before the account becomes active | Same, or allow if your policy welcomes Tor | Review or decline: the payer's location is hidden |
| VPN | Allow; verify the email or phone | Allow | Compare billing country with other signals |
| Proxy | Verify before the account becomes active | Verify | Review |
| Data center, no VPN or proxy flag | Verify | Normal: servers are your users' tools | Review if the account is new |
| No flag | Normal flow | Normal flow | Normal checks |
Tor deserves its own decision. Some services welcome Tor users on purpose, others see mostly abuse from it. The flag lets you apply your policy without guessing.
Whatever you choose, prefer friction over walls. A real user asked to confirm an email loses a few seconds. A real user you block may never come back.
Legitimate traffic that trips the flags
Every flag has false positives that are not errors in the data: the address really is a server or a relay, but the person behind it is a normal customer.
| Source | Flag it can raise | How to recognize it |
|---|---|---|
| A company's cloud security gateway | Data center, sometimes proxy | Many staff of one company arrive from a few addresses in the same network |
| Virtual desktops and remote browsers | Data center | The network is a cloud platform; the user behaves like an office worker |
| Privacy relays built into browsers or operating systems | Data center or proxy | The user did nothing unusual |
| Your own monitoring, tests and CI | Data center | Your hosting providers' addresses; allowlist them |
| Partners calling your API | Data center | Expected: authenticate them with keys instead |
Run in shadow mode first
Before any flag changes what a user sees, log the decision your code would have made next to each new account, and do nothing else for a few weeks. Then compare with the accounts you later confirmed as abusive or legitimate. You learn how many real users each rule would have slowed down, and you set thresholds on your own traffic instead of assumptions.
Results also change over time. Cloud providers reassign addresses, VPN services add and retire ranges, Tor relays come and go. Store the flags you saw at signup with the date, rather than expecting a lookup months later to give the same answer.
Test it without real traffic
With a test key, the documentation ranges return fixed profiles: 192.0.2.10 is a residential address with a low risk, 203.0.113.10 a data center with medium, 198.51.100.10 a VPN and 198.51.100.200 a Tor exit node, both high. That covers every branch of the code above. See test mode.
Where to go next
The free VPN and proxy detection tool checks any address by hand, and the ASN lookup shows the network behind it. Flag VPN and data center traffic has the integration in Express and Python, and the IP API reference lists every field. Location is a separate question, covered in IP geolocation accuracy, and stopping fake signups combines these flags with email and phone checks.
Frequently asked questions
How do websites detect VPNs?
Can a VPN always be detected?
Should I block VPN users at signup?
What is a data center IP address?
Can you detect residential proxies?
How do I detect Tor users?
Why is my IP flagged as a VPN when I am not using one?
Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.