-
Notifications
You must be signed in to change notification settings - Fork 29
Connection fails from IPv4 only network #76
Comments
Hmm, this is strange though... The Android docs say:
I'm not sure why it doesn't work. It also only seems to happen on older devices (fails on Android 5, but works on Android 9). Maybe that wasn't yet implemented in older versions. |
My assumption would be that IPv6 dual stack support was added sometime between Android 5 and 9. Since the default HTTP client won't be updated on older devices, we'll have to either:
The first approach is possible, but requires some work. I would very much object to the second one. Using a HTTP client like https://square.github.io/okhttp/ would resolve these issues. It's also much mroe future-proof and supports things like HTTP/2. Main downside is that it would be the first external dependency, it requires Android 5 (see #75) and it requires the Kotlin standard library. If you can live with the fact that the app won't be ~100 KiB anymore, that is the best approach in my view. And since OkHttp already requires the Kotlin stdlib, we could also think about using Kotlin ourselves. Release APK size would increase from ~70 KiB to ~1 MiB. Thoughts, @rorist? |
Never mind, this is most probably an issue with the TLS cipher configuration on the directory.spaceapi.io server. https://www.ssllabs.com/ssltest/analyze.html?d=directory.spaceapi.io&s=116.203.2.80 |
The new directory server (#71) has both A (IPv4) and AAAA (IPv6) DNS records. Therefore DNS resolution resolves to an IPv6 address when querying directory.spaceapi.io.
However, from a network that does not support IPv6, that connection will simply fail, no IPv4 fallback is being done.
The correct solution for this is RFC6555 (Happy Eyeballs). I'll try to find out if I get that to work on Android.
The text was updated successfully, but these errors were encountered: