]> code.delx.au - osx-proxyconf/summary
 
descriptionSet environment variables based on OSX proxy settings from system preferences.
last changeSat, 7 Feb 2009 13:26:18 +0000 (00:26 +1100)
readme

OSX ProxyConf

Set environment variables based on OSX proxy settings from system preferences.

Introduction

Do you use Mac OSX's multiple network locations feature with different proxies? This is a great way to conveniently use applications in multiple locations without having to configure each app separately.

Now you've probably noticed that command line applications do not use the proxy settings from System Preferences. This includes things like wget, brew, etc These applications all actually pay attention to the Unix convention of putting proxies in environment variables, eg

$ export http_proxy="http://www-cache.example.com"

Proxyconf allows you to configure your proxies in System Preferences, and it takes care of grabbing these values and exporting them as environment variables. The upshot of this is, your command line apps will use the same proxy settings as your GUI apps.

Installation from binary

The latest binary is: proxyconf-20090208.tar.gz.

Configuration

Now add the following line to your ~/.bashrc (modify as appropriate):

eval $(~/Downloads/proxyconf/proxyconf)

Compile from source

Installation is easy. Note the following assumes you've already configured your proxies in System Preferences. Skip to the last step if you downloaded a binary version.

Firstly, grab a copy of the code using Git:

$ cd ~/Downloads/
$ git clone https://delx.net.au/git/proxyconf

Next compile it:

$ cd proxyconf
$ make

Limitations

Note that proxyconf only works if you have System Preferences set to configure
proxies "Manually". For example, proxy.pac files are not supported.

The environment variables are only exported when the shell starts. This means
if you have a terminal open and change location the environment will be
incorrect. This is unavoidable. The workaround is to close and start the
terminal, or to run exec bash -i

Issues

Please file issues at the Bitbucket project.

shortlog
2009-02-07 James Buntoncategory master
2009-02-07 James BuntonREADME.md
2009-02-07 James Buntongitignore
2009-02-07 James BuntonRewrote proxyconf completely in Objective C
2008-04-04 James BuntonBetter Makefile
2008-04-04 James BuntonConsistent style.
2008-03-31 James BuntonFixed typo
2008-03-31 James BuntonCompile universal binaries
2008-03-31 James BuntonREADME file
2008-03-31 James Buntonproxyconf.sh can now find sysconfig as long as they...
2008-03-30 James BuntonNow I see why PROXY_FOUND was needed :P
2008-03-30 James BuntonRemoved unneeded code
2008-03-30 James BuntonClean up of sysconfig.m
2008-03-30 James BuntonAllow C99 features
2008-02-08 Greg DarkeCheck if there are any proxies set before exporting...
2008-02-07 Greg DarkeMoved from a C implementation of the sysconfig program...
...
heads
15 years ago master