Skip to content

Instantly share code, notes, and snippets.

@voronianski
Last active April 12, 2018 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voronianski/3ecae7d00292c921d298434d4d2b7a94 to your computer and use it in GitHub Desktop.
Save voronianski/3ecae7d00292c921d298434d4d2b7a94 to your computer and use it in GitHub Desktop.

Smart Locations and DNS Leak Workaround

Smart Locations is a Premium feature that allows users to have the ZenMate VPN extension automatically connected to a preset location when they visit certain websites. However, due to the way the browser proxy API that powers this feature works, DNS leaks can occur.

Why is it leaking?

Most browsers have a feature called "DNS Prefetching". It attempts to reduce latency delays of DNS resolution by pre-resolving the domain name of a website when the user tries to follow a link. This helps to predict which websites a user will most likely visit next time.

Normally, if Smart Locations is switched OFF, the fixed server mode in the extension is used. It strictly specifies a proxy server’s host and all connections will go through it. The DNS won't leak.

However, "DNS Prefetching" continues to function when Smart Locations is switched ON due to its requirement to use the browser's dynamic proxy server mode.

How to solve this?

If you want to use the Smart Locations feature and prevent possible DNS leaks, you have two options:

1. Disable DNS Prefetching in your browser.

Here is an example of how to do it in Google Chrome:

  • navigate to chrome://settings in the address bar
  • disable the options "Use a prediction service to help complete searches and URLs typed in the address bar" and "Use a prediction service to load pages more quickly"

2. Use the ZenMate VPN Desktop Client for your operating system.

You can download it here: https://zenmate.com/downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment