Last active
April 25, 2023 20:55
-
-
Save everyx/41f620d2a80eecdf787e to your computer and use it in GitHub Desktop.
A batch script to enable proxy via a proxy file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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