A Web Proxy Hack for CVS

If you’re like me, you are behind a crazy-restrictive firewall, that only allows outbound traffic through a web proxy. Occasionally, I have need of non-release software, like the latest CVS source from the ant-contrib project. The stupid thing is, the latest CVS packages don’t include proxy support. After hours of searching, I finally found an old patch by Andy Piper and Jim Kingdon that added HTTP proxy capabilities, but it wouldn’t work against the latest sources. So I spent a few hours hacking it into the latest release (1.12.1). Here’s the new patch. In order to build with it, just define your CFLAGS environment variable to include -DHTTP_PROXY_SUPPORT.

To use, you set your CVSROOT (either the environment variable or the argument to the -d flag) to

<server type>#proxy=<proxyhost>[#proxyport=<port>]

proxyport is optional.

The whole patch is a little fragile at this point. If I ever have the time and/or inclination, I want to implement proxy support as a flag, not inlined in the server string. As far as I can tell, it should work with any remote server method, but your mileage may vary – I’ve only tested it with pserver.


Posted

in

,

by