Burp Suite can not intercept the wget and curl HTTP request

I use Burp Suite as proxy listen 127.0.0.1:8080, and I also set the HTTP Proxy as 127.0.0.1:8080.

now Burp Suite can intercept all the browsers(eg. firefox, safari, chrome), and application(eg. dictionary ) on my Mac:enter image description here


but can not intercept the wget and curl's request.

such as:

curl 

Isn't curl and wget using HTTP protocol requests?


EDIT-01

  1. Why I set macOS preferences HTTP Proxy to 127.0.0.1:8080, all the browsers and applications will use this Proxy by default? I did not set in each browser.

  2. Why curl and wget do not use the proxy by default? even I set --proxy still not work.

wget --proxy 127.0.0.1:8080

3 Answers

If you look at the manpages for wget and curl you'd notice that curl has --proxy, but wget doesn't. Both do use environment variables, even with the same names:

Wget: 8.1 Proxies

Wget supports proxies for both HTTP and FTP retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment variables:

  • http_proxy
  • https_proxy

If set, the http_proxy and https_proxy variables should contain the URLs of the proxies for HTTP and HTTPS connections respectively.

CURL: ENVIRONMENT

Using an environment variable to set the proxy has the same effect as using the -x, --proxy option.

  • http_proxy [protocol://]<host>[:port] Sets the proxy server to use for HTTP.

  • HTTPS_PROXY [protocol://]<host>[:port] Sets the proxy server to use for HTTPS.

This means that, in addition to ropnop's Example 1 - Proxying curl and wget,

export http_proxy=localhost:8080
export https_proxy=localhost:8080
curl example.com
wget -O /dev/null example.com
## or ##
http_proxy=localhost:8080 https_proxy=localhost:8080 curl example.com
http_proxy=localhost:8080 https_proxy=localhost:8080 wget -O /dev/null example.com

you can also use

curl --proxy localhost:8080 example.com

but the same syntax doesn't work with Wget.

For curl and wget you can use the http_proxy and https_proxy environment variables. See Proxying and Intercepting CLI Tools maybe you set one but not the other?

Please share how you set the proxy that your browsers use.

Your browsers and applications automatically use your system proxy settings, which you have set.

curl and wget do not automatically use your system settings; you need to set them manually by looking up these settings their documentation.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like