Post Reply 
Path Blocking with Metacharacters
Nov. 02, 2015, 10:29 AM (This post was last modified: Dec. 08, 2017 10:18 PM by Faxopita.)
Post: #19
RE: Path Blocking Using Wildcard Characters
Built by ShelbyGT500 from Copfilter forum and based on the work of Neil Van Dyke (Many Thanks)

Exhaustive rule set available from shelby.eurowireless.de/Privoxy_mod/

Get the latest archive and look for file copfilter.action in folder…
Code:
3rd_rules_privoxy/files/

In this file, you will also see…
Code:
# OTHER CONFIGURATION:
#
#     Consider adding something like the following to your "user.action" file:
#
#         { -add-header                                 \
#           +hide-forwarded-for-headers                 \
#           +hide-from-header{block}                    \
#           +hide-referrer{forge}                       \
#           -send-vanilla-wafer                         \
#           -send-wafer                                 \
#           +set-image-blocker{blank}                   }
#         /

In Privoxy 3.0.23, actions -send-vanilla-wafer and -send-wafer are no longer available. Action +hide-forwarded-for-headers must be replaced with +change-x-forwarded-for{block}. Thus, the above configuration should be rewritten as
Code:
{ -add-header                                 \
  +change-x-forwarded-for{block}              \
  +hide-from-header{block}                    \
  +hide-referrer{forge}                       \
  +set-image-blocker{blank}                   \
}
/

The other change I humbly suggest to apply is replacing all slashes (/) beginning path lines with the set /(.*/)? in order to give a chance for the pattern to be matched further down the path. This is how Privoxy syntax works. For example:
Code:
/comscore.js
becomes…
Code:
/(.*/)?comscore.js

The original path will block good.domain.com/comscore.js, but not good.domain.com/sites/all/themes/js/comscore.js; the modified path version will block both.

This is, I believe, the least change that can be done. There are a number of other things that could be changed, but those I'll leave them to you…

-–—

Minuscule donations are always appreciated…
Code:
BTC --> 34WKogWorDoReJ2MSxw8rTsrGD87VMAPJY
BCH --> 1AXwyMdtMFZktZPvXScC58ESUZXptmjvge
DASH -> XusJsETR6PwDnG4Gde7cvGeRhXzUJFSxtD
ETH --> 0xb829FA99AA9AB31C32590dbc88B837bC5D91453e
ETC --> 0x059F128357331c346Ad2E23F95a4639beC3f0b3a
LTC --> MK7vxk93A1M6HHAYT38W8NPJSb8zANqCia
ZEC --> t1JNCuxdZEWUPBQiAzxZPUMqb4BM87sxs9H
DOGE -> DBPAUuCaez4JYGobAn4RHNNhFXwa9u1W6N
STRAT > SgG6jAHuxQfzW1QBaWyQRVdCdSq514BcyM
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Path Blocking with Metacharacters - Faxopita - Aug. 10, 2015, 10:19 PM
RE: Path Blocking Using Wildcard Characters - Faxopita - Nov. 02, 2015 10:29 AM

Forum Jump: