When the ipv6 = true
setting is enabled, and the client is connected to a network that only supports IPv4, Surge fails to fallback to IPv4 when attempting to connect to a proxy server that has both AAAA (IPv6) and A (IPv4) DNS records. This results in connection failures, as Surge attempts to resolve and connect via IPv6 without successfully reverting to IPv4, despite the absence of IPv6 connectivity on the network.
Platform: macOS 15.1 Beta (24B5055e)
Surge app version: 5.8.1 (2929)
Steps to Reproduce:
Setting ipv6 = true in the configuration file.
Connect the device to a network that supports only IPv4 (ensure no IPv6 connectivity is available).
Set up a proxy server with both AAAA (IPv6) and A (IPv4) DNS records.
Attempt to establish a connection through Surge to the proxy server.
Expected Behavior:
Surge should first attempt to connect using the AAAA record (IPv6).
Surge should gracefully fallback to using the A record (IPv4) and successfully establish the connection through the proxy server.
Actual Behavior:
Surge attempts to resolve and connect using the AAAA (IPv6) record, even though IPv6 connectivity is not available.
Instead of falling back to the A (IPv4) record, Surge fails to connect, resulting in a connection error and no proxy connection is established.