LoginSignup
82
77

More than 5 years have passed since last update.

curlコマンドにてproxy設定

Last updated at Posted at 2018-03-14

やりたいこと

curlにproxy設定をしたい。

方法

proxy書式: http://ユーザ名:パスワード@サーバ名:ポート

(その1) コマンドに直接指定

$ curl www.yahoo.co.jp -x http://taro:password@192.168.1.1:8080 

(その2) ~/.bashrcに設定

$ cat .bashrc
export http_proxy=http://taro:password@192.168.1.1:8080
export https_proxy=http://taro:password@192.168.1.1:8080

(その3) ~/.curlrcに設定

$ cat .curlrc
proxy=http://taro:password@192.168.1.1:8080
82
77
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
82
77