What you are asking for is quite difficult to achieve without reasonably extreme measures like a VPN (a real VPN with a client virtual Network Adapter, not a application layer ssh or ssl tunnel), an upstream funnel device like SafePlug, or a TOR transparent proxy. Even then, the certificate issue may not be addressable, unless you use an application layer proxy with SSL support. a generic socks proxy will likely indicate that you are not connected to the server that the certificate belongs to, because you aren't really.
There is no good way to set a global proxy on most OSs, largely because not all network protocols CAN be proxied via standard approaches like SOCKS, and because it makes the system more vulnerable to attacks that might expose your traffic to Man-In-The-Middle exploits (eg a piece of malware sets up a global proxy to send all your traffic through a proxy the attacker has control over). So, if an application is to use a proxy, it must itself provide the configuration code, and most apps (other than browsers) do not.
Please note, my comments are far from an exhaustive coverage of this immensly complex topic, and there are many options to fill parts of what you are asking for, and you may be able to find the right combination of individual hacks to address enough of the problem to your satisfaction, but since your question is the generic "any client application", there just isn't any good answer that doesn't involve systems engineering solutions like upstream servers/routers/funnels, or a true VPN.