In Android P, cleartext communication is disabled by default. Instead, there are two options:
- One needs to explicitly declare that cleartext communication is allowed in the manifest file with
- Or needs to declare the allowed domains that allow cleartext communication via a network security config.
My question has to do with the second approach. I can whitelist a specific ip address like this in network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.1.1</domain>
</domain-config>
</network-security-config>
However, I would like to whitelist all private ip addresses. I had a few trial-and-error cases but I wasn't able to make it work.
In essence, is there an option given to define a range of ip addresses in the network security config?