Page 1 of 1

PostGre server via proxy server

Posted: 05.10.2009, 15:53
by pedrojpz
Hi,
we need to connect to our database via proxy server. We have a machine in a remote location with an application installed and this application needs to access our data base located in a public server, but this machine is in a private network and has not direct access to Internet but there is a proxy server for access Internet... So, How would we do to connect to our application that is using ZEOS library to connect via proxy to Internet and then access our public postgre database server?

Thanks in advance.

Posted: 09.10.2009, 20:35
by mdaems
As far as I can see from the postgres documentation of the pqlib API there's no support for connections using a proxy, so zeoslib can't provide that.

If you have the right tools at both sides you might be able to create some tunnel through the proxy, however. This making the server port directly adressable from yor client using the tunnel. Somebody know how to do that?

Mark

Posted: 12.10.2009, 18:22
by WorldWalker
What about the Indy HTTP component, just try to make your own TCP/IP connection via indy components and send your queries to the server and vice versa.

Posted: 13.10.2009, 14:52
by pedrojpz
I've found a utility called "proxytunnel" that I think it will do the job, but now the problem is that the proxy they are using (Squid 3.0) does not allow CONNECT command to ports differents from 443 and 563, so I will ask they to allow port 5432 to be "connected" in the proxy or we will have to redirect port 443 to port 5432 in our public server ¿?

I will post the solution here. Thanks. :)