VPN node dns

SDK provides ability to change dns server that is used on VPN node to resolve dns requests.

To enable this feature pass NodeDns to withNodeDns method of SessionConfig.Builder

Project configured values can be fetched with Backend API

sdk.getBackend().locations(ConnectionType.HYDRA_TCP, new Callback<AvailableLocations>() {
@Override    
        public void success(@NonNull AvailableLocations availableLocations) {
           //availableLocations.getDnsServers()[0]
           //builder.withNodeDns(NodeDns.custom(dns.getName())
        }    
        @Override    
        public void failure(@NonNull VpnException e) { 
        }
 }); 

Or User defined dns url can be used instead

builder.withNodeDns(NodeDns.user("https://user.url/dns")

Last updated