Skip to content

Conversation

@Pawloland
Copy link
Contributor

@Pawloland Pawloland commented Oct 20, 2025

Adds a new universal patch that easily changes networkSecurityConfig.
https://developer.android.com/privacy-and-security/security-config

 
Example patching with CLI:

java -jar revanced-cli-5.0.1-all.jar patch \
    -p patches-5.43.1.rvp \
    -e="Custom network security" \
    -OtargetDomains=[example.com] \
    -OincludeSubdomains=true \
    -OcustomCAFilePaths=[custom.pem] \
    -OallowUserCerts=true \
    -OallowSystemCerts=true \
    -OallowCleartextTraffic=false \
    -OoverridePins=false \
    test.apk

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title Add CustomCertificatesPatch.kt feat: Add Custom network security patch Oct 20, 2025
@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue Oct 20, 2025 that may be closed by this pull request
3 tasks
@LisoUseInAIKyrios
Copy link
Contributor

How does this differ from the certificate pinning patch? This seems to also do the same, but this is domain specific?

@Pawloland
Copy link
Contributor Author

Well, its more configurable, and the biggest thing is that it allows bundling custom CAs with apk, not just disabling cert pinning, which is not helpful in my case, as I do not want to MITM access to aforementioned API, just let the app connect to it normally, the same way as on newer android OSes.

@Pawloland
Copy link
Contributor Author

Also it allows easier distribution of patched app, because with the other patch I would have to separately ship the CA .pem file and manually install it in Android's user store (which is still possible with my patch).

@Pawloland
Copy link
Contributor Author

And yes it can be domain specific, but if I specify just TLDs it could be made to work like a global config when includeSubdomains=true

Pawloland and others added 6 commits October 20, 2025 22:25
…rtificates/CustomCertificatesPatch.kt

Co-authored-by: LisoUseInAIKyrios <[email protected]>
…rtificates/CustomCertificatesPatch.kt

Co-authored-by: LisoUseInAIKyrios <[email protected]>
…rtificates/CustomCertificatesPatch.kt

Co-authored-by: LisoUseInAIKyrios <[email protected]>
…rtificates/CustomCertificatesPatch.kt

Co-authored-by: LisoUseInAIKyrios <[email protected]>
…rtificates/CustomCertificatesPatch.kt

Co-authored-by: LisoUseInAIKyrios <[email protected]>
@LisoUseInAIKyrios
Copy link
Contributor

@Pawloland Ready to merge?

@Pawloland
Copy link
Contributor Author

Yes!

@oSumAtrIX oSumAtrIX self-requested a review October 21, 2025 20:32
@Pawloland
Copy link
Contributor Author

I think other than the StringBuilder() for creating XML everything is fixed.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit e7336d2 into ReVanced:dev Oct 24, 2025
1 check passed
@welcome
Copy link

welcome bot commented Oct 24, 2025

Thank you for contributing to ReVanced. Join us on Discord to receive a role for your contribution.

github-actions bot pushed a commit that referenced this pull request Oct 24, 2025
# [5.44.0-dev.4](v5.44.0-dev.3...v5.44.0-dev.4) (2025-10-24)

### Features

* Add `Custom network security` patch ([#6151](#6151)) ([e7336d2](e7336d2))
* **Duolingo:** Add `Skip energy recharge ads` patch ([#6167](#6167)) ([591e106](591e106))
github-actions bot pushed a commit that referenced this pull request Oct 24, 2025
# [5.44.0](v5.43.1...v5.44.0) (2025-10-24)

### Bug Fixes

* **Google Photos - Spoof features:** Add support for Pixel 10 devices ([#6161](#6161)) ([754b719](754b719))
* **X / Twitter - Change link sharing domain:** Use bytecode patching to resolve patching with Manager ([#6125](#6125)) ([0af8c8a](0af8c8a))
* **YouTube - Hide layout components:** Hide new kind of community post ([#6146](#6146)) ([cfd244b](cfd244b))
* **YouTube Music:** Resolve patching 7.29 target ([2e4c6fd](2e4c6fd))

### Features

* Add `Custom network security` patch ([#6151](#6151)) ([e7336d2](e7336d2))
* **Duolingo - Enable debug menu:** Support latest app target ([#6163](#6163)) ([08baa19](08baa19))
* **Duolingo:** Add `Skip energy recharge ads` patch ([#6167](#6167)) ([591e106](591e106))
* **Samsung Radio:** Add `Disable device checks` patch ([#6145](#6145)) ([de97562](de97562))
@er13

This comment was marked as resolved.

@oSumAtrIX

This comment was marked as resolved.

@er13

This comment was marked as resolved.

@Pawloland

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Custom network security for selected domains

4 participants