如何從 Windows 命令提示字元永久取消設定代理?

如何從 Windows 命令提示字元永久取消設定代理?

我已使用以下命令在 Windsows 7 cmd 中設定代理

C:\> setx HTTP_PROXY http://username:[email protected]:1234
C:\> set HTTPS_PROXY=http://username:[email protected]:5678

現在我嘗試使用以下命令刪除它,

set http_proxy=
set https_proxy=

這僅在當前命令提示字元會話中有效,當我打開新的 cmd 時,我的舊代理 URL 會再次設置,我必須再次使用 set http_proxy= 來刪除它。如何永久刪除此代理設定?

答案1

若要刪除目前cmd實例中的變量,請執行下列操作:

set http_proxy=
set https_proxy=

或(甚至更好):

set "http_proxy="
set "https_proxy="

若要刪除未來cmd實例的變量,請執行下列操作:

setx http_proxy ""
setx https_proxy ""

相關內容