added support for java.net.Proxy

Added a second constructor to allow initializing with a java.net.Proxy (which I need for a project).
If constructor without proxy is used, a Proxy.NO_PROXY (for direct connection) is used.