Check If Your Users Use A VPN – poc-vpn-detection

Category: Javascript | February 14, 2020
Views Total:3,862 views
Official Page:Go to website
Last Update:February 14, 2020


Check If Your Users Use A VPN – poc-vpn-detection


A vanilla JavaScript VPN detector that checks if your users are accessing your site via a VPN.

This library compares the browser’s time zone with that of the IP address and notifies your visitors if using a VPN.

How to use it:

1. Download and load the test.js library in the document.

<script type="text/javascript" src="./test.js"></script>

2. Add the #body to the body tag.

<body id="body">

3. Build the HTML for the results.

<div id="results">
  <h1 id="detection-result">VPN Detector</h1>
    <h2 class="result">Browser Timezone</h2>
    <span id="browser-timezone" class="result"></span>
    <h2 class="result">IP Timezone</h2>
    <span id="ip-timezone" class="result"></span>
    <span id="error-detail" class="error"></span>

You Might Be Interested In:

Leave a Reply