added support for proxy

patch for issue #27

scratching my own itch. 

feel free to improve, works on my machine :)