Skip to content

BlackHosts

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Nov 07:03
· 2 commits to master since this release

Release

For file choices for this project are (rename all blackhosts_* files to just blackhosts if you like):

File Description
blackhosts_linux The main compiled binary executable for Linux
blackhosts.deb A Debian .deb package installer for the blackhosts_linux file; not necessary, just convenient
blackhosts_macos The main compiled binary executable for MacOS
blackhosts_windows.exe The main compiled binary executable for Windows

Changelog

v1.1.0

Performance Optimizations

  • Replaced regular expressions with native string operations: Removed regex-based matching for command-line arguments, remote missing-file detection, and yes/no confirmation prompts. These operations now use simpler string comparisons, including case-insensitive comparisons where appropriate, reducing unnecessary overhead.
  • Optimized file comparison: Replaced the process of hashing both downloaded and local hosts data just to determine whether they differ with a direct byte-for-byte comparison.
  • Made MD5 calculation conditional: MD5 checksums are now calculated only when the downloaded content differs from the existing hosts file, avoiding unnecessary hashing when no update is needed.
  • Streamlined argument handling: Simplified command-line argument processing by skipping the executable argument directly, reducing intermediate state, and using more straightforward collection handling.
  • Reduced unnecessary allocations: Added capacity preallocation where appropriate and simplified temporary data structures and variables.
  • Simplified URL and path construction: Reduced intermediate string handling when constructing download URLs and alternate-list paths.

Code Cleanup

  • Replaced recolored usage in main.rs: Removed its colorization usage in favor of lightweight ANSI escape-code helpers, preserving colored and bold terminal output without relying on the additional abstraction.
  • Removed unused imports and redundant logic: Cleaned up unnecessary declarations and simplified operations that were more complicated than needed.
  • Simplified conditional logic: Reduced redundant checks and intermediate variables while retaining the existing behavior.
v1.0.1793744309
  • Changed Rust build to statically link openssl. This is for the sake of the Linux build and the only alterntive is to package in a container which I do not want to at this time.

v1.0.109134

  • Changed the versioning system.

v1.0.0

Future Changes

v1.1.* - planned

  • Optimization/performance fixes.
  • Complete change/update to workflow build system.

v2.0.* - planned

  • Changing delivery system to libcurl (currently JSDELIVR).## Support Me If You Like

If you like this project and care to donate to my PayPal:

PayPal Donation

Or Buy Me A Coffee if your prefer:

Buy Me A Coffee