Using the native platform implementation, rather than the socket-based dart:io HttpClient implementation, has several advantages:
It automatically supports platform features such VPNs and HTTP proxies.
It supports many more configuration options such as only allowing access through WiFi and blocking cookies.
It supports more HTTP features such as HTTP/3 and custom redirect handling.
This enables us in the future to add support for blocking image loading outside of WiFi or metered connections, however I did not want to do more than needed in this PR.
This PR also changes the security settings for the app to allow user-added/user-installed CAs so that people can access their own self-hosted boorus that use self-signed certificates.
This PR basically makes it so that all requests go through
package:cronet_http
(on Android) orpackage:cupertino_http
(on MacOS/iOS) usingpackage:native_dio_adapter
.From the
package:native_dio_adapter
page:This enables us in the future to add support for blocking image loading outside of WiFi or metered connections, however I did not want to do more than needed in this PR.
This PR also changes the security settings for the app to allow user-added/user-installed CAs so that people can access their own self-hosted boorus that use self-signed certificates.
Fixes #463.