-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
further optimization #54
Comments
Are you using the script with compression settings? Because this hosts file is so streamlined already, most systems will never experience an issue requiring optimization. However, there are some select builds of Windows systems that do run into issues related to line count, not file size. For these cases, the script contains options for compression levels where you can condense multiple host entries to a single line. When a compression level is selected, all multi-line comments are condensed to a single line and the performance impact by keeping these comments has been found to be negligible. The reason why these comments are intentionally kept is for debugging purposes, which far outweigh any possible negligible performance cost.
I do really like this idea and I'm actually curious why this has never come up before. It's not a super strong security measure, but every layer of security definitely helps. I think a bigger security enhancement could also be changing the user and group permissions, as well. As of right now the script doesn't explicitly change any attributes or permissions, so I think just reinforcing the best practice attributes and permissions for the hosts file would be a good idea. Anyone else have any further input on these? I would personally like to see the security enhancements in the next release. |
Yes, I can confirm the bottleneck on some windows systems is the number of lines.
My conclusion is that the vanilla script already performs good job and the 15.3k lines hosts file is surely useful (on some systems it is a life changer!). |
I'll take a look at implementing some additional options, as well as wait for further contributor input. I do value your feedback, so please rest assured and there is no need to continue to follow up on this at this time.
I can tell you right now 15 entries per line does not work on a Windows system as a Windows system can only parse 10 delimited chunks. In a hosts file, the 10 chunks are first the black hole IP address, and then the 9 host entries, each chunk delimited by white space. |
Addresses the following issue: #54
Addresses the following issue: #54
Just pushed the update for making the hosts read-only. I have been a bit busy lately and was waiting to resolve the issue with PowerShell using TLS 1.2 first, which is also resolved in this update. Please update your script to make sure everything is working appropriately and let me know for confirmation.
Creating an option for this is the next thing on the to-do list. |
Hello developer, thanks for the useful script.
Here annexed a further optimization, based on version 1.46, in the hope that it could be useful.
Hosts_UpdateA.zip
The text was updated successfully, but these errors were encountered: