The Microsoft Skype for Business Client first tries direct connection for the Session Initiation Protocol (SIP) traffic. After it gets time-out, the client will use a proxy proxy server, id exists. This could causes noticeable delays when you sign in the client, especially if the client tries to connect to Skype for Business Online.

Microsoft published some Updates and a UC Lobby Blog article about that. There is also a Support article about that.

In the UC Lobby Blog article contains a the following:

reg add HKCU\Software\Microsoft\UCCPlatform\Lync /v EnableDetectProxyForAllConnections /t REG_DWORD /d 1 /f

That snippet will do the job! But I still like to use PowerShell for all the things:

Please note, that this is a per User setting.

I also started a dedicated Directory in my new GitHub Repository. There you will find a signed version of the script above!

In the UC Lobby Blog article you will find the Clients that support that setting!

In short:
Skype for Business 2015 MSI (aka Lync 2013): 15.0.4885.1000, or later (KB3127976)
Skype for Business 2016 MSI: 16.0.4588.1001, or later (KB4011040)
Office 365 ProPlus/Office Professional Plus 2016 Click-to-Run: Version 1611 (Build 7571.2072), or later