Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Temporarily disable adsorber #22

Open
eksperimental opened this issue Nov 11, 2021 · 12 comments
Open

Feature Request: Temporarily disable adsorber #22

eksperimental opened this issue Nov 11, 2021 · 12 comments

Comments

@eksperimental
Copy link
Contributor

eksperimental commented Nov 11, 2021

There are times when I need to temporarily disable Adsorber, just to check a website the way it normally is, or sometimes when I need to follow a redirected link which its URL is blocked.
This feature could convert to comments all relevant entries.. and un-comment then once re-enabled.

It could also be a feature like,, disable for X amount of time (default 5 minutes).

@stablestud
Copy link
Owner

stablestud commented Nov 17, 2021

Hi @eksperimental,

For this purpose there's the option restore
From the usage:

restore - restore hosts file to its original state
           (it does not remove the scheduler, this should be used temporary)

That means:

  • to disable Adsorber run: sudo adsorber restore
  • afterwards to re-enable Adsorber run:
    • sudo adsorber update - pull newest hosts and add them to the /etc/hostsfile

@eksperimental
Copy link
Contributor Author

eksperimental commented Nov 17, 2021

Sounds like a hack,
I think we could have two new commands more aligned to the action of systemd.

stop - disable the systemd services and disables the entries in the host fles.
start - set it back up

@stablestud
Copy link
Owner

stablestud commented Nov 17, 2021 via email

@stablestud
Copy link
Owner

stablestud commented Nov 17, 2021 via email

@eksperimental
Copy link
Contributor Author

But I wouldn't disable the Systemd service with adsorber stop as there is adsorber disable which does exactly that.

enable installs the systemd services, disable removes them.
start will start the system services plus leave the working code in hosts.
while stop will comment out the entires in host and stop the running service.

@eksperimental
Copy link
Contributor Author

NOTE: I am not a systemd expert. that I just my vague assumption of how they work.

UPDATE updates the host files. I think we should not use it for when we want to temporarily block/unblock connections

@stablestud
Copy link
Owner

stablestud commented Nov 17, 2021 via email

@stablestud
Copy link
Owner

@eksperimental release it out.
What do you think?

Can this be closed?

@eksperimental
Copy link
Contributor Author

Sorry, I was busy with other stuff, I got sidetracked..
I will run the new release and give you my feedback so we can close this issue if it's all good

thank you.!

@eksperimental
Copy link
Contributor Author

I think start should be different from update.

start / stop should work in the blink of an eye. just enabling/disabling the host entries..

@eksperimental
Copy link
Contributor Author

also, the README instructions should include instructions for UPDATING adsorber, not only for installing.

@eksperimental
Copy link
Contributor Author

Another action that could be added is status to check whether adsorber is running or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants