On Mon, Aug 9, 2010 at 6:34 AM, - <grandebuzon@gmail.com> wrote:
> Thanks for answering.
> I planned to use free public proxy, which supports HTTPS
>
> //free public proxy finded in google.com
> System.setProperty("http.proxyHost", "189.19.44.164");
> System.setProperty("http.proxyPort", "3128");
>
> String url = "jdbc:postgresql://ipPublica:5432/DataBaseName";
> Properties props = new Properties();
> props.setProperty("user","User");
> props.setProperty("password","Pass");
>
> Class.forName("org.postgresql.Driver");
>
> Connection connection = DriverManager.getConnection(url,
> props);
>
> With this code I got to connect to postgres en server machine, but it fails
> in client machine whith firewall :(
> With that error
>
> org.postgresql.util.PSQLException: Connection refused. Verify that the
> hostname and port are correct and that the postmaster is accepting TCP / IP.
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl
> (ConnectionFactoryImpl.java: 136)
> at org.postgresql.core.ConnectionFactory.openConnection
> (ConnectionFactory.java: 66)
> at org.postgresql.jdbc2.AbstractJdbc2Connection. <init>
> (AbstractJdbc2Connection.java: 125)
> at org.postgresql.jdbc3.AbstractJdbc3Connection. <init>
> (AbstractJdbc3Connection.java: 30)
> at org.postgresql.jdbc3g.AbstractJdbc3gConnection. <init>
> (AbstractJdbc3gConnection.java: 22)
> at org.postgresql.jdbc4.AbstractJdbc4Connection. <init>
> (AbstractJdbc4Connection.java: 30)
> at org.postgresql.jdbc4.Jdbc4Connection. <init> (Jdbc4Connection.java: 24)
> at org.postgresql.Driver.makeConnection (Driver.java: 393)
> at org.postgresql.Driver.connect (Driver.java: 267)
>
>
>
>
These proxies are setup to proxy port 80 and port 443, They have no
knowledge of port 5432.
Dave