I-configure ang proxy at mga exclusion sa Windows
Ipinapaliwanag ng gabay na ito kung paano i-configure ang mga setting ng proxy at mga bypass exclusion sa Windows, na may pagtutok sa mga depinisyon ng proxy na nakabatay sa IP at compatibility ng WebSocket app.
Mga karaniwang app na umaasa sa WebSockets:
- Slack
- Figma
- Lucidchart
Maaaring mabigo ang mga ito kapag dinaan sa mga proxy tulad ng Squid, na hindi sumusuporta sa mga koneksiyong wss://.
Ano ang ginagawa ng script na ito
- Nagtatakda ng system-wide proxy IP address sa pamamagitan ng PowerShell
- Inilalapat ang mga exclusion para sa user apps (WinINET) at system services (WinHTTP)
- Pinipigilan ang pagdaan sa proxy para sa mga WebSocket-based na app at mga serbisyo ng Microsoft
- Sinusuportahan ang deployment sa pamamagitan ng Intune, GPO, o manu-manong pagpapatakbo ng script
Mga hakbang sa manu-manong configuration
- Buksan ang Control Panel → Internet Options.
- Pumunta sa tab na Connections → LAN Settings.
- I-enable ang Use a proxy server.
- Set:
- Address =
192.168.1.10 - Port =
8080
- Address =
- I-click ang Advanced, pagkatapos ay idagdag ang mga domain sa ibaba sa listahang Exceptions.
- Ilapat at i-save.
Scripted na paraan (PowerShell)
# Define proxy IP and port
$proxyIP = "http://192.168.1.10:8080"
# Define proxy bypass list
$bypassList = "localhost;127.0.0.1;*.microsoftonline.com;*.core.windows.net;*.slack.com;*.figma.com;*.lucidchart.com;*.lucid.app;*.github.com;copilot-proxy.githubusercontent.com"
# Apply proxy for system services
netsh winhttp set proxy $proxyIP ";$bypassList"
# Apply proxy for user apps
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 1
Set-ItemProperty -Path $regPath -Name ProxyServer -Value $proxyIP
Set-ItemProperty -Path $regPath -Name ProxyOverride -Value $bypassList