Simple-adblock: fast, lean and fully uci/luci configurable AdBlocking

Reset browser cache.

I tried different browser and private window, still simple-adblock luci interface not showing.

You can try

rm -rf /var/luci-modulecache/; rm -f /var/luci-indexcache;
[ -x /etc/init.d/rpcd ] && /etc/init.d/rpcd reload;

Or /etc/init.d/rpcd restart but it's the same as rebooting.

Yes, I have tried rebooting too. Still no sign of simple-adblock luci interface. How to check it?

I again tried removing and installing simple-adblock here are the errors.

Executing package manager
Installing simple-adblock (1.9.3-7) to root...
Downloading http://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a72/packages/simple-adblock_1.9.3-7_all.ipk
Configuring simple-adblock.
Errors
/etc/rc.common: eval: line 611: can't create /var/run/simple-adblock/simple-adblock.json: nonexistent directory
/etc/rc.common: eval: line 611: can't create /var/run/simple-adblock/simple-adblock.json: nonexistent directory
Collected errors:
 * resolve_conffiles: Existing conffile /etc/config/simple-adblock is different from the conffile in the new package. The new conffile will be placed at /etc/config/simple-adblock-opkg.
Executing package manager
Installing luci-app-simple-adblock (1.9.3-3) to root...
Downloading http://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a72/luci/luci-app-simple-adblock_1.9.3-3_all.ipk
Configuring luci-app-simple-adblock.
Errors
uci: Parse error (invalid command) at line 1, byte 0

Your (/etc/config/simple-adblock) config file seems to be corrupted. Can you post it/PM it to me?

1 Like
cat /etc/config/simple-adblock
cat /etc/config/simple-adblock-opkg
config simple-adblock 'config'
        option enabled '0'
        list allowed_domain 'cdn.jsdelivr.net'
        option allow_non_ascii '0'
        option canary_domains_icloud '0'
        option canary_domains_mozilla '0'
        option compressed_cache '0'
        option config_update_enabled '0'
        option config_update_url 'https://cdn.jsdelivr.net/gh/openwrt/packages/net/simple-adblock/files/simple-adblock.conf.update'
#       option curl_max_file_size '1000000'
        option curl_retry '3'
        option download_timeout '10'
        option debug '0'
        option dns 'dnsmasq.servers'
        option dns_instance '0'
        option force_dns '1'
        list force_dns_port '53'
        list force_dns_port '853'
# ports listed below are used by some
# of the dnscrypt-proxy v1 resolvers
#       list force_dns_port '553'
#       list force_dns_port '1443'
#       list force_dns_port '4343'
#       list force_dns_port '4434'
#       list force_dns_port '5443'
#       list force_dns_port '8443'
        option led 'none'
        option parallel_downloads '1'
        option procd_trigger_wan6 '0'
        option procd_boot_wan_timeout '60'
        option verbosity '2'

# File size: 16.0K
        list blocked_hosts_url 'https://adaway.org/hosts.txt'

# File size: 20.0K
        list blocked_hosts_url 'https://cdn.jsdelivr.net/gh/hoshsadiq/adblock-nocoin-list/hosts.txt'

# File size: 80.0K
        list blocked_hosts_url 'https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext'

# File size: 388.0K
# block-list may be too big for some routers
# block-list may block some video-streaming content
#       list blocked_hosts_url 'https://cdn.jsdelivr.net/gh/jawz101/MobileAdTrackers/hosts'

# File size: 424.0K
# block-list may be too big for some routers
        list blocked_hosts_url 'https://winhelp2002.mvps.org/hosts.txt'

# File size: 432.0K
# block-list may be too big for some routers
        list blocked_hosts_url 'https://someonewhocares.org/hosts/hosts'

# File size: 613.0K
# block-list may be too big for some routers
        list blocked_domains_url 'https://cdn.jsdelivr.net/gh/AdguardTeam/cname-trackers@master/combined_disguised_trackers_justdomains.txt'

# File size: 624.0K
# block-list too big for most routers
#       list blocked_hosts_url 'http://sysctl.org/cameleon/hosts'

# File size: 1.6M
# block-list too big for most routers
#       list blocked_hosts_url 'https://cdn.jsdelivr.net/gh/StevenBlack/hosts/hosts'

# File size: 3.1M
# block-list too big for most routers
#       list blocked_hosts_url 'https://hostsfile.mine.nu/Hosts'

