Well, after some very minor refactoring and reformatting, here's what I will commit (in twelve hours or so, unless anyone raises any issue between now and then). It builds cleanly and I tested that it works by installing a couple of packages through Tor[*] and found no problems.
Thanks again to Vincent for the patch and Warren for C++ advice :) cheers, DaveK [*] - ..... OR DID I ?????!!!1!!! MUAHAHHAHAAA!!! -- Can't think of a witty .sigline today....
setup-proxy-option-patch.diff
Description: Binary data