[Script] Adblock Plus Filters for Privoxy (without Optware)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
justyourimage
DD-WRT User


Joined: 04 Nov 2014
Posts: 113

PostPosted: Tue Dec 16, 2014 22:40    Post subject: Reply with quote
wabe wrote:
justyourimage wrote:


I'm not so sure about the Filterfiles tought I guess changes to those require a restart of Privoxy.


So "killall privoxy" + " /usr/sbin/privoxy " in the cron script should work? Or does privoxy need an additional argument to restart correctly


Dont forget to specify the config file when restarting Privoxy.

In case you're using the inbuild Privoxy with the custom config it 's residing in /tmp/privoxy.conf the command to restart Privoxy would have to look like this:

/usr/sbin/privoxy /tmp/privoxy.conf

_________________
The Netgear R7000 is a beast!

My contributions:

[Script] Adblock Plus Filters for Privoxy (without Optware)
[Privoxy-Template] PVXY Modern (officially integrated in DD-WRT starting Build r25541)

My Devices:

Netgear R7000 running DD-WRT BS 25648 with wl0_ampdu=off as Router
ASUS AC66U running DD-WRT Kong 23900 OLDD downclocked to 500 MHz as Repeater
ASUS N66U running 374.43_2 MerlinWRT with BL1.09 downclocked to 500MHz as WET for my Mainmachine
Linksys E2000 running Tomato v121 as WET for my Synology DS214play and Minix Neo X7 Mini
Sponsor
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 889

PostPosted: Wed Dec 17, 2014 18:06    Post subject: Reply with quote
justyourimage wrote:


In case you're using the inbuild Privoxy with the custom config it 's residing in /tmp/privoxy.conf the command to restart Privoxy would have to look like this:

/usr/sbin/privoxy /tmp/privoxy.conf


Seems to work just fine!

_________________
Netgear R7000 on Build 55109
Asus AC-AC68U rev. C1 (AP) on Build 55109
Asus AC-68U rev. A1 on Build 54604
Asus AC-68U rev. A1 on Build 53339
csbvpx
DD-WRT Novice


Joined: 16 Jun 2006
Posts: 26

PostPosted: Mon Jan 12, 2015 20:47    Post subject: Will the Privoxy executable run on Tomato Firmware? Reply with quote
Due to random reboots, I am planning to switch to Tomato Shibby. Can I take the privoxy executable and run it on Tomato? The OP indicated as much, need to confirm it.

--
Thanks.
boatingdude
DD-WRT Novice


Joined: 12 Dec 2013
Posts: 24

PostPosted: Wed Feb 04, 2015 13:58    Post subject: adblock script on new drivers Reply with quote
The privoxy -adblocking script is not working.
I get error
The list recieved from https://easylist-downloads.adblockplus.org/easylist.txt i
sn't an AdblockPlus list. Skipped
> Processing https://easylist-downloads.adblockplus.org/malwaredomains_full.txt ..
.
>
> Downloading https://easylist-downloads.adblockplus.org/malwaredomains_full.txt .
..
> .. downloading done.
> The list recieved from https://easylist-downloads.adblockplus.org/malwaredomains_full.txt isn't an Adb
lockPlus list. Skipped

I have tried on 26120,26125 and 26135. My router is R7000.
Could you please let me know whats wrong here.
Thanks
JoXANDRZ
DD-WRT Novice


Joined: 02 Feb 2015
Posts: 4

PostPosted: Thu Feb 05, 2015 2:18    Post subject: Re: adblock script on new drivers Reply with quote
boatingdude wrote:
The privoxy -adblocking script is not working.
I get error
The list recieved from https://easylist-downloads.adblockplus.org/easylist.txt i
sn't an AdblockPlus list. Skipped
> Processing https://easylist-downloads.adblockplus.org/malwaredomains_full.txt ..
.
>
> Downloading https://easylist-downloads.adblockplus.org/malwaredomains_full.txt .
..
> .. downloading done.
> The list recieved from https://easylist-downloads.adblockplus.org/malwaredomains_full.txt isn't an Adb
lockPlus list. Skipped

I have tried on 26120,26125 and 26135. My router is R7000.
Could you please let me know whats wrong here.
Thanks


What's your custom config? It should be

Code:

(something)
actionsfile malwaredomains_full.script.action
filterfile malwaredomains_full.script.filter
actionsfile easylist.script.action
filterfile easylist.script.filter
(something)


Did you create a tempdir for privoxy-blocklist.sh which is different from the tempdir in custom config?
JoXANDRZ
DD-WRT Novice


Joined: 02 Feb 2015
Posts: 4

PostPosted: Thu Feb 05, 2015 2:53    Post subject: Spam404ScamList and Custom Filters Reply with quote
Hello all,

Has anyone had trouble with loading the Spam404ScamList filter? When running
Code:
sh /jffs/privoxy-blocklist.sh
, it says that it is not a valid list (maybe the syntax is wrong)?

Also, is it possible to load our own lists?

Thanks.
Kalonji25
DD-WRT Novice


Joined: 07 Jan 2007
Posts: 34

PostPosted: Fri Feb 06, 2015 5:46    Post subject: Permission denied Reply with quote
Router: R7000
Firmware: Firmware: DD-WRT v24-sp2 (02/04/15) kongac

all night I continue to get the error blow, is there anyway I can fix it.
I did do a chmod +x to privoxy-blocklist.sh


Code:
root@DD-WRT:/jffs# ls
ca.crt                etc                   tmp
client.crt            privoxy-blocklist.sh  www
client.key            server.crt
dh1024.pem            server.key
root@DD-WRT:/jffs# ./privoxy-blocklist.sh
-sh: ./privoxy-blocklist.sh: Permission denied

_________________
Netgear R7000
DD-WRT v24-sp2 (02/26/15) kongac
JoXANDRZ
DD-WRT Novice


Joined: 02 Feb 2015
Posts: 4

PostPosted: Fri Feb 06, 2015 8:17    Post subject: Re: Permission denied Reply with quote
Kalonji25 wrote:
Router: R7000
Firmware: Firmware: DD-WRT v24-sp2 (02/04/15) kongac

all night I continue to get the error blow, is there anyway I can fix it.
I did do a chmod +x to privoxy-blocklist.sh


Code:
root@DD-WRT:/jffs# ls
ca.crt                etc                   tmp
client.crt            privoxy-blocklist.sh  www
client.key            server.crt
dh1024.pem            server.key
root@DD-WRT:/jffs# ./privoxy-blocklist.sh
-sh: ./privoxy-blocklist.sh: Permission denied


What are the permissions on it? Mine are 6-6-4 or rw-r-r. Try
Code:
chown -r root
maybe?
Kalonji25
DD-WRT Novice


Joined: 07 Jan 2007
Posts: 34

PostPosted: Fri Feb 06, 2015 12:22    Post subject: Reply with quote
Code:

BusyBox v1.23.0 (2015-02-04 08:23:53 CET) built-in shell (ash)

root@DD-WRT:~# cd /jffs/
root@DD-WRT:/jffs# ls
ca.crt                etc                   tmp
client.crt            privoxy-blocklist.sh  www
client.key            server.crt
dh1024.pem            server.key
root@DD-WRT:/jffs# chmod 644 privoxy-blocklist.sh
root@DD-WRT:/jffs# sh privoxy-blocklist.sh



I downloaded another privoxy-blocklist.sh, and set permission chmod 644 all seem to be working now....

thx in advance for any assistance.

_________________
Netgear R7000
DD-WRT v24-sp2 (02/26/15) kongac
Kalonji25
DD-WRT Novice


Joined: 07 Jan 2007
Posts: 34

PostPosted: Tue Feb 17, 2015 22:25    Post subject: Reply with quote
Hello.... Question

Is there anyway to run the "sh jffs/etc/privoxy-blocking.sh" script bi-weekly or weekly automatically?? Currently I'm doing this manually to update the filters.

Will love to automate this process if possible.

Thx in advance.
rocky13
DD-WRT User


Joined: 25 Apr 2008
Posts: 158

PostPosted: Tue Feb 17, 2015 22:39    Post subject: Reply with quote
Kalonji25 wrote:
Hello.... Question

Is there anyway to run the "sh jffs/etc/privoxy-blocking.sh" script bi-weekly or weekly automatically?? Currently I'm doing this manually to update the filters.

Will love to automate this process if possible.

Thx in advance.


You can do the following.

Under Administration > Management > look under Cron. Make sure it's enabled then under it enter e.g.

#Update Daily @12AM
0 0 * * * root /opt/adblock/adblock.sh

apply settings when done. either restart your router or do a stopservice cron && startservice cron in CLI

you are good to go.
Just make sure you enter the correct path

Below is the script I made to run adblocker. as it as whatever you like.

#!/bin/sh
# Don't forget to chmod +rw
# wait for a bit (5 seconds)... depending on your router you can make this longer or shorter
sleep 5

# change path to suit your installation
path="/opt/adblock"

# launch the script
sh $path/privoxy-blocklist.sh
Kalonji25
DD-WRT Novice


Joined: 07 Jan 2007
Posts: 34

PostPosted: Wed Feb 18, 2015 1:46    Post subject: Reply with quote
Thank you so much for the wealth of knowledge. I was able to add this to corn (please see below).

Code:
#Update Daily @12AM
0 0 * * * root /jffs/privoxy-blocklist.sh


Anyway to confirm the script actually ran ??


rocky13 wrote:
Kalonji25 wrote:
Hello.... Question

Is there anyway to run the "sh jffs/etc/privoxy-blocking.sh" script bi-weekly or weekly automatically?? Currently I'm doing this manually to update the filters.

Will love to automate this process if possible.

Thx in advance.


You can do the following.

Under Administration > Management > look under Cron. Make sure it's enabled then under it enter e.g.

#Update Daily @12AM
0 0 * * * root /opt/adblock/adblock.sh

apply settings when done. either restart your router or do a stopservice cron && startservice cron in CLI

you are good to go.
Just make sure you enter the correct path

Below is the script I made to run adblocker. as it as whatever you like.