# File size: 8.3M
# enabling this will disable processing of any other block/allow-lists

# File size: 1.4M
# block-list too big for most routers
#       list blocked_adblockplus_url 'https://small.oisd.nl/'

# File size: 6.2M
# block-list too big for most routers
#       list blocked_adblockplus_url 'https://nsfw.oisd.nl/'

# File size: 6.2M
# block-list too big for most routers
#       list blocked_adblockplus_url 'https://big.oisd.nl/'

# File size: 1.5M
# block-list too big for most routers
#       list blocked_domains_url 'https://small.oisd.nl/domains'

# File size: 7.8M
# block-list too big for most routers
#       list blocked_domains_url 'https://nsfw.oisd.nl/domains'

# File size: 19.9M
# block-list too big for most routers
#       list blocked_domains_url 'https://big.oisd.nl/domains'

# site was down on last check
#       list blocked_domains_url 'http://support.it-mate.co.uk/downloads/hosts.txt'

So is /etc/config/simple-adblock empty???

no its start with


cat /etc/config/simple-adblock-opkg
config simple-adblock 'config'

I think I pasted this line when I copied from simple-adblock-opkg

This line shouldn't be there. I'm guessing malformed config file prevents the WebUI from loading.

1 Like

Yes, I have removed it and it's working now. Even after power failure simple-adblock is working.

Thanks for your perseverance in testing. If the message:

Collected errors:
 * resolve_conffiles: Existing conffile /etc/config/simple-adblock is different from the conffile in the new package. The new conffile will be placed at /etc/config/simple-adblock-opkg.

threw you off, you can ignore it. It's safe to keep the old config file when upgrading this package. Any new settings would have a default value used when the option is not present in the config.

1 Like

I had a sort of strange thing happen when I initially installed simple-adblock.

I installed it, enabled it, restarted the router, but when I went to read the logs and after the usual dnsmasq messages "using only locally-known addresses for local (etc, etc)," there was a new message that said "using only locally-known addresses for zzth*** (censored since I don't know what the site is or does)"

I thought the weird URL might be coming from a local device so I disabled peer DNS, added the URL to blocked domains, and set up some upstream DNS resolvers.

However, I am using the default "Force Router DNS server to all local devices" setting. In LuCI it says "Force DNS ports:53 853." (Does it normally include port 853?)

My PC is using a wireguard tunnel and continues to use their DNS servers (this is not an issue for me). So I checked dnsleaktest on a different PC on the same subnet, and it just lists our public IP address (not our ISP's DNS address or the upstream resolvers).

Does that mean it's working on the PC without a VPN and that the upstream resolvers are unnecessary or does dnsmasq use the upstream resolvers?

Essentially I'm not sure where the strange URL came from or how installing simple-adguard resulted in dnsmasq listing it in the logs and wondered if anyone had any idea how this happened ?

Note: The unknown URL disappeared from the logs after disabling peer DNS, blocking the domain, and setting up upstream resolvers (I'm not which one of these steps if any removed the URL from dnsmasq's log messages).

@stangri Do you think in the next version we could have a section to specify curl options? It would be great since some urls are blocked in certain parts of the world that is used to download blocklists (like raw.githubusercontent) is blocked in india and I have to use a socks5 proxy to get around it

So you need just one parameter to be able to add whatever to the curl command?

In the meantime, you can switch from raw.githubusercontent.com to jsdelivr.com/gh/, the package default config uses the jsdelivr.com/gh/ links instead of github links for that specific reason.

Yes that would be kinda cool, kinda like the option in banIP package :

But this fits the bill for my usecase at the moment, thanks for the tip!

I don't want to overburden UI with the options so few people need, but simple-adblock 1.9.4-5 has an option in the config file which support passing additional parameter to curl. Check the package default config file/README.

i have been facing this lately.

failed to load names from /var/run/simple-adblock/dnsmasq.addnhosts: Permission denied

how to fix?

EDIT: fixed after updating to version 1.9.4-6.

1 Like

@stangri Is there a way to specify the directory where the compressed blacklist cache file should be saved? It seems to be hardcoded to /etc/ at the moment. I would like to store the compressed cache in an external USB flash drive (/mnt/sda1/) instead. It would be great to have something similar to adblock's adb_backupdir configuration option.

Is it mounted early enough for simple-adblock to grab the compressed cache from there on start?