Switch your host/IP mappings in real time without editing your hosts file

Latest Version

Version
2.0.0
Update
March 29, 2022
Size
57.78KiB
Developer
Category
Users
10,000+
Rating
3.325 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
DeclarativeNetRequestWithHostAccess
Scripting
Storage
See more

LiveHosts Extension

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
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "LiveHosts", "version": "2.0.0", "icons": { "16": "icons/livehosts-16.png", "48": "icons/livehosts-48.png", "128": "icons/livehosts-128.png" }, "description": "Switch your host/IP mappings in real time without editing your hosts file", "background": { "service_worker": "background.js", "type": "module" }, "options_page": "options.html", "action": { "default_icon": { "19": "icons/livehosts-19.png", "38": "icons/livehosts-38.png" }, "default_popup": "popup/popup.html" }, "web_accessible_resources": [ { "resources": [ "/popup/*" ], "matches": [ "*://*/*" ] } ], "incognito": "split", "permissions": [ "declarativeNetRequestWithHostAccess", "scripting", "storage" ], "host_permissions": [ "*://*/*" ]}
Read more

How to download and manually install LiveHosts extension for Chrome

Looking for a way to install LiveHosts extensions for Chrome, you can search for them in the Chrome Web Store, clicking the "Add to Chrome" button, and following the straightforward process.

However, you may need to install LiveHosts extensions manually, this article outlines two simple methods to effortlessly install LiveHosts extensions, whether they come as unpacked folders in compressed formats like .zip or as .crx files.

Method 1: Download LiveHosts extension and manually install through Drag &Drop

If you ever need to manually install a LiveHosts extension for Chrome, don't worry, it's a simple process. Just follow these easy steps, and you will have your extension ready to use in no time.

Step 1: Download the LiveHosts Extension by clicking the "Download CRX" button on the website.

Look for the LiveHosts extension you wish to install. Go to the website and download the LiveHosts extension package, which is usually a .CRX file and comes in a zipped file. Here ".crx" file is the format for LiveHosts extension that contains all the data.

Step 2: Extract &Arrange Files

Once the file is downloaded, extract that file into its own folder. Similarly, give that extension files a permanent home. In other words, keep it in a folder that you don't accidentally delete it because these files will be needed to make that extension work.

Step 3: Go to the Chrome Extensions Page

Open Google Chrome and in the address bar, type chrome://extensions; it will open the Google Chrome extensions page. Make sure that "My extensions" is selected in the sidebar.

Step 4: Drag and Drop the Extension

Now, go to the folder where you extracted the LiveHosts extension and drag &drop the extension file from there anywhere onto the extension page within Google Chrome.

Step 5: Complete the Installation

Once you drag and drop the extension file, follow the steps that Google Chrome takes you through. Similarly, if the extension file is of .crx file format, you will be required to review the permissions and then add the extension.

Now, you can manage that added extension as you would like to with any other Chrome extension that you added through Chrome Webstore. Its icon will also appear in the Google Chrome Menu on the right side of the address bar once you activate it.

Method 2: Download LiveHosts extension for Chrome and install in Developer Mode

This is another method to install LiveHosts extension manually, but the twist is that here, you install by enabling the developer mode option provided in Google Chrome. This mode is commonly used for testing extensions or running unpublished tools.

Step 1: Download the LiveHosts extension file

Select and download the LiveHosts extension by clicking the 'Download CRX' button on the website.

Step 2: Extract the downloaded contents

Convert the file to a ZIP file if it is in CRX format then extract the LiveHosts extension zip file or folder that you downloaded. Make sure you extract it using the same folder name and keep it safely in another folder, so you don't delete it by mistake. The extracted folder will be needed to keep your LiveHosts extension running.

Step 3: Open Chrome Extension Setting Page

In the address bar of Google Chrome, type chrome://extensions and open the Chrome Extension Page.

Step 4: Enable Developer Mode

After opening the Chrome Extension page, look at the top right side, and you will find the toggle option of "Developer mode."Simply enable that developer mode option.

Step 5: Load the Unpacked Extension

Once you enable the developer mode option, you will see the menu of Load Unpacked, Pack Extensions and Update. From that, select the option "Load unpacked."

Step 6: Select the Extension Folder

Once the pop-up opens upon clicking Load unpacked, select the LiveHosts extension directory and click on the "Select Folder "button.

Step 7: Confirm and Install

After you select an extension folder of a Google Chrome extension you're installing manually, confirm its installation for the final time and let the installation complete.

Conclusion

