Giter Club home page Giter Club logo

Comments (3)

guumaster avatar guumaster commented on May 27, 2024

Not sure if I understand the request correctly. Profiles are already groups of urls. You can add YouTube, twitter and such to a social media group:

hostctl add domain --ip 1.1.1.1 youtube.com -p socialmedia
hostctl add domain --ip 2.2.2.2 twitter.com -p socialmedia

And then enable/disable all together

from hostctl.

smhmd avatar smhmd commented on May 27, 2024

As I've said, I'm not using hosts to manage a server or anything, I'm using hosts to block websites when I wanna focus on work or block NSFW material. My idea was to have a master profile for individual profiles. To block Twitter I have the following in hosts:

...15 lines blocking facebook 
127.0.0.1       www.twitter.com
127.0.0.1       twitter.com
127.0.0.1       www.mobile.twitter.com
127.0.0.1       mobile.twitter.com
127.0.0.1       api.twitter.com
...27 lines blocking some google stuff

And that's the same for most other websites. It only makes sense to have profiles for these websites as they aren't a single domain to be blocked.

But, comes 7 PM and I'm Ok with social media and news websites. A profile group for all of these profiles to enable them at mass.

I'm only asking for this feature thinking it could be useful to others. If it's not so, I could easily make a shell script for myself.

from hostctl.

guumaster avatar guumaster commented on May 27, 2024

you can also add all your blocks into a file, for example $HOME/block-etchost, and block all once with a single command:

hostctl add -p superblock --from $HOME/block-etchost

And all would be added easily.

Also, if all have the same IP, you can do with a single command: hostctl add domain facebook.com twitter.com -p socialmedia (defaults to localhost ip), but it would be a long command if you have too many domains.

from hostctl.

Related Issues (20)

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.