Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Custom DNS server in personal VPN app
No, I am not able to detect what DNS servers are used. I am just able to get the system DNS servers with this code:- (NSString *) getDNSAddressesStr {
NSMutableString *addressStr = [[NSMutableString alloc]initWithString:@"DNS Addresses \n"];
res_state res = malloc(sizeof(struct __res_state));
int result = res_ninit(res);
if ( result == 0 )
{
for ( int i = 0; i < res->nscount; i++ )
{
NSString *s = [NSString stringWithUTF8String : inet_ntoa(res->nsaddr_list[i].sin_addr)];
[addressStr appendFormat:@"%@\n",s];
NSLog(@"%@",s);
}
}
else
[addressStr appendString:@" res_init result != 0"];
return addressStr;
}For information, this VPN application provides access to private URLs. These private URLs can only be resolved through the VPN and its DNS server.Currently, when I try to access these URLs, I get the error: "Safari cannot open the page because the server cannot be found."