Here we've made a step-by-step guide on How to manually install LiveHosts extension in 2 ways. We hope this guide proves helpful.

Similar Extensions

icon

Virtual Hosts Extension · Developer Tools 10,000+ 102 ★ 9.7KiB

icon

Awesome Host Manager Extension · Developer Tools 10,000+ 15 ★ 969KiB

icon

Domain Switcher Extension · Developer Tools 10,000+ 29 ★ 1.05MiB

icon

Virtual Hosts Extension · Developer Tools 10,000+ 16 ★ 274KiB

icon

URL's Host Switcher Extension · Developer Tools 10,000+ 1 ★ 75.14KiB

icon

Website IP Extension · Developer Tools 10,000+ 207 ★ 55.45KiB

icon

HostSwitcher Extension · Developer Tools 10,000+ 2 ★ 7.57KiB

icon

HostAdmin Extension · Developer Tools 10,000+ 53 ★ 181KiB

icon

Requestly - Intercept, Modify & Mock HTTP Requests Extension · Developer Tools 10,000+ 1227 ★ 876KiB

icon

Switch environment Extension · Developer Tools 10,000+ 4 ★ 43.0KiB

icon

Domain Changer Extension · Developer Tools 10,000+ 6 ★ 252KiB

icon

Hosts modifier Extension · Developer Tools 10,000+ 6 ★ 274KiB

icon

ModHeader - Modify HTTP headers Extension · Developer Tools 10,000+ 1061 ★ 676KiB

icon

Xdebug helper Extension · Developer Tools 10,000+ 429 ★ 70.13KiB

icon

Host name rewriter Extension · Productivity 10,000+ 14 ★ 28.02KiB

icon

Siderite's DNS Resolver Extension · Productivity 10,000+ 5 ★ 58.61KiB

icon

DNS Flusher Extension · Developer Tools 10,000+ 16 ★ 18.67KiB

icon

Flush DNS & close sockets Extension · Developer Tools 10,000+ 4 ★ 20.54KiB

icon

Server IP Extension · Developer Tools 10,000+ 48 ★ 35.34KiB

icon

Modify Header Value (HTTP Headers) Extension · Developer Tools 10,000+ 46 ★ 94.33KiB

icon

Web Vitals Extension · Developer Tools 10,000+ 43 ★ 398KiB

icon

CSS Used Extension · Developer Tools 10,000+ 184 ★ 164KiB

icon

User CSS Extension · Developer Tools 10,000+ 264 ★ 298KiB

icon

Dr.FLARE Extension · Developer Tools 10,000+ 13 ★ 1.66MiB

User reviews

icon

Serge (ID: 000000ae07edaa9f) Voted 5 ★ - Updated 10/10/2023 Действительно работает =) Перепробовал все их, это единственное, которое на сегодняшний день работает. Да ещё и по вкладкам работает. Одни вкладки на оригинал сайта, другие на тот же сайт на виртуальной машине – всё прекрасно работает.

icon

Ree Wankko (ID: 00000072de37b23e) Voted 2 ★ - Updated 09/06/2023 不是我希望的能替代 /etc/hosts 的插件,他只是修改了请求的host,这实际上会造成各种异常情况,就想别的评论中说的一样。

icon

Josue Garcia (ID: 0000004cbded0b8f) Voted 2 ★ - Updated 08/30/2023 The extension is not working on Chrome, but runs very well on Firefox, is there something to make it work on google chrome?

icon

Null Null (ID: 00000079d9e703c6) Voted 1 ★ - Updated 08/25/2023 It's already been said in comments here, but this does not do what it says. It rewrites the URL and replaces the domain with the IP you specify. This is absolutely no good for servers doing SNI!

icon

Renato Frota (ID: 0000003f1388da1d) Voted 5 ★ - Updated 07/15/2023 PT-BR. Vou dar 5 estrelas pela criatividade, mas no mundo atual, em que HTTPS já se tornou o protocolo padrão de fato e as diversas proteções CORS (Cross Origin Resource Sharing) também já estão bastante comuns, a extensão não tem mais valia. Recomendo o serviço SkipDNS, que não depende de extensão e funciona até mesmo em dispositivos móveis, sem necessidade de configuração prévia por parte das outras pessoas com quem você quiser compartilhar o link de pré-visualização. English. I'll give it 5 stars for creativity, but in today's world, where HTTPS has become the de facto standard protocol and the various CORS (Cross Origin Resource Sharing) protections are also quite common, the extension has no added value. I recommend the SkipDNS service, which is extension-free and even works on mobile devices, with no prior setup required by the other people you want to share the preview link with.