The InsecureTrustManager in OkHttp attempts to do an ip hostname lookup before attempting the SSL handshake, despite the fact that this handshake will not be validated. This is in order to restrict the insecure connection configuration to only that hostname. This causes a significant delay when trying to resolve a local IP in the first request.
The HTTP Client used in Shade's API calls is already restricted to the specific IP that is configured, so this hostname validation is unecessary.
This fix resolves the performance issue by overriding the trustmanager on insecure configurations to be fully ignored.
This should resolve some of the performance issues seen in #122
The InsecureTrustManager in OkHttp attempts to do an ip hostname lookup before attempting the SSL handshake, despite the fact that this handshake will not be validated. This is in order to restrict the insecure connection configuration to only that hostname. This causes a significant delay when trying to resolve a local IP in the first request.
The HTTP Client used in Shade's API calls is already restricted to the specific IP that is configured, so this hostname validation is unecessary.
This fix resolves the performance issue by overriding the trustmanager on insecure configurations to be fully ignored.
This should resolve some of the performance issues seen in #122