Privoxy

Discussion in 'privacy technology' started by tobacco, Jul 19, 2010.

Thread Status:
Not open for further replies.
  1. tobacco
    Offline

    tobacco Frequent Poster

    Hey There

    Using Chrome browsers and want a free way to block ads. Have tried all the extensions such as adblock plus and even iron's builtin blocker but just wasn't satified. So now trying out Privoxy and it's working well but some ads still seem to slip through.

    What i need is a simpler explanation on how to add an ad to privoxy that i want blocked that isn't being blocked.

    I've done some searching but the info is just going over my head unfortunately o_O

    Anyone experienced with Privoxyo_O ?
  2. iceni60
    Offline

    iceni60 ( ^o^)

    i used privoxy in the past, but haven't made any config changes to it for years. but, you could try this - (i'm still using 3.0.6 so maybe things have changed a bit :p)

    go here -
    http://config.privoxy.org/show-status

    where it says Actions Files: click edit where it says user.action click edit.

    on the new page there are lots of Actions: options. where it has +block all by itself click ADD. add your ad you want to block in there and select Submit

    i just tried that on my very old version of privoxy and it didn't work lol. but i think that's because when you do that it edits the config file somewhere on your system called user.action, on my computer that's a root file my browser doesn't have write access to. when i found that file and edited it as root manually the image i tried to block was blocked when i restarted my browser.

    i'm not a privoxy expert, but good luck anyway :)

    the user manual shows how it works.
    http://www.privoxy.org/user-manual/actions-file.html#BLOCK
    http://www.privoxy.org/user-manual/index.html
    Last edited: Jul 19, 2010
  3. tobacco
    Offline

    tobacco Frequent Poster

    o_O i am so confused lol! o_O

    When i went there (first link), it only says "view" not edit. It says the editor is disabled and despite reading, can't figure out how to enable it :(
  4. tobacco
    Offline

    tobacco Frequent Poster

    I didn't figure out how to enable the editor but i may be making progress through trial and error.

    I seem to be able to ad url's with a gif or jpg to block by going on the desktop to "start/all programs/privoxy/edit config/user actions" which opens a text file. Add the url(s) under "+block", save and close.

    Now i need to figure out how to block marquees (this one scrolls right to left continuously and man it is annoying :ouch: ) and straight urls.
  5. vasa1
    Offline

    vasa1 Registered Member

    I'm on Privoxy v3.0.16

    I too edit my user.action file using a text editor. I've placed a short cut to this file on my desktop and open in Notepad by double-clicking.

    The thing is that there are two types of "wildcard" systems: one for the domain which uses globbing and regex for the rest of the url.

    This is a bit of my user.action file:

    { +block-as-image }
    www.example.com/nasty-ads/sponsor.gif
    .*answers.com
    .*cricket*
    .*disqus.com
    .a.fsdn.com
    .addthis.com
    .addthiscdn.com
    .adobe.com
    .adsense.
    .amazonaws.com
    .aol.com
    .ask.com
    .bestuff.com
    .blip.tv
    .brightcove.com
    .cdn.apture.com
    .digg.
    .facebook.
    www.google-analytics.com
    www.google.com/friendconnect
    www.speedtest.net


    The other thing is I looked in the config.txt file and its instructions to configure the log file.
    The log file (depending on how you set it up), shows you which requests have been allowed and which have been blocked from being downloaded. If you look at the file and see something that you don't want, you can cut the relevant part and stick in your user.action file.

    To set up the config file, look for the config.txt file in your Privoxy directory and add these lines in section 3.1 (debug):
    debug 1 # Log the destination for each request Privoxy let through.
    debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
    debug 4096 # Startup banner and warnings
    debug 8192 # Non-fatal errors

    I haven't yet got into using filters...
    Last edited: Jul 20, 2010
  6. tnylnxgy
    Offline

    tnylnxgy Registered Member

  7. vasa1
    Offline

    vasa1 Registered Member

    Nice!

    But I think the lack of Privoxy's popularity may have to do with the lack of a dummy's guide.

    It's not that the instructions are incomplete, they're a bit overwhelming at first (and second) glance.

    That's why I've got only as far as blocking which sorts out most of the visible annoyances. I'll leave filtering for another day.
  8. tobacco
    Offline

    tobacco Frequent Poster

    Hi Vasa & fellow members

    Good info there - THANK YOU. The desktop shortcut is a great idea.

    I've opened the config file but all those entries are already in there. But the default value is set at "0" - says only logs fatal errors. What value do i change it to to enable logging for those entries you listedo_O ?
  9. vasa1
    Offline

    vasa1 Registered Member

    Hi tobacco,

    I'm assuming you're on Windows. I'm using WinXP.

    This is my config.txt stripped of all the comments. You can make some changes based on this (after you keep a copy of your original!):


    user-manual ./doc/user-manual/
    confdir .
    logdir .
    actionsfile match-all.action # Actions that are applied to all sites and maybe overruled later on.
    actionsfile default.action # Main actions file
    actionsfile user.action # User customizations
    filterfile default.filter
    logfile privoxy.log
    debug 1 # Log the destination for each request Privoxy let through.
    debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
    debug 4096 # Startup banner and warnings
    debug 8192 # Non-fatal errors
    listen-address 127.0.0.1:8118
    toggle 1
    enable-remote-toggle 0
    enable-remote-http-toggle 0
    enable-edit-actions 0
    enforce-blocks 0
    buffer-limit 4096
    forwarded-connect-retries 0
    accept-intercepted-requests 0
    allow-cgi-request-crunching 0
    split-large-forms 0
    keep-alive-timeout 5
    socket-timeout 300
    handle-as-empty-doc-returns-ok 1
    log-messages 1
    log-buffer-size 1
    log-max-lines 200
  10. vasa1
    Offline

    vasa1 Registered Member

    I'm sure there are more guys at Wilders using Privoxy. Please don't feel shy to guide us :)

    The Privoxy "user forum" is quite user-unfriendly compared to other forums although Fabian K is most helpful in answering those who manage to post queries. One day I may figure out how to post over there :oops:
  11. tobacco
    Offline

    tobacco Frequent Poster

    Hi Vasa

    What i want is to enable logging which appears to be disabled :(

    I'm looking in the config file located in the privoxy program files folder and here is what it lists:

    # 2.6. logfile
    # =============
    #
    # Specifies:
    #
    # The log file to use
    #
    # Type of value:
    #
    # File name, relative to logdir
    #
    # Default value:
    #
    # Unset (commented out). When activated: logfile (Unix) or
    # privoxy.log (Windows).
    #
    # Effect if unset:
    #
    # No logfile is written.
    #
    # Notes:
    #
    # The logfile is where all logging and error messages are
    # written. The level of detail and number of messages are set with
    # the debug option (see below). The logfile can be useful for
    # tracking down a problem with Privoxy (e.g., it's not blocking
    # an ad you think it should block) and it can help you to monitor
    # what your browser is doing.
    #
    # Depending on the debug options below, the logfile may be a
    # privacy risk if third parties can get access to it. As most
    # users will never look at it, Privoxy 3.0.7 and later only log
    # fatal errors by default.
    #
    # For most troubleshooting purposes, you will have to change that,
    # please refer to the debugging section for details.
    #
    # Your logfile will grow indefinitely, and you will probably
    # want to periodically remove it. On Unix systems, you can do
    # this with a cron job (see "man cron"). For Red Hat based Linux
    # distributions, a logrotate script has been included.
    #
    # Any log files must be writable by whatever user Privoxy is
    # being run as (on Unix, default user id is "privoxy").
    #
    logfile privoxy.log

    # 3.1. debug
    # ===========
    #
    # Specifies:
    #
    # Key values that determine what information gets logged.
    #
    # Type of value:
    #
    # Integer values
    #
    # Default value:
    #
    # 0 (i.e.: only fatal errors (that cause Privoxy to exit) are logged)
    #
    # Effect if unset:
    #
    # Default value is used (see above).
    #
    # Notes:
    #
    # The available debug levels are:
    #
    # debug 1 # Log the destination for each request Privoxy let through. See also debug 1024.
    # debug 2 # show each connection status
    # debug 4 # show I/O status
    # debug 8 # show header parsing
    # debug 16 # log all data written to the network into the logfile
    # debug 32 # debug force feature
    # debug 64 # debug regular expression filters
    # debug 128 # debug redirects
    # debug 256 # debug GIF de-animation
    # debug 512 # Common Log Format
    # debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
    # debug 2048 # CGI user interface
    # debug 4096 # Startup banner and warnings.
    # debug 8192 # Non-fatal errors
    #
    #
    # To select multiple debug levels, you can either add them or
    # use multiple debug lines.
    #
    # A debug level of 1 is informative because it will show you each
    # request as it happens. 1, 1024, 4096 and 8192 are recommended
    # so that you will notice when things go wrong. The other levels
    # are probably only of interest if you are hunting down a specific
    # problem. They can produce a hell of an output (especially 16).
    #
    # Privoxy used to ship with the debug levels recommended above
    # enabled by default, but due to privacy concerns 3.0.7 and later
    # are configured to only log fatal errors.
    #
    # If you are used to the more verbose settings, simply enable
    # the debug lines below again.
    #
    # If you want to use pure CLF (Common Log Format), you should set
    # "debug 512" ONLY and not enable anything else.
    #
    # Privoxy has a hard-coded limit for the length of log messages. If
    # it's reached, messages are logged truncated and marked with
    # "... [too long, truncated]".
    #
    # Please don't file any support requests without trying to
    # reproduce the problem with increased debug level first. Once
    # you read the log messages, you may even be able to solve the
    # problem on your own.
    #
    #debug 1 # Log the destination for each request Privoxy let through.
    #debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
    #debug 4096 # Startup banner and warnings
    #debug 8192 # Non-fatal errors

  12. vasa1
    Offline

    vasa1 Registered Member

    You should "uncomment these lines in your config.txt. So delete the "#" and the following single space from the start of each of those lines.
  13. tobacco
    Offline

    tobacco Frequent Poster

    Vasa - you "Da Man" :thumb: Awesome!

    Hope you don't mind another question ;) Where would i add a forum internal url in the config file to blocko_O ? For example - since i think AV's are old school :D and they wear army boots :p , how would i block the link to the AV section here? - http://www.wilderssecurity.com/forumdisplay.php?f=32

    I've only been able to block urls ending in .gif, .jpg, etc under +block.
  14. vasa1
    Offline

    vasa1 Registered Member

    I'm not sure of this one: maybe it comes under "element hiding"?
  15. vasa1
    Offline

    vasa1 Registered Member

  16. iceni60
    Offline

    iceni60 ( ^o^)

    hi, i was playing around with my privoxy config files the other day and i completely broke it :( i had to reinstalled it :D

    so always make sure you make a backup first. this was one of the things i was doing, i think. i'd done it in the past but it stopped working for some reason. instead of linking to the guy's site i downloaded the trans.gif and pointed privoxy there, locally. :)
    http://nion.supersized.org/blog/archives/441-Privoxy-image-tuning.html

    [size=+2]remember to make backups of you config files!!!![/size] :cool: lol
Thread Status:
Not open for further replies.