Set proxy through windows command line including login parameters

后端 未结 4 2027
离开以前
离开以前 2021-01-30 03:41

I want to set a proxy throught the command line, first thing I found out is that you have to run command line with administrator rights - then the basic proxy s

4条回答
  •  青春惊慌失措
    2021-01-30 03:48

    IE can set username and password proxies, so maybe setting it there and import does work

    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d name:port
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyUser /t REG_SZ /d username
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyPass /t REG_SZ /d password
    netsh winhttp import proxy source=ie
    

提交回复
热议问题