Tools for switching hosts file under linux environment is not easy, though. Chrome has Hosts Manager , HostAdmin and other plug-ins; Firefox below have HostAdmin , but these plug-ins need to heavily rely on the browser service.
Modify config.py.simple to config.py need to configure two places:
HOSTS_BACKUP_FOLDER point to a local folder, we recommend the use of cloud backup the folder, such as Dropbox or nuts cloud .
Hosts address HOSTS_FILE current server, such as / etc / hosts .
Make sure that the current user HOSTS_FILE have insufficient access rights.
You can run with sudo if needed.
Run the program (supporting python 2.7)
python hosts_switcher.py
