简体   繁体   中英

How to change chrome proxy via command line windows?

I have tried to update the settings with:

netsh winhttp set proxy proxy-server="127.0.0.1:8080" bypass-list=""

also tried:

netsh winhttp set proxy proxy-server="http=127.0.0.1:8080" bypass-list=""

But no effect, the traffic just don't go through the proxy.

I have also used this:

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d 127.0.0.2:8080 /f

but the problem is I can't override the settings, once I pick one proxy, even though I disable the proxy with:

reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f

the settings stay and I have to go to Internet Explorer > Internet Options > Connection > Lan Settings to change it, and the command doesn't work anymore, just the first time.

I was wrong,

reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f

does the trick, the thing is, it is necesary to restart the brower to apply the changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM