Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn off wget proxy?

I had been using a proxy for a long time. Now I need to remove it. I have forgotten how I have added the proxy to wget. Can someone please help me get back to the normal wget where it doesn't use any proxy. As of now, I'm using

wget <link> --proxy=none

But I'm facing a problem when I'm installing using a pre-written script. It's painstaking to search all through the scripts and change each command. Any simpler solution will be very much appreciated.

Thanks

like image 554
Trect Avatar asked Jul 30 '18 17:07

Trect


People also ask

Where does wget get proxy settings?

wget recognizes the following environment variables to specify proxy location: http_proxy/https_proxy: should contain the URLs of the proxies for HTTP and HTTPS connections respectively. ftp_proxy: should contain the URL of the proxy for FTP connections.

What proxy does wget use?

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.

What is Ftp_proxy?

ftp-proxy is a proxy for the Internet File Transfer Protocol. FTP control connections should be redirected into the proxy using the pf(4) divert-to command, after which the proxy connects to the server on behalf of the client.


2 Answers

Check your

  1. ~/.wgetrc
  2. /etc/wgetrc

and remove proxy settings.

Or use wget --no-proxy command line option to override them.

like image 63
Logu Avatar answered Oct 08 '22 23:10

Logu


In case your OS is alpine/busybox then the wget might vary from the one used by @Logu.

There the correct command is

wget --proxy off http://server:port/

Running wget --help outputs:

/ # wget --help
BusyBox v1.31.1 () multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
        [-o|--output-file FILE] [--header 'header: value'] [-Y|--proxy on/off]
        [-P DIR] [-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

        --spider        Only check URL existence: $? is 0 if exists
        -c              Continue retrieval of aborted transfer
        -q              Quiet
        -P DIR          Save to DIR (default .)
        -S              Show server response
        -T SEC          Network read timeout is SEC seconds
        -O FILE         Save to FILE ('-' for stdout)
        -o FILE         Log messages to FILE
        -U STR          Use STR for User-Agent header
        -Y on/off       Use proxy
like image 5
Naramsim Avatar answered Oct 08 '22 23:10

Naramsim