#!/bin/sh
# Don't forget to chmod +rw
# wait for a bit (5 seconds)... depending on your router you can make this longer or shorter
sleep 5

# change path to suit your installation
path="/opt/adblock"

# launch the script
sh $path/privoxy-blocklist.sh

_________________
Netgear R7000
DD-WRT v24-sp2 (02/26/15) kongac
rocky13
DD-WRT User


Joined: 25 Apr 2008
Posts: 158

PostPosted: Thu Feb 19, 2015 2:33    Post subject: Reply with quote
Kalonji25 wrote:
Thank you so much for the wealth of knowledge. I was able to add this to corn (please see below).

Code:
#Update Daily @12AM
0 0 * * * root /jffs/privoxy-blocklist.sh


Anyway to confirm the script actually ran ??


You can either look into your /jffs/privoxy folder and check the timestamps of your filter files. It should populate to the current date. or you can script a log file like this.

#!/bin/sh

# Created for adblock, to update and log activity when script has started and ended.
# Don't forget to chmod +rw

# wait for a bit (5 seconds)... depending on your router you can make this longer or shorter
sleep 5

# change path to suit your installation
path="/opt/adblock"

# launch the script
# add a empty line in log
echo >> /opt/adblock/log/run.log
echo "Adblock Started - "$(date) >> opt/adblock/log/run.log 2>&1
sh $path/privoxy-blocklist.sh
echo "Adblock Finished - "$(date) >> /opt/adblock/log/run.log 2>&1
echo "----------------------------" >> /opt/adblock/log/run.log 2>&1
exit

I made a script to log the events

rocky13 wrote:
Kalonji25 wrote:
Hello.... Question

Is there anyway to run the "sh jffs/etc/privoxy-blocking.sh" script bi-weekly or weekly automatically?? Currently I'm doing this manually to update the filters.

Will love to automate this process if possible.

Thx in advance.


You can do the following.

Under Administration > Management > look under Cron. Make sure it's enabled then under it enter e.g.

#Update Daily @12AM
0 0 * * * root /opt/adblock/adblock.sh

apply settings when done. either restart your router or do a stopservice cron && startservice cron in CLI

you are good to go.
Just make sure you enter the correct path

Below is the script I made to run adblocker. as it as whatever you like.

#!/bin/sh
# Don't forget to chmod +rw
# wait for a bit (5 seconds)... depending on your router you can make this longer or shorter
sleep 5

# change path to suit your installation
path="/opt/adblock"

# launch the script
sh $path/privoxy-blocklist.sh
[/quote]
rocky13
DD-WRT User


Joined: 25 Apr 2008
Posts: 158

PostPosted: Thu Feb 19, 2015 2:42    Post subject: Reply with quote
Kalonji25 wrote:
Thank you so much for the wealth of knowledge. I was able to add this to corn (please see below).

Code:
#Update Daily @12AM
0 0 * * * root /jffs/privoxy-blocklist.sh


Anyway to confirm the script actually ran ??


Or i was thinking you can just enhance your cron script line to say

0 0 * * * root /jffs/privoxy-blocklist.sh | echo "Adblocker Started on" $(date) >> /jffs/adblockerrun.log


rocky13 wrote:
Kalonji25 wrote:
Hello.... Question

Is there anyway to run the "sh jffs/etc/privoxy-blocking.sh" script bi-weekly or weekly automatically?? Currently I'm doing this manually to update the filters.

Will love to automate this process if possible.

Thx in advance.


You can do the following.

Under Administration > Management > look under Cron. Make sure it's enabled then under it enter e.g.

#Update Daily @12AM
0 0 * * * root /opt/adblock/adblock.sh

apply settings when done. either restart your router or do a stopservice cron && startservice cron in CLI

you are good to go.
Just make sure you enter the correct path

Below is the script I made to run adblocker. as it as whatever you like.

#!/bin/sh
# Don't forget to chmod +rw
# wait for a bit (5 seconds)... depending on your router you can make this longer or shorter
sleep 5

# change path to suit your installation
path="/opt/adblock"

# launch the script
sh $path/privoxy-blocklist.sh
[/quote]
Kalonji25
DD-WRT Novice


Joined: 07 Jan 2007
Posts: 34

PostPosted: Tue Feb 24, 2015 4:14    Post subject: Reply with quote
@Rocky13

Thank again,

Please see attached images.

I must have missed something, I see the log file was being generated but the actually filer files where never updated.

I'll just run it manually for now until I figure out what I am doing wrong.



Screen Shot 2015-02-23 at 11.09.34 PM.png
 Description:
 Filesize:  301.23 KB
 Viewed:  17425 Time(s)

Screen Shot 2015-02-23 at 11.09.34 PM.png



Screen Shot 2015-02-23 at 11.10.12 PM.png
 Description:
 Filesize:  41.66 KB
 Viewed:  17425 Time(s)

Screen Shot 2015-02-23 at 11.10.12 PM.png



_________________
Netgear R7000
DD-WRT v24-sp2 (02/26/15) kongac
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next Display posts from previous:    Page 4 of 8
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum