21

I have tried put in apt config Acquire::http::proxy, and in Network>Network proxy with and without user:password@server:port and using environment variables http_proxy and https_proxy. Nothing seems to work, not even a single proxy authentication popup window.

The only proxy configuration working is within Firefox Edit> Preferences> Advanced> Network> Connection> Settings> Manual Proxy Configuration.

  • Using gconf to manually set the proxy doesn't work

Using Synaptic in previous Ubuntu versions was too simple.

Jorge Castro
  • 73,717
Augusto
  • 311

9 Answers9

13

Go to /etc/apt. Create the file apt.conf if you don't have it there. Write the following lines there.

Acquire::http::proxy "http://username:password@proxyserver:port/";
Acquire::https::proxy "https://username:password@proxyserver:port/";
Acquire::socks::proxy "socks://username:password@proxyserver:port/";

Save it. You are done.

jokerdino
  • 41,732
Nic
  • 139
5

I had the same problem. However I did have success by setting Acquire::http::proxy in /etc/apt/apt.conf in the format

Acquire::http::proxy "http://user:pass@host:port/";

Note, I initially followed a recommendation somewhere on the web to put this in /etc/apt.conf. The correct path is /etc/apt/apt.conf

Synesso
  • 563
1

In the dash button, select the "Network" option. In the network configuration screen you should select "network proxy" > "manual", type your proxy data and finally "Apply to all system". If authentication is required, the login screen will appear.

Another option is to configure directly using the gconftool:

gconftool-2 -t string -s /system/http_proxy/host "YOUR_PROXY_ADDRESS"
gconftool-2 -t int -s /system/http_proxy/port PROXY_PORT
gconftool-2 -t bool -s /system/http_proxy/use_http_proxy true

I hope this help.

txwikinger
  • 29,406
0

Well this worked - however it didn't work to just use Acquire::http::proxy "http://host:port/" - I had to use Acquire::http::proxy "http://user:pass@host:port/" even though I haven't a password on the proxy (I just did use "user and pass" to keep the syntax).

jokerdino
  • 41,732
Jarle D
  • 11
0

I had set proxy details in System → Network and applied system wide but was unable to use the Software Center (Firefox was fine).

I do need to enter a username and password but my actual username and password entered in that string wouldn't work, but when I just put in the actual words "user:pass" the Software Center started working!

Peachy
  • 7,235
  • 10
  • 40
  • 47
Andrew
  • 1
0

You need to confirm that your username or password must not contain : or @ in it. I had a similar problem and it was solved when I changed my password.

Eliah Kagan
  • 119,640
0

I've applied all of the above and none of it works for me AT FIRST, even though wget, apt-get, curl, web browsing, thunderbird and suchlike have all worked perfectly for years. Only software centre didn't work.

However, I left it with a grey screen for 2-4 minutes after applying the fix to /etc/apt/apt.conf:

      Acquire::http::proxy "http://user:pass@host:port/"

and then magically it began to work.

Eamonn Kenny
  • 230
  • 2
  • 4
0

I have made a python script to set the proxy settings in Ubuntu

Assume the following setting, you need to replace at relevant places

  • proxy_address 172.16.26.214
  • proxy_port 3128
  • proxy_username king
  • proxy_password queen

I have made a video which takes you through all the steps:
Youtube - Setting Simple and Authenticated Proxy Settings in Ubuntu 12 13 14 and above 100% Working.

Steps are Detailed here:

  • First click on Dash
  • In Search Box Enter "Proxy" (Without Quotes)
  • Click on "Network" under Applications
  • Select "Network Proxy"
  • Select Manual
  • Enter the proxy address and proxy port
  • Apply. Enter your system password to confirm

Download the script setproxy.py

https://dl.dropboxusercontent.com/u/397422/setproxy.py

OR

https://copy.com/ezPIBHwKhg3Ki8f6

Let’s say you have saved the setproxy.py in the Downloads folder

  • Open terminal Type
  • cd ~/Downloads

General Command:
sudo python setproxy.py proxy_address proxy_port proxy_username proxy_password
For our example

  • sudo python setproxy.py 172.16.26.214 3128 king queen

In case of simple proxy Without authentication the command is:

  • sudo python setproxy.py 172.16.26.214 3128

In case you have python 3 and above run using python2.7 so the commands will look like

  • sudo python2.7 setproxy.py 172.16.26.214 3128
  • sudo python2.7 setproxy.py 172.16.26.214 3128 king queen
0

Here is a link to a python program named UBPROXY . Given below are the steps to set proxy Authentication.

http://code.google.com/p/ubproxy/downloads/detail?name=ubproxy

command to use->

1.download this program.

2.open your terminal

3."cd ~/Downloads" (Presuming that your download exist in this directory)

4."chmod +x ubproxy"

5."sudo ./ubproxy"