Some networks such as workplaces or schools often require you to connect to the Internet through a proxy server.
You will need the address of the proxy server you are trying to connect to, including the username and password if one is required.
You should confirm that the Raspberry Pi is already connected to the network and that you can access the proxy server.
ping command to check this as follows:
ping proxy.address.com -c 4
If this fails (you get no responses), you will need to ensure your network settings are correct before continuing.
Create a new file using
nano as follows (if there is content in the file already, you can add the code at the end):
sudo nano -c ...