bbf87addf2a33b994cb0831c496997a7eb312a58
[privoxy.git] / debian / patches / 24_global_action.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 24_global_action.dpatch by Roland Rosenfeld <roland@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Move the global default for all pages (/) from default.action
6 ## DP: to global.action to make updates with local configurations easier.
7
8 @DPATCH@
9 diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
10 --- privoxy~/GNUmakefile.in
11 +++ privoxy/GNUmakefile.in
12 @@ -166,7 +166,7 @@
13  #############################################################################
14  # We include these files in our distributions
15  #############################################################################
16 -CONFIGS = config trust default.action standard.action user.action default.filter user.filter
17 +CONFIGS = config trust global.action default.action standard.action user.action default.filter user.filter
18  # take care that no CVS .cvsignore or other crappy files
19  # are included here
20  # and escape every '#' in the find. doh.
21 diff -urNad privoxy~/config privoxy/config
22 --- privoxy~/config
23 +++ privoxy/config
24 @@ -335,6 +335,7 @@
25  #      without at least one actions file.
26  #
27  actionsfile standard  # Internal purpose, recommended
28 +actionsfile global    # Global default setting for all sites
29  actionsfile default   # Main actions file
30  actionsfile user      # User customizations
31  
32 diff -urNad privoxy~/default.action.master privoxy/default.action.master
33 --- privoxy~/default.action.master
34 +++ privoxy/default.action.master
35 @@ -537,74 +537,6 @@
36  allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}
37  
38  #############################################################################
39 -# Defaults
40 -#############################################################################
41 -{ \
42 --add-header \
43 --block \
44 --client-header-filter{hide-tor-exit-notation} \
45 --content-type-overwrite \
46 --crunch-client-header \
47 --crunch-if-none-match \
48 --crunch-outgoing-cookies \
49 --crunch-incoming-cookies \
50 --crunch-server-header \
51 --deanimate-gifs \
52 --downgrade-http-version \
53 --fast-redirects \
54 --filter{js-annoyances} \
55 --filter{js-events} \
56 --filter{html-annoyances} \
57 --filter{content-cookies} \
58 --filter{refresh-tags} \
59 --filter{unsolicited-popups} \
60 --filter{all-popups} \
61 --filter{img-reorder} \
62 --filter{banners-by-size} \
63 --filter{banners-by-link} \
64 --filter{webbugs} \
65 --filter{tiny-textforms} \
66 --filter{jumping-windows} \
67 --filter{frameset-borders} \
68 --filter{demoronizer} \
69 --filter{shockwave-flash} \
70 --filter{quicktime-kioskmode} \
71 --filter{fun} \
72 --filter{crude-parental} \
73 --filter{ie-exploits} \
74 --filter{site-specifics} \
75 --filter{google} \
76 --filter{yahoo} \
77 --filter{msn} \
78 --filter{blogspot} \
79 --filter{no-ping} \
80 --force-text-mode \
81 --handle-as-empty-document \
82 --handle-as-image \
83 --hide-accept-language \
84 --hide-content-disposition \
85 --hide-if-modified-since \
86 -+hide-forwarded-for-headers \
87 -+hide-from-header{block} \
88 --hide-referrer \
89 --hide-user-agent \
90 --inspect-jpegs \
91 --kill-popups \
92 --limit-connect \
93 --prevent-compression \
94 --overwrite-last-modified \
95 --redirect \
96 --send-vanilla-wafer \
97 --send-wafer \
98 --server-header-filter{xml-to-html} \
99 --server-header-filter{html-to-xml} \
100 --session-cookies-only \
101 -+set-image-blocker{pattern} \
102 --treat-forbidden-connects-like-blocks \
103 -}
104 -/ # Match all URLs
105 -
106 -#############################################################################
107  # These extensions belong to images:
108  #############################################################################
109  {+handle-as-image -filter}
110 diff -urNad privoxy~/global.action privoxy/global.action
111 --- privoxy~/global.action
112 +++ privoxy/global.action
113 @@ -0,0 +1,67 @@
114 +#############################################################################
115 +# Defaults
116 +#############################################################################
117 +{ \
118 +-add-header \
119 +-block \
120 +-client-header-filter{hide-tor-exit-notation} \
121 +-content-type-overwrite \
122 +-crunch-client-header \
123 +-crunch-if-none-match \
124 +-crunch-outgoing-cookies \
125 +-crunch-incoming-cookies \
126 +-crunch-server-header \
127 +-deanimate-gifs \
128 +-downgrade-http-version \
129 +-fast-redirects \
130 +-filter{js-annoyances} \
131 +-filter{js-events} \
132 +-filter{html-annoyances} \
133 +-filter{content-cookies} \
134 +-filter{refresh-tags} \
135 +-filter{unsolicited-popups} \
136 +-filter{all-popups} \
137 +-filter{img-reorder} \
138 +-filter{banners-by-size} \
139 +-filter{banners-by-link} \
140 +-filter{webbugs} \
141 +-filter{tiny-textforms} \
142 +-filter{jumping-windows} \
143 +-filter{frameset-borders} \
144 +-filter{demoronizer} \
145 +-filter{shockwave-flash} \
146 +-filter{quicktime-kioskmode} \
147 +-filter{fun} \
148 +-filter{crude-parental} \
149 +-filter{ie-exploits} \
150 +-filter{site-specifics} \
151 +-filter{google} \
152 +-filter{yahoo} \
153 +-filter{msn} \
154 +-filter{blogspot} \
155 +-filter{no-ping} \
156 +-force-text-mode \
157 +-handle-as-empty-document \
158 +-handle-as-image \
159 +-hide-accept-language \
160 +-hide-content-disposition \
161 +-hide-if-modified-since \
162 ++hide-forwarded-for-headers \
163 ++hide-from-header{block} \
164 +-hide-referrer \
165 +-hide-user-agent \
166 +-inspect-jpegs \
167 +-kill-popups \
168 +-limit-connect \
169 +-prevent-compression \
170 +-overwrite-last-modified \
171 +-redirect \
172 +-send-vanilla-wafer \
173 +-send-wafer \
174 +-server-header-filter{xml-to-html} \
175 +-server-header-filter{html-to-xml} \
176 +-session-cookies-only \
177 ++set-image-blocker{pattern} \
178 +-treat-forbidden-connects-like-blocks \
179 +}
180 +/ # Match all URLs