]> code.delx.au - osx-proxyconf/blob - README.md
README.md
[osx-proxyconf] / README.md
1 # OSX ProxyConf
2
3 Set environment variables based on OSX proxy settings from system preferences.
4
5 ## Introduction
6
7 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.
8
9 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
10 ```
11 $ export http_proxy="http://www-cache.example.com"
12 ```
13
14 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.
15
16
17 ## Installation from binary
18
19 The latest binary is: [proxyconf-20090208.tar.gz](https://delx.net.au/projects/osx-proxyconf/proxyconf-20090208.tar.gz).
20
21
22 ## Configuration
23
24 Now add the following line to your `~/.bashrc` (modify as appropriate):
25 ```
26 eval $(~/Downloads/proxyconf/proxyconf)
27 ```
28
29 ## Compile from source
30
31 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.
32
33 Firstly, grab a copy of the code using Git:
34 ```
35 $ cd ~/Downloads/
36 $ git clone https://delx.net.au/git/proxyconf
37 ```
38
39 Next compile it:
40 ```
41 $ cd proxyconf
42 $ make
43 ```
44
45
46 ## Limitations
47
48 Note that proxyconf only works if you have System Preferences set to configure
49 proxies "Manually". For example, proxy.pac files are not supported.
50
51 The environment variables are only exported when the shell starts. This means
52 if you have a terminal open and change location the environment will be
53 incorrect. This is unavoidable. The workaround is to close and start the
54 terminal, or to run `exec bash -i`
55
56 ## Issues
57
58 Please file issues at the [Bitbucket project](https://bitbucket.org/delx/osx-proxyconf).