Compare Chrome extensions: LiveHosts vs Virtual Hosts

Stats LiveHosts LiveHosts Virtual Hosts Virtual Hosts
User count 10,000+ 2,000+
Average rating 3.47 3.40
Rating count 36 15
Last updated 2022-03-29 2018-05-29
Size 59.17K 280.58K
Version 2.0.0 0.0.0.4
Short description
Switch your host/IP mappings in real time without editing your hosts file Manage Virtual Hosts
Full summary

LiveHosts is a Chrome extension that aims at providing a working (even if sub-obtimal) solution to a common nuisance that many web developers have to deal with every day. If you have multiple versions of your websites sharing the same host names on multiple environments, you often need to switch the assignments in your OS hosts file.

Other extensions (like the life-saving HostAdmin) can help with the cumbersomeness, but changes to the hosts file usually take an inconvenient amount of time to actually affect the browser.

Unfortunately, there is no way to make Chrome direct requests for a hostname to a specific IP without a standard redirect - you could set up a smart HTTP proxy, but it's often not possible or not convenient.

This extension settles for a sub-obtimal approach: requests to the indicated hostnames are redirected to the chosen IPs with an additional Host header. The browser's address bar reflects this behaviour showing the hostname right after the IP (e.g. http://127.0.0.1/www.example.com/). The extension also tries to take care of all requests to either the IP or the hostname in a consistent way.

Issues

After the redirect, the user is effectively in a different domain that the one they expected. They may notice some functional differences:

  • depending on the server, parts of a web page referring to the site URL (like href and src attributes) could be different from the original
  • window.location has a different value that can potentially throw off JavaScript snippets
  • most Cross-Origin request won't work

This extension allows you to simply and easily manage virtual hosts which is basically a mapping of one host name to another. When ever you visit the source host, the Host header is modified to the mapped virtual host. If you try to directly visit the virtual host, you will be redirected to the source host.

Using the extension, you can access any site on multi-site host without making any DNS changes (local or otherwise). This is perfect for use cases where you have an IIS server running hosting multiple sites and you want to access one of them. This is also great for accessing and viewing other machine's sites which can be great in a collaborative environment where you want to see the exact state of another machine. An example of this is a project manager, QA tester, or another dev being able to view another worker's progress directly. Good for testing, debugging, and comparing changes.

This extension supports configuring a global preset list which is used by default when the extension is turned on. You can also limit the extension to only work on tab you explicitly enable using the extension icon in the toolbar for each app. You can use a combination of these features by using tab overrides without enabled the tab sandbox option in the options page.

========================== v0.0.0.3 ================================ The source host is grouped and allows you to open all of the virtual hosts for a given source host group. This will open a new tab for each virtual host entry. This makes it easy to view all of the sites (virtual hosts) on a given machine (source host).