hostsmate


Namehostsmate JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/kravchenkoda/hostsmate
SummaryAnti-malware, ad-blocking, and tracking protection tool that populates and manages the Hosts file.
upload_time2024-01-18 13:11:24
maintainer
docs_urlNone
authorDmytro Kravchenko
requires_python>=3.10.6
licenseMIT
keywords
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![codecov](https://codecov.io/gh/kravchenkoda/hostsmate/branch/master/graph/badge.svg)](https://codecov.io/gh/kravchenkoda/hostsmate)
[![PyTest](https://github.com/kravchenkoda/hostsmate/actions/workflows/pytest.yml/badge.svg)](https://github.com/kravchenkoda/hostsmate/actions/workflows/pytest.yml)
# HostsMate


Welcome to HostsMate! A CLI tool for Unix-like operating systems that works with /etc/hosts file.

Protect yourself from malware, tracking, ads, and spam. HostsMate blocks over 1.2M domains from regularly updated sources to keep your system safe. Customize blacklist and whitelist sources, manually block or whitelist domains, suspend HostsMate if necessary.


## Installation


To install `hostsmate`, you can use `pip`. Make sure to run the installation command with `sudo` to be able to further run `hostsmate` with `sudo`, which is required.

```bash
sudo pip install hostsmate
```

To run tests as well, install `hostsmate` with dev dependencies:

```bash
sudo pip install hostsmate[dev]
```

## How to use


Always use `sudo` when running `hostsmate` to ensure that it has the necessary permissions to modify your system's hosts file.


Start `hostsmate` with `sudo hostsmate --run`.

`sudo hostsmate` or `sudo hostsmate -h` will show the help message:

```
usage: hostsmate [-h] [-R | -a | -s | -r | -b [backup-path] | -x [domain] |
 -w [domain] | -W [url] | -B [url] | -i [url] | -o [url]]

options:
  -h, --help            show this help message and exit
  -R, --run             parse domains from blacklist sources and start the HostsMate
  -a, --autorun         setup automatic update of your Hosts file (Linux and FreeBSD only)
  -s, --suspend         suspend HostsMate
  -r, --resume          resume HostsMate.
  -b [backup-dir], --backup [backup-dir]
                        create a backup of the existing Hosts file in the specific directory
  -x [domain], --blacklist-domain [domain]
                        blacklist specified domain
  -w [domain], --whitelist-domain [domain]
                        whitelist specified domain
  -W [url], --add-whitelist-source [url]
                        add URL with whitelisted domains to whitelist sources
  -B [url], --add-blacklist-source [url]
                        add URL with blacklisted domains to blakclist sources
  -i [url], --remove-whitelist-source [url]
                        remove URL with whitelisted domains from whitelist sources
  -o [url], --remove-blacklist-source [url]
                        remove URL with blacklisted domains from blacklist sources
```
## Usage details



* `--blacklist-domain`  option saves the specified domain to `user's custom domains` section of the Hosts file.
These domain names will be preserved when the Hosts file is updated.
            

* Using `--add-blacklist-source` and `--add-whitelist-source` options you can add URL containing a list of domains, 
it will be parsed, formatted, deduplicated and used in your Hosts file.
             

* While running `--suspend` option you need to manually enable it back with `--resume`.


* `--autorun` is implemented through `anacrontab` dependency which is available on Linux and FreeBSD, hence this feature is limited to these OS.                                  
Autorun frequency may be set to *daily*, *weekly* or *monthly*. Daily is recommended ;)
     

* All sources are being parsed concurrently, so it's faster than a lot of similar tools.              
                 
## Logs


A log file is created for every date `hostsmate` ran in `/var/log/hostsmate` directory.

## License


This project is licensed under the terms of the [MIT License](https://github.com/kravchenkoda/hostsmate/blob/master/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kravchenkoda/hostsmate",
    "name": "hostsmate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Dmytro Kravchenko",
    "author_email": "dmytro.kravchenko@gmx.com",
    "download_url": "https://files.pythonhosted.org/packages/59/c3/5561276d771d4d7d0a1dbf8702510d99a399a2231f777a3919269fdaf74e/hostsmate-1.0.2.tar.gz",
    "platform": null,
    "description": "[![codecov](https://codecov.io/gh/kravchenkoda/hostsmate/branch/master/graph/badge.svg)](https://codecov.io/gh/kravchenkoda/hostsmate)\n[![PyTest](https://github.com/kravchenkoda/hostsmate/actions/workflows/pytest.yml/badge.svg)](https://github.com/kravchenkoda/hostsmate/actions/workflows/pytest.yml)\n# HostsMate\n\n\nWelcome to HostsMate! A CLI tool for Unix-like operating systems that works with /etc/hosts file.\n\nProtect yourself from malware, tracking, ads, and spam. HostsMate blocks over 1.2M domains from regularly updated sources to keep your system safe. Customize blacklist and whitelist sources, manually block or whitelist domains, suspend HostsMate if necessary.\n\n\n## Installation\n\n\nTo install `hostsmate`, you can use `pip`. Make sure to run the installation command with `sudo` to be able to further run `hostsmate` with `sudo`, which is required.\n\n```bash\nsudo pip install hostsmate\n```\n\nTo run tests as well, install `hostsmate` with dev dependencies:\n\n```bash\nsudo pip install hostsmate[dev]\n```\n\n## How to use\n\n\nAlways use `sudo` when running `hostsmate` to ensure that it has the necessary permissions to modify your system's hosts file.\n\n\nStart `hostsmate` with `sudo hostsmate --run`.\n\n`sudo hostsmate` or `sudo hostsmate -h` will show the help message:\n\n```\nusage: hostsmate [-h] [-R | -a | -s | -r | -b [backup-path] | -x [domain] |\n -w [domain] | -W [url] | -B [url] | -i [url] | -o [url]]\n\noptions:\n  -h, --help            show this help message and exit\n  -R, --run             parse domains from blacklist sources and start the HostsMate\n  -a, --autorun         setup automatic update of your Hosts file (Linux and FreeBSD only)\n  -s, --suspend         suspend HostsMate\n  -r, --resume          resume HostsMate.\n  -b [backup-dir], --backup [backup-dir]\n                        create a backup of the existing Hosts file in the specific directory\n  -x [domain], --blacklist-domain [domain]\n                        blacklist specified domain\n  -w [domain], --whitelist-domain [domain]\n                        whitelist specified domain\n  -W [url], --add-whitelist-source [url]\n                        add URL with whitelisted domains to whitelist sources\n  -B [url], --add-blacklist-source [url]\n                        add URL with blacklisted domains to blakclist sources\n  -i [url], --remove-whitelist-source [url]\n                        remove URL with whitelisted domains from whitelist sources\n  -o [url], --remove-blacklist-source [url]\n                        remove URL with blacklisted domains from blacklist sources\n```\n## Usage details\n\n\n\n* `--blacklist-domain`  option saves the specified domain to `user's custom domains` section of the Hosts file.\nThese domain names will be preserved when the Hosts file is updated.\n            \n\n* Using `--add-blacklist-source` and `--add-whitelist-source` options you can add URL containing a list of domains, \nit will be parsed, formatted, deduplicated and used in your Hosts file.\n             \n\n* While running `--suspend` option you need to manually enable it back with `--resume`.\n\n\n* `--autorun` is implemented through `anacrontab` dependency which is available on Linux and FreeBSD, hence this feature is limited to these OS.                                  \nAutorun frequency may be set to *daily*, *weekly* or *monthly*. Daily is recommended ;)\n     \n\n* All sources are being parsed concurrently, so it's faster than a lot of similar tools.              \n                 \n## Logs\n\n\nA log file is created for every date `hostsmate` ran in `/var/log/hostsmate` directory.\n\n## License\n\n\nThis project is licensed under the terms of the [MIT License](https://github.com/kravchenkoda/hostsmate/blob/master/LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Anti-malware, ad-blocking, and tracking protection tool that populates and manages the Hosts file.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/kravchenkoda/hostsmate"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10d91f1ecef44ea9a4b86dabbb9e9f26820e4105b7df46e9fe83134affd25b81",
                "md5": "4b3ed2496b549ffe6a7c357b1be24d99",
                "sha256": "bb3c20ee9e50d8ae3dd7d4211e5b53bf753a5fc1c6615a054647eedf36c64793"
            },
            "downloads": -1,
            "filename": "hostsmate-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b3ed2496b549ffe6a7c357b1be24d99",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.6",
            "size": 36907,
            "upload_time": "2024-01-18T13:11:22",
            "upload_time_iso_8601": "2024-01-18T13:11:22.950658Z",
            "url": "https://files.pythonhosted.org/packages/10/d9/1f1ecef44ea9a4b86dabbb9e9f26820e4105b7df46e9fe83134affd25b81/hostsmate-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59c35561276d771d4d7d0a1dbf8702510d99a399a2231f777a3919269fdaf74e",
                "md5": "4bc3626305794d0709d4bfa6a4a02db4",
                "sha256": "0f25fcf0287e5c4977bea2d513ad25ba436d9171510936edb54b1e51da95427c"
            },
            "downloads": -1,
            "filename": "hostsmate-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4bc3626305794d0709d4bfa6a4a02db4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.6",
            "size": 23695,
            "upload_time": "2024-01-18T13:11:24",
            "upload_time_iso_8601": "2024-01-18T13:11:24.886325Z",
            "url": "https://files.pythonhosted.org/packages/59/c3/5561276d771d4d7d0a1dbf8702510d99a399a2231f777a3919269fdaf74e/hostsmate-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-18 13:11:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kravchenkoda",
    "github_project": "hostsmate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.25.1"
                ]
            ]
        }
    ],
    "lcname": "hostsmate"
}
        
Elapsed time: 0.24405s