I have two questions concerning the VpnService.Builder class.
Suppose I know an App communicate with its server www.somedomain.com
, I know the server's IP address is 210.32.204.165
.
About the addAddress(String address, int prefixLength) function. In documentation, it says this function "add a network address to the VPN interface", what does that mean? Does it mean the traffic goes to that address (server IP address of an App) will go through VPN or traffic from this address (device IP?) will go through VPN?
There is a function addAllowedApplication(String packageName) which specify which app's traffic go through the VPN tunnel. Is there a way or a function to force all traffic send to server www.somedomain.com
go through VPN tunnel?
It mean the traffic goes to that address (server IP address of an App) will go through VPN
link: if this method is never called then all applications are allowed by default. If some applications are added, other, un-added applications will use networking as if the VPN wasn't running. So you can to never call this method and all applications will use VPN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With