Configuring Wget for Proxy-Restricted Campus Networks

Open the wgetrc file in the etc folder by using the following command in the terminal:

sudo gedit /etc/wgetrc

You can replace gedit with the editor you prefer, such as nano, vim, etc.

Search for the text that looks like this:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

Then, remove the hash symbol (#) and edit the https_proxy, http_proxy, and ftp_proxy sections according to the proxy you use. For example:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://proxy.mycampus.com:8023/
http_proxy = http://proxy.mycampus.com:8023/
ftp_proxy = http://proxy.mycampus.com:8023/

If the proxy you use requires authentication with a username and password, set it up as follows:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://username:password@proxy.mycampus.com:8023/
http_proxy = http://username:password@proxy.mycampus.com:8023/
ftp_proxy = http://username:password@proxy.mycampus.com:8023/

Then, remove the hash symbol (#) from use_proxy = on to enable it:

# If you do not want to use proxy at all, set this to off.
use_proxy = on

Finally, save the file.




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Satu EFI untuk Dua Operating System (Ubuntu 24.04 dan Windows 11) pada dua disk yang berbeda
  • Akses internet ITS melalui myITS-WiFi di Ubuntu
  • Menampilkan Label LaTeX di Matplotlib