Comment 1 for bug 494373

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I had a look at the code and it seems that the problem is located here:
50_ubuntu_systemwide_prefs.patch:29

that is to say:
+ /* FIXME: add proxy auth support when a "secure" store for the proxy
+ password is available */
+ proxy_str = g_strdup_printf("%s://%s:%i/", proxy_type, host, port);
+ g_print("p: %s\n", proxy_str);

So, here the string does not include auth information (it is explained in the FIXME).

Regarding gnome-terminal, if the http_proxy environment variable is already defined then it does not attempt to retrieve the proxy information from gconf and define http_proxy variable.

See src/terminal-screen.c:1422
  /* Do we already have a proxy setting? */
  if (g_hash_table_lookup (env_table, "http_proxy") != NULL)
    use_proxy = FALSE;

If I comment these two lines, then my http_proxy variable is defined properly in gnome-terminal (with auth information).

Basically, there are two solutions:
1) The ideal solution would be to add auth support to 50_ubuntu_systemwide_prefs.patch. I don't know if it is possible because apparently a secure store is missing
2) In 50_ubuntu_systemwide_prefs.patch do not attempt to define the http_proxy variable whenever authentication is enabled. At least, applications such as gnome-terminal will define the http_proxy variable correctly (provided that it is not already defined). For other applications, the proxy string without auth information would not work anyway when authentication is required.