67
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

updated at

curlコマンドにてproxy設定

やりたいこと

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
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
67
Help us understand the problem. What are the problem?