

Updated · Sep 19, 2023
Updated · Jul 31, 2023
Harsha Kiran is the founder and innovator of Techjury.net. He started it as a personal passion proje... | See full bio
Girlie is an accomplished writer with an interest in technology and literature. With years of experi... | See full bio
The global average internet speed of 110 Mbps may look amazing, but 64.70 Mbps average download speed might not help with big downloads.
With files getting larger, the demand for tools that can aid users in downloading larger files with slower connection speeds increased. Wget is one such tool.
WGet is a non-interactive mechanism that lets you download files. it also lets you download safely—with the help of proxy servers.
In this article, you will learn how to use a Wget command with proxy IPs. Read on to find out.
Key Takeaways
|
As open-source GNU software, Wget lets users download files on the web even with minimal or controlled bandwidth.
It is commonly pre-installed on Linux, but it is also compatible with MacOS and Windows.
The Wget command functions can be used in scripts, terminals, and cron jobs.
It can also let you perform recursive downloads and full mirroring of websites by storing the HTML file for local access.
Wget commands have a simple syntax that goes like this:
Wget [options] [URL] |
The options are the specific Wget command functions. If Wget is installed, you can check the list of options by typing Wget -h.
Wget is often used for downloading large files. It is non-intrusive and can silently work in the background, even when a different user is logged in.
It can also resume interrupted downloads. For added security and anonymity, you can use Wget with proxy IPs. It can also be used for testing proxies.
First, you have to check if Wget is installed on your device. Open your terminal or command prompt and type in Wget -V.
If Wget is installed, it should print the version and license information. However, if it is not present, you can install Wget by following these steps:
You can install Wget through the Homebrew packet manager. Type in this command:
brew install Wget |
Run the Wget -V command again to check if it’s successfully installed.
Here is the easiest way to install Wget in Windows:
Wget should be pre-installed on Linux. In case it’s not present, you can install Wget with these commands:
For Ubuntu:
sudo apt-get install Wget |
For CentOS:
sudo yum install Wget |
After ensuring Wget is installed, you should also have your proxies ready. You can get proxy IPs from paid and free sources.
Keep in mind that it is generally safer to use a paid proxy service. Free proxies are unsafe and often abused by many users.
Helpful Article: Getting the proxy that suits your needs is important to enjoy a safe browsing experience. Check out the leading proxy server services that you can choose from. |
Before we get into the use of proxies, let’s take a look at the basic Wget commands that you can perform.
For MacOS and Linux, you can use the built-in terminal to run Wget commands.
In the case of Windows users, you can choose between the Windows command prompt or Powershell.
It is a more advanced command-line software built by Microsoft that is also a programming language on its own.
To download a file, simply run this command:
Wget https://www.example.com/example.pdf |
To download files from multiple URLs, create a .txt file containing the download links. Then, run
Wget -i manydownloads.txt |
If you want to download the whole website in HTML, use this command:
Wget -m https://www.example.com/ |
To save a downloaded file to a specific directory, you can use:
Wget -P \Documents\Examples https://www.example.com/example.pdf |
To view all “options,” you can run:
Wget -h |
These commands will be useful when using proxies in Wget, so make sure to take note of each one.
Wget primarily supports HTTP, HTTPS, and FTP protocols.
If you require SOCKS proxies, you can use a Wget alternative like cURL. It can support a lot of protocols.
To apply a proxy to your download request, use the execute (-e) option to activate proxy use and apply the actual proxy.
Here’s an example:
Wget -e use_proxy=yes -e http_proxy=[proxy IP]:[port] https://example.com/examplefile.zip |
For proxies that need authentication, you can use Wget with your proxy username and password. It should look like this:
Wget -e use_proxy=yes -e https_proxy=[proxy IP:port] --proxy-user=[username] --proxy-password=[password] https://example.com/example.pdf |
Another option is to configure the proxy in the operating system. This will make all connections go through the proxy server.
With this, you will not have to type in the long proxy command all the time.
Below are steps on how you can do that across different operating systems.
To set up a proxy on Windows:
Here’s how to set up a proxy on MacOS:
1. Click on the Apple logo in the top-right corner.
2. Select System Preferences.
3. Click on Network.
4. Select your active network connection. It’s either Ethernet or WiFi.
5. Click on Advanced.
6. Select the protocol type of your proxy or the automatic proxy options.
7. Enter the proxy IP and port number.
8. If the proxy requires authentication, tick the checkbox beside Proxy server requires authentication. Enter the username and password.
9. Click OK.
For Linux, there is a way to configure the proxy settings on Wget without affecting the OS. All you have to do is configure the Wgetrc file.
1. Type in this command to access the Wgetrc file.
sudo nano /etc/wgetrc |
2. It should return your Wget configurations. Find these lines.
#https_proxy = http://proxy.yoyodyne.com:18023/ #http_proxy = http://proxy.yoyodyne.com:18023/ #ftp_proxy = http://proxy.yoyodyne.com:18023/ |
3. Remove the comment symbol (number sign) of the proxy protocol that you want to configure. It should look like this:
#https_proxy = http://proxy.yoyodyne.com:18023/ http_proxy = http://proxy.yoyodyne.com:18023/ #ftp_proxy = http://proxy.yoyodyne.com:18023/ |
4. Change it to your proxy IP and port number.
http_proxy = http://[proxy IP]:[port]/ |
5. Exit and save the changes.
Now, you can send all your Wget download requests through a proxy.
Wget is a highly useful tool for downloading large files and mirroring websites, even with a limited internet connection speed.
It is even more useful with the use of proxies, which let you bypass IP blocks and geo-restrictions while staying anonymous.
The best thing about Wget is that it is open-source. You can use it absolutely free of charge. It is also continuously being updated, so it will just keep getting better.
The config file for Wget is Wgetrc. In Linux, you can access this file using the command sudo nano /etc/Wgetrc.
The proxy URL is the actual address that will redirect your connection to the proxy server. Here’s an example of a proxy URL: https://123.456.789.123:8080.
Your email address will not be published.
Updated · Sep 19, 2023
Updated · Sep 11, 2023
Updated · Sep 05, 2023
Updated · Sep 05, 2023