Hi Jacek,
Your patch looks good (although I'd suggest splitting set_proxy to two function instead of doing it by gotos), but I've just sent a patch that makes mshtml use wininet for networking (via urlmon), so your patch is no longer needed. My patch is a major step forward in MSHTML/shdocvw implementation, but it's very risky, so I will not immediately remove set_proxy from the tree and wait for things to stabilize, but I don't think we want to extend it.
Oh! Excellent, I had no idea. I'll happily withdraw it. --Juan