<html><body><div><div>Hi Daniel,<br></div><div><br></div><div><div>Thanks for your answer!<br></div><div><br></div><div>I know it is not supported hence I have built some years ago a library around HttpClient to do that.<br></div><div><a href="https://github.com/nhenneaux/resilient-httpclient" rel="noopener noreferrer">https://github.com/nhenneaux/resilient-httpclient</a><br></div><div><br></div><div>I made a pull request with the fix I would need to be applied <a href="https://github.com/openjdk/jdk/pull/22211/files" rel="noopener noreferrer">https://github.com/openjdk/jdk/pull/22211/files</a>.<br></div><div><br></div><div>I think it is a regression introduced in Java22 since configured SslParameters#ServerNames is now discarded in favour of the HTTP hostname which is not valid if the hostname is an IP.<br></div><div><br></div><div>Best regards,<br></div><div><br></div><div>Nicolas<br></div><div><br></div></div><blockquote type="cite"><div>On Nov 18, 2024, at 5:40 PM, Daniel Fuchs <daniel.fuchs@oracle.com> wrote:<br></div><div><br></div><div><br></div><div><div><div>Hi Nicolas,<br></div><div><br></div><div>If I understand correctly, you would like to be able to select which<br></div><div>IP address is used when connecting to a host that has several<br></div><div>IP addresses.<br></div><div><br></div><div>This functionality is currently not supported by the HttpClient.<br></div><div><br></div><div>best regards,<br></div><div><br></div><div>-- daniel<br></div><div><br></div><div>On 18/11/2024 15:56, Nicolas Henneaux wrote:<br></div><blockquote type="cite"><div>In the library, I force the IP in the HTTP request to enforce the target <br></div><div>IP keeping the HTTP host header and SNI aligned with the actual value. <br></div><div>The detected SNI is then empty, is it possible to support both detected <br></div><div>and specified SNI?<br></div></blockquote></div></div></blockquote><div><br></div></div><div><br></div></body></html>