[Windows] cmd(コマンドプロンプト)でプロキシを通す
Windowsのcmd(コマンドプロンプト)でプロキシを通すコマンドのメモ。
プロキシはset http_proxy=http://[username]:[password]@[url]:[port]
, set https_proxy=http://[username]:[password]@[url]:[port]
で設定出来る。
例えば、username: hoge, password: hogehoge, url: hogehogehoge.hoge, port: 8080のときのhttp_proxyの設定はset http_proxy=http://hoge:hogehoge@hogehogehoge.hoge:8080
となる。
認証が不要の場合は[userneme]:[password]@
が省略できset http_proxy=http://hogehogehoge.hoge:8080
、ポート番号を指定しない場合は:[port]
が省略できset http_proxy=http://hoge:hogehoge@hogehogehoge.hoge
、どちらも省略した場合はset http_proxy=http://hogehogehoge.hoge
となる。
なお、毎回cmd起動時にパスを自動的に通したいときはcmdの/kオプションを使用する。
同じカテゴリー(技術メモ)の他の記事を表示
全記事を表示
タグ: Windows
投稿日: 2018年8月22日
最終更新日: