Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some suggestions #4

Open
oep42 opened this issue Nov 17, 2023 · 1 comment
Open

Some suggestions #4

oep42 opened this issue Nov 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@oep42
Copy link

oep42 commented Nov 17, 2023

Thank you for making this useful tool available.

Some suggestions, based on my experience with the latest version of "Update Hosts (Standard)":

Add to the documentation, that it is possible to add your own custom hosts file entries, like this:

  • Place your custom hosts file entries in a text file.
  • Name this text file hosts.99.
  • Place this text file in C:\Program Files (x86)\CWPUtilities\cwpumain\bin.
  • In "CWP Utilities SysTray", choose Edit Configs > Hosts (Standard) to open the editor.
  • In the editor, search for this line: busybox cat processing/hosts/hosts.* > processing/hosts/hosts-cat.final.
  • When this line has been found in the editor, insert the following line above the found line: copy hosts.99 processing\hosts.
  • Choose File > Save in the editor to save the change in the script.

Another suggestion: Add the option to the program to use an ignore list, i.e. a user created text file with URLs that are blocked in one or more of the downloaded blocking lists, but which should not be blocked.

Some more suggestions:

For each of the files that are to be downloaded with curl -s -o processing/hosts/hosts.*, check whether this file can be downloaded, and if not, display a warning.

When the file final-hosts.txt has been created, check the size of this file. If this file has a size of zero, abort the script with an error message that says that nothing could be downloaded (or something like that).

When the hosts file in C:\Windows\System32\drivers\etc is a read-only file, at the end of the script, this misleading message appears: Done! Your host file has been updated, while this is not the case. A few lines earlier it says Access is denied. 0 file(s) copied. I guess some people may overlook this earlier message. My suggestion is, to check first whether the hosts file is a read-only file, and if so, abort the script with an error message. (Or, as an alternative, if this is possible: Before trying to write to the hosts file, if needed, the script changes the read-only attribute of the hosts file, so writing to it is possible. When the hosts file was originally a read-only file, after writing to the hosts file, the script makes it a read-only file again.)

With some firewalls or other security programs, it is possible to prevent modifications to the hosts file. When such a prevention has been set, at the end of the script, this misleading message appears: Done! Your host file has been updated, while this is not the case. A few lines earlier it says The process cannot access the file because it is being used by another process. 0 file(s) copied. I guess some people may overlook this earlier message. My suggestion is, to check first whether the hosts file has been blocked by another program, and if so, abort the script with an error message.

You may consider to add https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts to the Defaults Hosts File Sources (and then remove the three sources "MVPS", "PGL Yoyo", and "URL Haus", because they then become duplicates, as they are included in the StevenBlack source).

NOTE: The link in the script to "URL Haus" (https://gitlab.com/curben/urlhaus-filter/raw/master/urlhaus-filter-hosts-online.txt), links to an old version of the "URL Haus" list, while the link in https://github.com/bongochong/CWP-Utilities/blob/master/MoreInfo/DefaultHostsLists.md links to the current version of the "URL Haus" list.

@bongochong
Copy link
Owner

bongochong commented Nov 21, 2023

Thank you for the suggestions! There's a lot of work I intended to get done before doing another release - and I'm about halfway through with it - but many other responsibilities have gotten in the way, so the project is in maintenance mode for the time being. Most of your suggestions are not major, so I will implement them rather quickly. The only one I disagree with is using Steven Black's compiled hosts as a default source, simply because the other project I maintain, from which this one is derived, has essentially the same goals, but allows me to have more granular control over whitelisting, blacklisting, what sources are included etc... Though users can easily edit the scripts to include Steven Black's hosts list as a source, should they wish to do so.

Thanks again. I'll leave this issue open as a reminder, and to put some fire under my butt for completing the next release.

@bongochong bongochong self-assigned this Nov 21, 2023
@bongochong bongochong added the enhancement New feature or request label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants