Originally created by: MAYOT52
macOS
Sequoia 15.3.1
2.0.5
When using Hiddify VPN on macOS, Hibernate fails to connect to a PostgreSQL database running on localhost. This happens regardless of whether PostgreSQL is:
• Running natively on macOS
• Running inside a Docker container
• Running inside a local VM
Spring application will only work with remote database on another machine
1. Start Hiddify VPN on macOS.
2. Run a local PostgreSQL database (e.g., with Docker: docker run -p 5432:5432 postgres).
3. Configure a Spring Boot application with Hibernate and the following datasource URL: `spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/demo`
4. Start the Spring Boot application.
5. Observe the connection failure with java.net.UnknownHostException: localhost.
6. Disconnect VPN (sometimes turn off the application), and notice that the issue is resolved.
Hibernate should be able to connect to a local PostgreSQL database (localhost or 127.0.0.1) even when Hiddify VPN is active. The VPN should not interfere with local network connections between applications running on the same machine.
No response
{
"region": "ru",
"block-ads": false,
"execute-config-as-is": false,
"log-level": "warn",
"resolve-destination": false,
"ipv6-mode": "ipv4_only",
"remote-dns-address": "udp://1.1.1.1",
"remote-dns-domain-strategy": "",
"direct-dns-address": "1.1.1.1",
"direct-dns-domain-strategy": "",
"mixed-port": 12334,
"tproxy-port": 12335,
"local-dns-port": 16450,
"tun-implementation": "mixed",
"mtu": 9000,
"strict-route": true,
"connection-test-url": "http://connectivitycheck.gstatic.com/generate_204",
"url-test-interval": 600,
"enable-clash-api": true,
"clash-api-port": 16756,
"enable-tun": false,
"enable-tun-service": false,
"set-system-proxy": true,
"bypass-lan": false,
"allow-connection-from-lan": false,
"enable-fake-dns": false,
"enable-dns-routing": true,
"independent-dns-cache": true,
"rules": [],
"mux": {
"enable": false,
"padding": false,
"max-streams": 8,
"protocol": "h2mux"
},
"tls-tricks": {
"enable-fragment": false,
"fragment-size": "10-30",
"fragment-sleep": "2-8",
"mixed-sni-case": false,
"enable-padding": false,
"padding-size": "1-1500"
},
"warp": {
"enable": false,
"mode": "proxy_over_warp",
"clean-ip": "auto",
"clean-port": 0,
"noise": "1-3",
"noise-size": "10-30",
"noise-delay": "10-30",
"noise-mode": "m6"
},
"warp2": {
"enable": false,
"mode": "proxy_over_warp",
"clean-ip": "auto",
"clean-port": 0,
"noise": "1-3",
"noise-size": "10-30",
"noise-delay": "10-30",
"noise-mode": "m6"
}
}
No response
Originally posted by: MAYOT52
It seems that Hiddify might be redirecting localhost traffic through the VPN, causing Hibernate to fail when connecting to a local PostgreSQL database