https://github.com/dubniczky/vpn-detect
VPN Detection in the browser using JavaScript
https://github.com/dubniczky/vpn-detect
deanonymization exploit javascript vpn-detection
Last synced: 2 months ago
JSON representation
VPN Detection in the browser using JavaScript
- Host: GitHub
- URL: https://github.com/dubniczky/vpn-detect
- Owner: dubniczky
- License: mit
- Created: 2022-08-03T22:38:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T08:50:00.000Z (over 2 years ago)
- Last Synced: 2025-03-28T07:11:42.718Z (3 months ago)
- Topics: deanonymization, exploit, javascript, vpn-detection
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 29
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# VPN Detect
VPN Detection in the browser using JavaScript
## Usage
1. Create an account and copy the API key to `detect.js`: https://ipgeolocation.io
2. Open the `index.html` page
3. Turn on your VPN and switch to another location
4. Wait for the detection to show the result
5. Turn off your VPN of choice, then reload the webpage or run `runDetect()` in the console.## Methodology
VPNs are capable of hiding user information, such as IP address, which is usually an important aspect of approximating location. This method might not work 100% of the time, but from the testing, it's overwhelmingly accurate.
The way VPN usage is detected is by comparing the time-zone values from the bowser's built-in localization against the ISP information of an IP address.
For IP information acquisition, `ipgeolocation.io` services were used for the demo. In the case of such services, the detection must be done server-side to hide the API key.
Finally, the estimated and the time-zone-based locations are compared. If they match, it's likely the user is not using a VPN (or proxy). Otherwise, in case of a significant difference, the use of a VPN is almost guaranteed, unless the user has misconfigured or purposefully modified the timezone settings of their device or browser.