17
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

コマンドでのProxy設定

Last updated at Posted at 2020-01-25

#ブラウザのProxy
image.png
image.png

設定を自動的に検出する

レジストリを弄ればできるが、難易度高い

##自動構成スクリプトを使用する/セットアップスクリプトを使う
設定

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /t REG_SZ /d "http://aaaa.local/proxy.pac" /f

削除

reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /f

##LANにプロキシサーバーを使用する/プロキシサーバーを使用する
設定

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyEnable /t reg_dword /d 1

削除

reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyEnable

##アドレス、ポート
設定

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyServer /t reg_sz /d Proxyアドレス:8080

削除

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyServer

##例外
設定
<local>を入れることで、「ローカルアドレスにはプロキシサーバーを使用しない」にチェックが入る

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyOverride /t reg_sz /d "192.168.*;*.test.local;<local>"

削除

reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyOverride

#OSのProxy

##WinHTTPProxy
設定

netsh winhttp set proxy proxy-server="Proxyアドレス:8080" bypass-list="*.local;<local>"

設定(IEの設定を引き継ぐ)

netsh winhttp import proxy source=ie

確認

netsh winhttp show proxy

削除

netsh winhttp reset proxy
17
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?