Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

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:

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