Use proxy with wget on the fly
You can pass the proxy settings via the environment, e.g.:
https_proxy=http://proxy.example.com:3128 wget http://www.example.com
How to use wget with a proxy
You are using the wrong method, Let me tell you.
Go to home on your server or computer using cd ~
then create a file using vim like vi ~/.wgetrc
and paste your proxy URL inside the file using as below.
use_proxy = on
http_proxy = http://70.32.89.160:3128
https_proxy = http://70.32.89.160:3128
ftp_proxy = http://70.32.89.160:3128
now use below command to access your blocked side.
wget -e use_proxy=yes -e http_proxy=$proxy http://www.apkmirror.com
or try using wget http://www.apkmirror.com
you will see below output.
root@ubuntu:~# wget www.apkmirror.co
--2017-04-21 08:12:45-- http://www.apkmirror.co/
Connecting to 70.32.89.160:3128... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://www.apkmirror.co/ [following]
--2017-04-21 08:12:47-- http://www.apkmirror.co/
Connecting to 70.32.89.160:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 76512 (75K) [text/html]
Saving to: ‘index.html.8’
100%[===================================================================================================================>] 76,512 447KB/s in 0.2s
2017-04-21 08:12:49 (447 KB/s) - ‘index.html.8’ saved [76512/76512]
Why wget (windows) behind proxy needs PORXY_HTTP/HTTPS environment variables, and Chrome doesn't
In all likelyhood your Chrome also has a proxy set up in some way. In any case, the simplest way to define the proxy for wget is to create a .wgetrc file in your local home folder and set the following:
> vi ~/.wgetrc
use_proxy=on
http_proxy=http://[proxy_ip]:[proxy_port]
https_proxy=https://[proxy_ip]:[proxy_port]
ftp_proxy=http://[proxy_ip]:[proxy_port]
That should be all you need to do.
How do I turn off wget proxy?
Check your
~/.wgetrc
/etc/wgetrc
and remove proxy settings.
Or use wget --no-proxy
command line option to override them.
How to wget https domain when using proxies
The problem could be that you're specifying the http_proxy argument, but passing in an https proxy, if instead specify it as a https proxy like
https_proxy=https://xxx:xxx
Then you should be able to retrieve it. There also could be problems with the configuration of the proxy you're using, but that's out of your control.
Proxy authentication using wget on cygwin
This problem was solved thanks to the suggestion of a User of the community AskUbuntu.
Basically, instead of editing the global configuration file wgetrc
, I should have created a new .wgetrc
with my proxy configuration in my Cygwin
home directory.
In summary:
Step 1 - Create a .wgetrc
file;
nano ~/.wgetrc
Step 2 - record in this file the proxy info:
use_proxy=on
http_proxy=http://my.proxy.ip:my.port
https_proxy=https://my.proxy.ip:my.port
ftp_proxy=http://my.proxy.ip:my.port
proxy_user=username
proxy_password=password
Related Topics
Memory Limit to a 32-Bit Process Running on a 64-Bit Linux Os
Using Grep and Sed to Find and Replace a String
Pack Shared Libraries into the Elf
What Do These Kernel Panic Errors Mean
How Do Applications Resolve to Different Versions of Shared Libraries at Run Time
Library Path When Dynamically Loaded
How to Use Gdb in Eclipse for C/C++ Debugging
Writing a Putchar in Assembly for X86_64 with 64 Bit Linux
Command Line: Search and Replace in All Filenames Matched by Grep
Get a Browser Rendered HTML+Javascript
Why Does Sed Fail with International Characters and How to Fix
Get Yesterday's Date in Bash on Linux, Dst-Safe
How to Get a List of Available Wireless Networks on Linux
How to Add a Line of Text to the Middle of a File Using Bash
How to Convert Linux 32-Bit Gcc Inline Assembly to 64-Bit Code