-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HTTP/2, QUIC, VPN and Self-Signed CA support #464
base: dev
Are you sure you want to change the base?
Add HTTP/2, QUIC, VPN and Self-Signed CA support #464
Conversation
0a86d8a
to
38dc6ac
Compare
if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) { | ||
dio.httpClientAdapter = newNativeAdapter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be any issues to just using the native methods since it's technically what the browsers use, so we'd just be doing requests in the same way a browser does, however it'd be nice to have some more testing on this front.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested gelbooru, gelbooru_v2, shimmie2, anime-pictures and danbooru.
They're all working on Android. It'd be nice to be able to get some tests on iOS/MacOS.
final booru = booruFactory.getBooruFromUrl(baseUrl) ?? | ||
booruFactory.getBooruFromId(booruConfig.booruId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed because otherwise no booru is selected when coming from the "add new booru" page and an unknown URL is used, even though the user has told which booru it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works fine on my end. Are you sure this is an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is an issue when using boorus that don't have known URLs, in my case I have https://booru.shiro.lan/
, that I tried to add as Danbooru, and when it tries to test it, booru
is null
because it tries to get the booru type from the URL, not from what was selected in the dropdown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge the latest changes from dev and see if the issue is still there.
enableBrotli: true, | ||
enableHttp2: true, | ||
enableQuic: true, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add our custom User-Agent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like error states are not handled correctly here, you can try adding https://www.zerochan.net/
WITHOUT a custom user-agent and see it yourself.
An error placeholder should be displayed whenever there are issues loading the image
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.