Author: | outlandnish |
---|---|
Views Total: | 3,237 views |
Official Page: | Go to website |
Last Update: | February 14, 2020 |
License: | MIT |
Preview:

Description:
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"> ... </body>
3. Build the HTML for the results.
<div id="results"> <h1 id="detection-result">VPN Detector</h1> <div> <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> </div> </div>