alexbakker / webdav-provider

An Android app that can expose WebDAV storage to other apps through Android's Storage Access Framework (SAF)
https://rocli.dev/webdav
GNU General Public License v3.0
121 stars 30 forks source link

New option: Act as Local Storage, and Fix Verify Certificates. #19

Closed RebelliousX closed 8 months ago

RebelliousX commented 2 years ago

Some Android apps only expect local storage only! Such as: (AetherSX2, DuckStation PPSSPP emulators! and many more). Some others don't care and accept any provider: Dolphin emulator and MSX.emu. To be able to use WebDAV Provider in such apps, then we have to fool them somehow! Making them believe they are dealing with local storage.

Thanks to @wa2c the author of CIFS Document Provider for this :)

The default behavior is when it is enabled! Before this change, WebDAV Provider was always verifying certificates. Disabling it was not doing anything. Now it can ignore certificate errors, such as ones from self-signed certificates or ones you create your own using openssl command.

This is very useful when trying to connect to servers you trust! such as your own servers like NAS Server at home!

Trusting all certificates with okHttp, code is from (I modified it slightly): https://stackoverflow.com/questions/25509296/trusting-all-certificates-with-okhttp

alexbakker commented 2 years ago

Thanks for working on this! Could you split these changes into separate pull requests? One for the local storage option, and one for the certificate verification implementation. That makes review a little easier.