]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/todo/outbound_proxy.mdwn
Document my now much simpler patch.
[git.ikiwiki.info.git] / doc / todo / outbound_proxy.mdwn
1 [[!template id=gitbranch branch=schmonz/proxy author="[[schmonz]]"]]
2 [[!tag patch]]
4 ## Background
6 Ikiwiki has several plugins that open outbound connections:
8 * [[plugins/aggregate]]
9 * [[plugins/openid]]
10 * [[plugins/pinger]]
12 In some networks it is desired (or necessary) for these connections
13 to traverse a proxy. Proxies are usually configured via environment
14 variables, so for ikiwiki it is probably not desirable (or necessary)
15 to manage proxy configuration in the setup file.
17 [[!cpan LWP::UserAgent]] by default doesn't care about the usual
18 environment variables, but if its constructor is passed a true
19 `env_proxy` value, it does. Then environment settings such as these
20 influence the agent, as expected:
22     ENV:
23       http_proxy: 'http://foo.internal:8080'
24       no_proxy: 'localhost,.bar.internal'
26 If the proxy and/or destination requires authentication, it may
27 also be necessary to prime `cookiejar`.
29 ## Changes
31 This patch causes ikiwiki's `LWP::UserAgent` instances to:
33 * honor proxy configuration in the environment
34 * consistently make use of cookies configured in the setup file
36 ## Limitations
38 The patch lets me configure [[plugins/aggregate]] to traverse my
39 corporate proxy and to skip the proxy for internal hosts. I haven't
40 tested it with the other two plugins, both of which prefer [[!cpan
41 LWPx::ParanoidAgent]] if present, which deliberately lacks proxy
42 support. There exists [[!cpan LWP::UserAgent::Paranoid]] claiming
43 to be more modern, but I haven't looked at it further, so I don't
44 know whether its paranoia measures up or whether it supports proxies.
46 ## See also
48 * [[bugs/http_proxy_for_openid]]
49 * [[forum/Setting_http__95__proxy]]