GithubHelp home page GithubHelp logo

scottlerch / hostsfileeditor Goto Github PK

View Code? Open in Web Editor NEW
1.1K 53.0 144.0 924 KB

Easily edit and manage the hosts file for Windows

Home Page: https://hostsfileeditor.com/

License: Other

C# 99.24% Batchfile 0.58% PowerShell 0.18%
c-sharp hostseditor hostsfile tray

hostsfileeditor's Introduction

Download

Release binaries can be downloaded from GitHub or CodePlex.

Features

  • Cut, copy, paste, duplicate, enable, disable and move one or more entries at a time
  • Filter and sort when there are a large number of host entries
  • Enable and disable entire hostsfile from application or tray
  • Archive and restore various hostsfile configurations when switching between environments
  • Automatically ping endpoints to check availability

Main screen
main editor screen with optional archive visible on right

Tray
tray icon with context menu

Usage Notes

By default the application closes to the tray. To exit completely you must select Exit from the File menu or tray context menu. Only one instance of the application is allowed at a time. If you try to open it again it will just activate the previously running instance.

When selecting rows to move, delete, copy, or cut be sure to select the entire row using the row header cell. If no entire rows are selected, cut, copy, paste, and delete apply individually to the selected cells.

Using the filter and sort while editing is quirky. The filter and sort are applied once a cell is edited so your cell may change positions or disappear depending on the current sort and filter.

Build

Requires Visual Studio 2017 or newer. To build the installer you must have WiX Toolset 3.7+.

Run build-release.bat or build-debug.bat.

The binaries and setup file will be copied to the bin directory

License

GNU General Public

Equin.ApplicationFramework.BindingListView is by Andrew Davey and license terms can be found at http://blw.sourceforge.net/.

Icons are from the Open Icon Library and their license and terms can be found at http://openiconlibrary.sourceforge.net/.

hostsfileeditor's People

Contributors

scottlerch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hostsfileeditor's Issues

Download blocked from Chrome

The download from codeplex is blocked in Chrome due to some potential harmful code. For some reason it works to download from GH though. I don't know if it's possible to fix since messing with hosts is potentially harmful, I just wanted to let you know if you didn't already. I don't know if it would help if HostsFileEditor would ask to be opened in an elevated mode. I guess that changing stuff that you usually need admin access for without the right permission could be why Chrome is blocking the program. Windows also warns be that there is no trusted publisher (utgivare in Swedish, don't know if I translated it correct). I don't know if that also could have something to do with it. Or maybe I just installed some virus on my computer, I hope not ๐Ÿ˜ƒ

Cannot install HostsFileEditor

Clicking the .msi download file begins properly but the install step says that another Windows installer is running and must be canceled before continuing. The Task Manager shows that only this installer running. Canceling it also cancels the Hosts...msi installation which indicates that there is only this one running.

I am running Windows 10 and Firefox Browser. All Windows 10 updates have been made. All other apps have been shutdown.

Windows11

Hello on windows 11 you don't see the hosts file

Hostfile parsing bug

There is a bug where a space leading in a hostfile will break the parsing. If each line was trimmed for parsing it would solve this.

for example:

 # 127.0.0.1       		localhost

Results in:

image

server?

So I could distribute a list of sites that I consider important and trustworthy and those that are not. Perhaps in this sense it would be interesting to have a server to transmit links to block or hostsfile in HostsFileEditor

Double HostsFile

When opening the program with a disabled HostsFile, enabling it again and then saving the HostsFile would lead to the re-creation of a disabled HostsFile and as such problems when trying to save again.

hostsfile-bug-demonstration

Tray opens twice

From tray, if we open the editor and make some changes, we have to close it twice to hide it back to tray

Migrated from CodePlex:
REPORTED ON:Apr 13, 2015 at 11:39 PM
REPORTED BY: 3deepak

Move installer code to WiX

It might be an idea to move the installer build from an installer project to WiX. This is supported in VS2012 (with a plugin) and uses just XML as an input. It is also supported in MSBuild.

See: http://wixtoolset.org/

FileOpener

Be careful

extensionId + "/shell/open/command";

not the same than
Path.Combine(new[] { extensionId, "shell", "open", "command" });

Using \ not / in extensionId + "/shell/open/command"; not working

Feature/New option request - global shortcut key to unhide HFE

As, it is possible to close this app to the try icon only using red "X" in the right top corner the good option will be have the possibility to use shortcut - for example Ctrl+F4 to hide app to try and unhide this window (app) too without mouse ;)

Thanks and regards.

"SAVE" does not work

Although i ran the tool "as administrator" i cannot save my changes. I always get the error: "Access to c:\Windows.....\hosts was denied". What can i do?

Migrated from CodePlex
Id #12 | Release: None | Updated: Jan 28 at 7:17 AM by carlosmunoz | Created: Jul 24, 2014 at 1:25 AM by robertheine

Delete Key

When editing a row, backspace will delete the previous character, but the delete key will clear the entire row instead of deleting the character in front of the cursor like other editors.

Could we change this to be more consistent? Is this possibly related to #12?

Thanks

Add command line functionality

Hello,
Thank you for the excellent and really useful program.
I think it would be great to add command line functionality to switch presets. For example you want to add some lines to your hosts file before running one program and revert hosts file after closing that program.
Something like:

run.cmd
///////////////////////////////////////////////////
HostsFileEditor.exe -s MyHosts1
program.exe
HostsFileEditor.exe -s DefaultHosts
///////////////////////////////////////////////////

Where is MyHosts1 and DefaultHosts - your presets (archive)

Didn't starting if .exe.config didn't exist

If there are no HostsFileEditor.exe.config file then trying to start HostsFileEditor.exe will fail - program closes.
It must start with defaults and if necessary (something changed in settings/windows pos) - recreate config?

UPD: config parameters ignored.
Changing to

      <setting name="WindowLocation" serializeAs="String">
        <value>0, 0</value>
      </setting>
      <setting name="WindowSize" serializeAs="String">
        <value>1920, 1054</value>
      </setting>

does nothing.
Win 10 x64 22H2

Is HFE still actively maintained?

Doesn't look like it is.

I have some new features I might want to add, and I'm deciding between "send in pull requests" and "just fork and do my own thing".

Make copy and paste work

Copy and paste via keyboard shortcuts CTRL+C and CTRL+V doesn't work inside a cell. Only possible way to paste data into a cell is by right click context menu.

It would be nice if this can be fixed. Thanks.

[Improvement] Show loading screen at startup

If you have a hosts file consists more than 400k entries first startup of the app usually hangs long enough for windows to show app not responding dialog.

Adding a Loading screen will make the application more stable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.