This guide describes how to access a network (e.g. the Internet) through a proxy server.
In many cases you need to configure a proxy to be able to connect your Raspberry Pi to the internet. This guide will help you with that.
For setting the proxy system-wide we need to change the /etc/environment file. In this case "nano" was used as the text editor but you can also use your preffered one.
sudo nano /etc/environment
Substitute your own proxy information and add the following lines to the file and save them.
httpproxy=http://proxy:port httpsproxy=http://proxy:port
Reboot your system and you should be all set up.
sudo reboot
Note: Implementing changes to the /etc/environment file is the proper way of setting the proxy. But in some cases this does not work, so you might consider implementing the changes also into the /etc/profile file or the ~/.profile file.
sudo nano /etc/profile sudo nano ~/.profile
Proceede as specified above and then it should work for you as well.
To be able to use "apt-get" we need to configure the proxy. For this we need to run the following steps:
Create a new file with an editor (here: nano):
cd /etc/apt/apt.conf.d sudo nano 10proxy
Add one of the following lines, depending on whether or not an authentication needs to be included and replace the placeholders with your proxy information.
Acquire::http::Proxy "http://proxy:port/"; Acquire::http::Proxy "http://username:password@proxy:port/";
Save and then reboot your Raspberry Pi and you should be able to run an update.
Want to comment this ... Show more