How to disable Java's SSL Reverse DNS Lookup

前端 未结 3 588
庸人自扰
庸人自扰 2020-12-17 00:46

I have a server in development and a few developers connecting to it. This server uses Java\'s TLS implementation with SSLEngine.

We saw that, at first,

3条回答
  •  悲&欢浪女
    2020-12-17 01:14

    This question came up in 2006 on the Sun JSSE forums. The bottom line is that it seems to occur only in the Windows java runtime. In this bug report, towards the bottom, is one proposed solution. And here is another proposed solution:

    Basically, a reverse DNS lookup during the SSL handshake causes a long timeout.

    To fix the problem, cache your server address as an InetAddress object and reuse it in the Socket constructor whenever you are making a new connection to your server.

    Hopefully one of these will work for you.

提交回复
热议问题