http.proxyHost can route a participating HTTP client while doing nothing to PostgreSQL JDBC. PostgreSQL sends its database protocol, not an HTTP request.

The JDBC connection URL must still name the database server and database. Replacing its server with an HTTP proxy address cannot teach the driver CONNECT.

For a SOCKS service, investigate the socket implementation below JDBC. Java exposes these startup properties for participating sockets:

-DsocksProxyHost=203.0.113.10 -DsocksProxyPort=1080

Replace the documentation endpoint. These are JVM arguments, not JDBC URL parameters. Verify the actual JDK/driver socket path and any custom socket factory before expecting it to use them.

The properties are process-wide, so include other connections in the impact assessment. A documented dedicated connector or approved tunnel can provide a clearer boundary when only database traffic should take the route.

The proxy still needs permission and reachability to the database port. The database then applies host access rules, destination TLS and its own login. Preserve its certificate hostname and keep the database account separate from the proxy account.

Record the first failed stage: proxy connection, negotiation, database TCP, TLS or database login. That evidence identifies the next change; repeatedly adjusting unused HTTP properties cannot do so.

Mikanda mikatakata