Is there a way to print out Windows proxy setting via CLI accurately?
At the moment, I found 2 ways to do it, unfortunately when I compare with IE Lan Settings (GUI) it's not accurate.
netsh winhttp show proxy
or
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | findstr "ProxyServer AutoConfigURL"
Example 1
C:\>netsh winhttp show proxy
Current WinHTTP proxy settings:
Proxy Server(s) : x.x.x.x:8080
Bypass List : (none)
C:\>
Example 2
C:\>reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | findstr "ProxyServer AutoConfigURL"
ProxyServer REG_SZ http=127.0.0.1:8888;https=127.0.0.1:8888
AutoConfigURL REG_SZ http://myproxyserver/wpad.dat
C:\>
Actual Settings