Hey Dinesh,
Couple of things...
First, you really aren't providing us with enough information to be helpful.
Second, it seems that you lack a basic understanding of networking and protocols at this juncture, so explaining how you might fix a problem I can only guess at to someone without a lot of network knowledge might be difficult... so forgive me if you get lost in this response or if it simply doesn't apply to your situation.
If you are connecting to a database in the cloud... my first question would be why are you not also running you application in the cloud, preferably on the same subnet as the cloud database? In all honesty, this would be how I would handle this situation and avoid the proxy issues altogether, as well as the latency (and thus performance) issues associated with the configuration you describe
Assuming you have some pressing reason to run your code behind a proxy and your database in the cloud, and assuming you're connecting to a standard TCP port to talk to your database on the cloud, and assuming you're using socket() based methods to access it, and assuming your corporate proxy is a SOCKS proxy, then...
Might do the trick. I haven't used it so can't vouch for it, and it doesn't provide any TCP specific examples (just HTTP/HTTPS) but a quick read of the docs suggests it will work for any TCP port, so... it might be worth a shot. I'd do a small test program with it first to make sure it works with your proxy and your database calls before I invested any time in rewriting how your actual application works.
Again, not knowing your application configuration, your corporate network's configuration, your cloud database configuration, etc. I'm just taking stabs in the dark here.
The simplest answer, however, is to run the application in the cloud with the database.
-- Denny