I need to set an automatic configuration script that will set the proxy.
When I do this through the LAN settings, all is ok and Chrome is aware of the change immediately. I tried to replicate this behavior by changing the registry key Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
-> AutoConfigURL
but Chrome is aware of the change only several minutes after the change (not sure why).
My next attempt is to use Winapi, but I cannot find how to set this script. I found the read function WinHttpDetectAutoProxyConfigUrl
that works well, but I cannot find a write equivalent.
How do I setup the autoproxy script with Winapi?