Giter Club home page Giter Club logo

adsorber's People

Contributors

eksperimental avatar hakimifr avatar stablestud avatar tongtanhieu avatar vishnu350 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

adsorber's Issues

bind mount/overlayfs

use overlayfs / bind mount

Hi,
Is it possible for adsorber to use overlayfs or bind mount instead of backing up original hosts file and replace it?
Would be great cause the original host file is unchanged, and there's no need to worry about losing the backup.

Or maybe I'm just being too paranoid😅

hosts.original is not being honored

# To make any changes to this file please edit /etc/hosts.original
# and run 'adsorber update' to apply your changes.
# Or else your changes will be overwritten by Adsorber once a week.

I edit hosts.original and run "sudo absorber udpate" and I am not seeing the changes reflected in /etc/hosts

Feature Request: Temporarily disable adsorber

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).

Unable to install onto system - WGet error

Trying to install this utility (Placing file onto system) under Fedora 40 I have encauntered a problem caused by wget that doesn't recognize the option 'show-progress'. Here's the entire terminal output of a clean install:

Reading configuration ...
Setting up Adsorber ...
> Do you really want to setup Adsorber? [Y/n]: y
  Successfully created backup of /etc/hosts to /etc/hosts.original.
> What scheduler should be used to update the host file automatically? [(C)ron/(s)ystemd/(n)one]: s
> How often should the service run? [(h)ourly/(d)aily/(W)eekly/(m)onthly/(q)uarterly]: d
  Setting up daily Systemd service ...
  Initialized Systemd service ...
Updating /etc/hosts ...
  Getting: https://adaway.org/hosts.txt
  Unknown option 'show-progress'
! wget couldn't fetch: https://adaway.org/hosts.txt
  Getting: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
  Unknown option 'show-progress'
! wget couldn't fetch: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
! Couldn't fetch all hosts sources [0/2]. Aborting ...
! Cleaning up ...
  Removed Adsorber's Systemd service.
  Removed backup as the setup failed.

Uninstalling wget, and thus automatically using curl solves the issue although it's not always possible to uninstall wget due to some dependencies. Is there a way to force the use of curl?

In any case I would also like to thank the developer behind this utility, I can't have a system without it!

P.S. The latest version of wget at the moment on Fedora 40 is the GNU Wget2 2.1.0.

Do not discard changes in hosts file

Besides the comment, I think AdSorber should not discard changes in /etc/hosts.
What it should, I think, is make the block of hosts delimited with a start and end comment. Leave a comment saying this block will be overwritten in the next update, but only delete these chunk and preserve the rest of the file as is

Change default behaviour of `ignore_download_error` to false

The default behaviour is to ignore download errors. In my (quite regular) setup this causes adsorber to not apply anything, because it runs at system startup with systemd, and the wifi doesn't connect that fast.
This results in an empty hosts file, and thus nothing gets blocked except for what's on the blacklist.

When setting ignore_download_error=false in /usr/local/etc/adsorber/adsorber.conf, it still proceeds after a download error when running adsorber update. So it seems the setting is ignored either way.

GLib error

adsorber update puts out this at the moment (last update was done two months ago - no errors then):

Reading configuration ...
Updating /etc/hosts ...
  Getting: https://adaway.org/hosts.txt

(process:7250): GLib-CRITICAL **: 20:10:25.410: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_str_has_prefix: assertion 'str != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_str_has_prefix: assertion 'str != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_str_has_prefix: assertion 'str != NULL' failed

(process:7250): GLib-CRITICAL **: 20:10:25.411: g_uri_to_string: assertion 'uri != NULL' failed
2023-10-13 20:10:25 URL:https://adaway.org/hosts.txt [243454/243454] -> "-" [1]
  Getting: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_str_has_prefix: assertion 'str != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_str_has_prefix: assertion 'str != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_get_scheme: assertion 'uri != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_str_has_prefix: assertion 'str != NULL' failed

(process:7254): GLib-CRITICAL **: 20:10:25.615: g_uri_to_string: assertion 'uri != NULL' failed
2023-10-13 20:10:25 URL:https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext [99637] -> "-" [1]
  Successfully fetched 2 out of 2 hosts sources.
  Whitelist is empty, ignoring ...
  Blacklist is empty, ignoring ...
  Creating backup of current ad-domains
  Applying new hosts file ...
  Successfully applied new hosts file with 10009 blocked domains.
  Cleaning up ...
Finished successfully.

bash 5.2.15
glibc 2.38 (with CVE-2023-4911 fixed)
wget 1.21.4

Of these only glibc has been updated (several times) during the last two months.

Any idea?

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.