Вы находитесь на странице: 1из 15

2/12/2016

Privoxy on Mac OS X Howto

Privoxy on Mac OS X Howto


by Andrew Watters[1]
This is a tutorial for absolute beginners.
2015-10-17 -- Update: if you upgrade to Mac OS X 10.11 (El Capitan), you have to
recompile and reinstall Privoxy. Follow steps two through the end below.

Step Zero: install Xcode and autoconf


Before doing anything else, make sure you have Xcode[2] installed. Xcode is necessary to
compile applications from source. It's currently available from the App Store for free. You
need to reboot your computer after installing, FYI.
The latest version of Xcode does not include the command line tools that are required for
this method to work. Before proceeding to the main steps, install autoconf (which
includes autoheader and autoconf):
Open Terminal.
c
ur
lO
Lht
t
p
:/
/
ftpmir
ror.gnu.org/autocon
f/a
u
toc
on
f-2
.6
8.t
ar
.g
z
t
ar-x
z
fau
t
o
co
n
f-2.68
.tar.gz
c
daut
o
co
nf
2
.6
8
.
/c
onf
i
gu
re
m
ak
e
s
ud
om
a
kei
n
s
ta
l
l

Step One: create privoxy user and group

http://www.andrewwatters.com/privoxy/

1/15

2/12/2016

Privoxy on Mac OS X Howto

Step One: create privoxy user and group


Open system preferences and select Users & Groups. Click the lock to make changes. Add
a new user named "privoxy" with any password you like. I suggest "privoxy." You can make
the user a "sharing only" user if you don't want it to appear in the login window-- your
preference.

Add a new group named "privoxy" and add the newly created privoxy user to it.

http://www.andrewwatters.com/privoxy/

2/15

2/12/2016

Privoxy on Mac OS X Howto

Step Two: download privoxy


The latest source code can be found here[3].
Decompress the downloaded file.

Step Three: compile and install privoxy


Open Terminal.
c
d~/D
o
wn
lo
a
d
s/
p
rivoxy
*
a
ut
ohe
a
de
r
a
ut
oco
n
f
http://www.andrewwatters.com/privoxy/

3/15

2/12/2016

Privoxy on Mac OS X Howto

.
/c
onf
i
gu
re
m
ak
e
s
ud
om
a
kei
n
s
ta
l
l

Step Four: edit privoxy's config file


For instructions on using vim, my preferred editor, go here[4].
s
ud
ov
i/
us
r
/
lo
c
al/etc
/privoxy/config

Search for "enable-remote-toggle" until you see the appropriate line in the editor (the
line without a "#" at the beginning). You will need to repeat the search several times.
http://www.andrewwatters.com/privoxy/

4/15

2/12/2016

Privoxy on Mac OS X Howto

/
en
abl
e
-r
em
o
t
et
oggle

Keep hitting "/" and Enter until you get to the right line. Move the cursor over to the "0"
and hit "x" to delete it. Hit "i" to insert and then "1" which will change the value of 0 to 1.
This will let you turn privoxy on and off from its web interface.

Hit Escape and search for "enable-edit-actions" until you find the appropriate line in the
file.
/
en
abl
e
-e
di
t
ac
t
ions

Change the value of 0 to 1, which will let you configure privoxy from its web interface.

http://www.andrewwatters.com/privoxy/

5/15

2/12/2016

Privoxy on Mac OS X Howto

Write the file and quit.


:
wq

Step Five: set up a launch daemon


c
d/Li
b
ra
ry
/
L
au
n
chDaem
ons
s
ud
ov
io
rg
.
p
ri
v
oxy.pl
ist

Hit "i" and paste the code in this file[5] into your new file.

http://www.andrewwatters.com/privoxy/

6/15

2/12/2016

Privoxy on Mac OS X Howto

:
wq

Change the owner of org.privoxy.plist to root:wheel.


s
ud
oc
h
ow
nr
o
ot
:
wheelorg.privoxy.plist

Step Six: launch privoxy as user privoxy


s
ud
o/
u
sr
/l
o
c
al
/
sbin/p
rivoxy--userprivo
xy/
usr
/l
oca
l/
etc
/p
ri
vox
y/
co
nfi
g

Confirm that privoxy is running.


p
s-ax|gr
e
pp
r
ivoxy

http://www.andrewwatters.com/privoxy/

7/15

2/12/2016

Privoxy on Mac OS X Howto

If you see the above, privoxy is running.

Step Seven: configure network settings to use privoxy


In System Preferences, open Network. Click the "Advanced" button in the lower right.
Click the "Proxies" tab. Click the check boxes next to "Web Proxy (HTTP)" and "Secure
Web Proxy (HTTPS)." Select Web Proxy and type in 127.0.0.1 with port 8118. Do the same
for Secure Web Proxy. Click "OK" and then "Apply."

http://www.andrewwatters.com/privoxy/

8/15

2/12/2016

Privoxy on Mac OS X Howto

Step Eight: test and configure privoxy


Open your favorite ad-filled website in Safari and confirm that you see checkered boxes
where ads would normally appear.

http://www.andrewwatters.com/privoxy/

9/15

2/12/2016

Privoxy on Mac OS X Howto

Open "http://p.p" in your browser.

http://www.andrewwatters.com/privoxy/

10/15

2/12/2016

Privoxy on Mac OS X Howto

Click "View & change the current configuration."

http://www.andrewwatters.com/privoxy/

11/15

2/12/2016

Privoxy on Mac OS X Howto

Edit as appropriate. Visit the privoxy website[6] for detailed instructions on editing. By
default no editing is required but you may want to add exceptions/trusted sites if they
don't work with privoxy enabled.

Step Nine: confirm that the LaunchDaemon works


Go back to Terminal or restart your computer from the Apple menu.
s
ud
os
h
ut
do
w
nrnow

Log in normally. Open Terminal.


p
s-ax|gr
e
pp
r
ivoxy
http://www.andrewwatters.com/privoxy/

12/15

2/12/2016

Privoxy on Mac OS X Howto

Success!

Troubleshooting
If you followed the steps above exactly right, you should have no problems. If you do have
problems, email me[7] a detailed description of the problem and any screenshots that
might help, and I'll do what I can to help you out. I'm no expert on privoxy, so hopefully
the problem is not too serious!
The number one issue is probably going to be that you previously tried to install Privoxy
using MacPorts or some other guide. In that case, you would already have a privoxy user
created from the command line that is not visible in System Preferences. You can delete
that user and group with the following commands:
su
dods
c
l.d
e
le
t
e/gro
ups/privoxy
http://www.andrewwatters.com/privoxy/

13/15

2/12/2016

Privoxy on Mac OS X Howto

su
dods
c
l.d
e
le
t
e/use
rs/privoxy

Once you've deleted the privoxy user (or _privoxy, depending on which online guide you
followed), you can recreate the user and group from System Preferences and everything
should work properly.
2011-12-02 07:53 PST
Home[8]
top

Links
1. http://www.andrewwatters.com/
2. http://developer.apple.com/xcode/
3. http://sourceforge.net/projects/ijbswa/files/Sources/
4. http://vimdoc.sourceforge.net/htmldoc/usr_toc.html
5. http://www.andrewwatters.com/privoxy/plist.txt
6. http://www.privoxy.org/
7. mailto:andrew@andrewwatters.com
8. http://www.andrewwatters.com/

Get a free Evernote account to save this article and


view it later on any device.
Create account

http://www.andrewwatters.com/privoxy/

14/15

2/12/2016

http://www.andrewwatters.com/privoxy/

Privoxy on Mac OS X Howto

15/15

Вам также может понравиться