{"id":23194287,"url":"https://github.com/biswajitthakur/host-rs","last_synced_at":"2026-03-05T16:49:38.631Z","repository":{"id":295729352,"uuid":"988823606","full_name":"BiswajitThakur/host-rs","owner":"BiswajitThakur","description":"A CLI tool that manage website blocking, unblocking, redirection.","archived":false,"fork":false,"pushed_at":"2025-05-23T06:09:38.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T08:41:05.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BiswajitThakur.png","metadata":{},"created_at":"2025-05-23T06:09:22.000Z","updated_at":"2025-05-26T09:46:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"980da26e-243c-4d5f-a2d1-7e0113b9a013","html_url":"https://github.com/BiswajitThakur/host-rs","commit_stats":null,"previous_names":["biswajitthakur/host-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BiswajitThakur/host-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiswajitThakur%2Fhost-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiswajitThakur%2Fhost-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiswajitThakur%2Fhost-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiswajitThakur%2Fhost-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BiswajitThakur","download_url":"https://codeload.github.com/BiswajitThakur/host-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiswajitThakur%2Fhost-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268416168,"owners_count":24246854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-app","host","rust","web"],"created_at":"2024-12-18T13:13:54.885Z","updated_at":"2026-03-05T16:49:38.588Z","avatar_url":"https://github.com/BiswajitThakur.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Host-RS\n\n[![Crates.io](https://img.shields.io/crates/v/host-rs.svg)](https://crates.io/crates/host-rs)\n[![downloads](https://img.shields.io/crates/d/host-rs.svg)](https://crates.io/crates/host-rs)\n\nBlazingly fast CLI tool written in Rust to manage website blocking, unblocking, redirection.\n\n## Features\n\n- [x] **Block Website:** Add websites to blocklist to prevent access.\n- [x] **Unblock Website:** Remove websites from the blocklist to allow access.\n- [x] **Redirect Website:** Redirect traffic from one website to another.\n- [x] **Add Host Sources:** Add host source (A url that contains a list of hostnames).\n- [x] **Update Host Sources:** Update host sources.\n- [x] **Import hosts:** Import hostnames stored in a file and block or unblock them.\n- [x] **Export hosts:** Export the list of currently blocked or unblocked hosts.\n\n## Installation\n\nEnsure you have Rust installed (If you dont want to install Rust, install from precompiled binary).\n\n## Linux \u0026 macOS\n\n```bash\ngit clone https://github.com/BiswajitThakur/host-rs.git\ncd host-rs/\n./install.sh\n```\n\n## Other\n\n```\ncargo install host-rs\n```\n\n## **Usage**\n\n- **Help**\n\n```\n\u003e host-rs --help\nThis is a CLI tool to manage website blocking, unblocking, redirection.\n\nUsage: host-rs [OPTIONS] [COMMAND]\n\nCommands:\n  insert  Add host or url to allow, block, redirect, sources list\n  remove  Remove allow, block, redirect host and host sources\n  print   Print allow, block, redirect, etc host and host sources\n  import  Import host or url from file\n  export  Expoer user data (you can import it later)\n  update  Update sources or self\n  help    Print this message or the help of the given subcommand(s)\n\nOptions:\n      --allow \u003cALLOW\u003e...        Add host to allow list \u0026 removed from block list\n      --block \u003cBLOCK\u003e...        Add to block list \u0026 remove from allow list\n      --redirect \u003cREDIRECT\u003e...  Add to redirect list \u0026 remove from allow and block\n      --restore                 delete all host, host sources and restore /etc/hosts file\n  -h, --help                    Print help\n  -V, --version                 Print version\n```\n\n- **Block Website**\n\n```bash\nhost-rs --block \u003curl or hostname1\u003e \u003curl or hostname2\u003e ...\n```\n\n- **Remove Website from Blocklist**\n\n```bash\nhost-rs rm --block \u003curl or hostname1\u003e \u003curl or hostname2\u003e ...\n# or\n# host-rs remove --block \u003curl or hostname1\u003e \u003curl or hostname2\u003e ...\n```\n\n- **Allow Website**\n\nuse this when, you added hostsources and if it block some website and you don't want to block it.\n\n```bash\nhost-rs --allow \u003curl or hostname1\u003e \u003curl or hostname2\u003e ...\n```\n\n- **Remove Website from Allow List**\n\n```bash\nhost-rs rm --allow \u003curl or hostname1\u003e \u003curl or hostname2\u003e ...\n```\n\n- **Redirection**\n\nIn the following example, `\u003curl or hostname2\u003e` redirected to `\u003curl or hostname1\u003e` and `\u003curl or hostname4\u003e` redirected to `\u003curl or hostname3\u003e`\n\n```bash\nhost-rs --redirect \u003curl or hostname1\u003e \u003curl or hostname2\u003e \u003curl or hostname3\u003e \u003curl or hostname4\u003e ...\n```\n\n- **Remove from Redirect**\n\n```bash\nhost-rs rm --redirect \u003curl or hostname2\u003e \u003curl or hostname4\u003e ...\n```\n\n- **Add Host Sources**\n\nYou will get verious sources from [this](https://github.com/StevenBlack/hosts) repo.\n\n```bash\nhost-rs insert --sources \u003curl of sources\u003e\n```\n\n- **Update Host Sources**\n\n```bash\nhost-rs update --sources\n```\n\n- **Remove Host Sources**\n\n```bash\nhost-rs remove --sources \u003curl of sources\u003e\n```\n\n- **Uninstall**\n\n```bash\nhost-rs remove --self\n```\n\n## **Contributing**\n\nContributions are welcome! If you find any bugs, want to request a new feature or improve the code feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiswajitthakur%2Fhost-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiswajitthakur%2Fhost-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiswajitthakur%2Fhost-rs/lists"}