Skip to content

tibberous/FixHosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

FixHosts v1.0

I’m happy to release FixHosts, a small open-source Python utility for toggling managed Windows hosts-file entries on and off without manually editing the file every time.

FixHosts is built for a simple workflow: take active entries like 127.0.0.1 example.local # auto and flip them into disabled entries like # auto: 127.0.0.1 example.local, then flip them back when needed. It also supports named switch groups, creates a backup before writing, requests elevation on Windows when necessary, and flushes DNS after changes so updates take effect immediately.

Highlights

  • Toggle managed Windows hosts entries on and off
  • Support for default and named switch groups
  • Dry-run mode to preview changes
  • Automatic backup creation before writes
  • Windows elevation prompt when admin rights are required
  • DNS flush after successful updates

Example

Active:

127.0.0.1 mysite.local # auto
127.0.0.1 api.mysite.local # auto: dev

Disabled:

# auto: 127.0.0.1 mysite.local
# auto: dev: 127.0.0.1 api.mysite.local

Why I made it

This project is for developers and power users who want a cleaner way to enable and disable local vhost-style host mappings without constantly hand-editing the Windows hosts file.

Project Links

Author

Trenton Tompkins
TrentTompkins@gmail.com

For custom Python development, call 724 431 5207.

Disclaimer

This is open-source software released under the MIT License and provided as is, without warranty of any kind. The author is not responsible for damages, misconfiguration, downtime, data loss, or any other issues resulting from use of this software.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages