Skip to content

Instantly share code, notes, and snippets.

@everyx
Last active April 25, 2023 20:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save everyx/41f620d2a80eecdf787e to your computer and use it in GitHub Desktop.
Save everyx/41f620d2a80eecdf787e to your computer and use it in GitHub Desktop.
A batch script to enable proxy via a proxy file.
@echo off
goto enable-pacproxy
:enable-pacproxy
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://192.168.0.10:8093/pac" /f
goto end
:disable_proxy
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
:end
pause>nul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment