Coder Social home page Coder Social logo

genhosts's Introduction

genhosts

License C++

A simple program to generate hosts file from specified blocklist URLs.

Table of Contents

Features

  • Downloads specified blocklist URLs in /etc/genhosts/config.toml
  • Concatenates each one, ordered by priority
  • Removes duplicate entries
  • Hosts download directory, output location
  • Dumps default config to /etc/genhosts/config.toml if specified
  • Restores default /etc/hosts if specified
  • Loads config from a custom file if specified

Prerequisites

  • A C++ compiler with C++20 support
  • Meson build system
  • libcurl library

Installation

  1. Clone the repository:
git clone https://github.com/randalthor17/genhosts.git
  1. Navigate to the project directory:
cd genhosts
  1. Generate meson build directory:
meson setup -Dbuildtype=release -Db_strip=true --prefix=/usr build

Note: You can change the prefix to ~/.local to do a local installation.

  1. Build the project:
meson compile -C build
  1. Install the project:
meson install -C build

Usage

genhosts [OPTION...]

  -c, --config arg              Configuration file location (default: 
                                /etc/genhosts/config.toml)
      --hosts-save-dir arg      Hosts file download directory (default: 
                                /etc/hosts.d)
  -o, --output arg              Hosts output path (default: /etc/hosts)
  -s, --dump-config [=arg(=/etc/genhosts/config.toml)]
                                Dump config to a specific path
      --restore [=arg(=/etc/hosts)]
                                Restore hosts file
  -h, --help                    Print help

License

This project is licensed under the MIT License - see the LICENSE file for details.

genhosts's People

Contributors

randalthor17 avatar

Stargazers

Austin Songer,MIS,CEH,ESCA,Project+ (Navy Veteran) avatar

Watchers

 avatar

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.