Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there :)
First, Thanks for maintaining this project and keeping it alive.
...1) Issue I'm trying to solve with this pull requests
RiMusic's piped integration doesn't allow self-signed CA for self-hosted instances.
...2) Proposed solution
Following the guidelines on developer.android.com:
res/xml/network_security_config.xml
with the following configuration:android:networkSecurityConfig="@xml/network_security_config"
to the application element in the AndroidManifest.xml...3) Results
After rebuilding a signed APK app with the fossRelease build variant, I could successfully connect to my custom Piped instance with self-signed CA and custom local domain.
I know this is probably very niche and doesn't add much to the core application itself, however, this is a nice feature for the self-hosting community enthusiasts ! Domains are cheap nowadays and SSL certificates are easy to maintain with let's encrypt, I get that, but that leaves out the fun, learning process and gives you back control over your own infrastructure. I never expose any self-signed CA to the world and only access all my services via VPN, have my own personal mini-CA with intermediate CA/certificates, OCSP and CRL services.
Beside the warning given by Android Studio concerning user certificates (eavesdropping) this only concerns the communication from my own devices. Also, a lot of critical applications (Bitwarden) have this similar/same configuration and allow self-signed CA/certificates (Findroid, DAVx5, HTTP Shortcuts, jtx Board, LibreTube...)
Side notes: I hope this pull request doesn't comes out wrong, I'm not a dev or anyhow related to this complicated/frustrating world. I'm just a passionate tinkerer and playing around with a lot of IT stuff. And OH MY is android studio frustrating... Took me 3hours to make sense of cryptic errors thrown into my face, when the actual error was just a space in my directory path...
If for some reason this isn't a valid pull request just let me know so I can learn from my mistakes !
Thank you.