gpt4 book ai didi

windows - 通过批处理/CMD 刷新 Internet 选项

转载 作者:行者123 更新时间:2023-12-03 11:07:30 26 4
gpt4 key购买 nike

我制作了一个批处理程序,使用以下代码在 Internet 选项中启用和禁用代理使用:

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

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

此代码工作正常,但为了应用更改并使用代理连接到互联网,我必须关闭并重新打开我的浏览器。有没有办法在不这样做的情况下应用代理。

我已经尝试过“ipconfig/renew”和“ipconfig/release”。我还尝试禁用和启用本地连接。

如果知道通过 batch/cmd 或其他程序连接到代理的另一种方法并且没有这个问题,那也会有所帮助。

最佳答案

我不使用代理,所以这对我来说是空白的,但这个命令似乎是你想要的。

netsh winhttp ?

显示有关设置代理等的帮助

这有助于设置代理

C:\Users\User>netsh winhttp set proxy ?

Usage: set proxy [proxy-server=]<server name> [bypass-list=]<hosts list>

Parameters:

Tag Value
proxy-server - proxy server for use for http and/or https protocol
bypass-list - a list of sites that should be visited bypassing the
proxy (use "<local>" to bypass all short name hosts)

Examples:

set proxy myproxy
set proxy myproxy:80 "<local>;bar"
set proxy proxy-server="http=myproxy;https=sproxy:88" bypass-list="*.foo.com"

关于windows - 通过批处理/CMD 刷新 Internet 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26554695/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com