Set proxy environment variables automatically

Jan 13, '04 07:43:00AM

Contributed by: Anonymous

I am a heavy Terminal.app user, and happen to use tools like wget a lot. However, when I am in a network environment requiring a proxy server, I have to set the usual environment variables http_proxy, ftp_proxy, etc by hand. Finally, after years of typing, I wrote a small utility called setproxy that would generate these statements for me. After downloading, install using

make && make install
and then use setproxy like this:
eval `setproxy`
when using a sh-like shell or
eval `setproxy -t`
when using a csh-like shell. You can put this line in you shell-profile file so it gets executed automatically on terminal startup.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031220061728519