***What I want***:
Specify server IP for NSMutableURLRequest to avoid localDNS query.
***Common method***:
Replace host field in URL and specify the HOST Header field for the HTTP request.
request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://1.1.1.1/path"]];
[request setValue:@"www.a.com" forHTTPHeaderField:@"host"];
***Problem***:
If my server serves several domains, then the server will return a default certificate for my request. SNI only works when it finds host in url.
So any suggestion if I wanna achieve ***What I want*** in ***Problem*** scene.