How to configure Craft to use a Proxy?
I'm not sure I've got a good answer for you here.

Craft 2.x uses Guzzle 3.x for all of its outbound communications, so I'm not sure if it would be respecting stream_context_set_default at all.

If I recall, the last time someone brought this up, we looked into it and decided we needed to update to the latest Guzzle (5.x) to properly support it (they release quickly).

Unfortunately both Guzzle 4.x and 5.x introduced breaking changes to Craft.  So it'll have to be Craft 3.x before we add outbound proxy connection configuration options to Craft.

The only workarounds I can think of until then are to whitelist the IP address(es) of the Craft install to allow direct outbound access if that's possible.  If you can't do that, then maybe you can just get away with manual updates and let license checking silently fail.