LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to export http_proxy when username contains an @ symbol? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-export-http_proxy-when-username-contains-an-%40-symbol-684274/)

Funkster 11-18-2008 04:44 AM

How to export http_proxy when username contains an @ symbol?
 
Hi all,

First post here, hope I'm in the right area. I've searched t'internet in general and on this forum, but can't find an answer to this one...

I would like to get http proxying working from the console, but as my Linux box is behind a corporate network it just so happens that my username for the proxy server contains an @ symbol. So, when I try to use the following type of command:

Code:

export http_proxy=http://username:password@proxy.thing.com:8080/
I insert my username and end up with something like:

Code:

export http_proxy=http://ted@thing.com:password@proxy.thing.com:8080/
This seems to break things, presumably because something is parsing everything after the first @ as the address of the proxy.

Can anyone give me any hints as to how I can get it to work? I've tried # and % as delimiters but just get different errors, as presumably the proxy server itself isn't set up to accept anything other than @.


As an aside, the only reason I really need to get this to work is so that I can try to use YUM from the console, as when I put an openSuSE 10.3 repository in as an installation source, YaST's Online Update utility just disappears shortly after I run it. So, if anyone has any bright ideas on that one then it'll avoid the need to fix the proxy issue!


Many thanks in advance,
--
Olly

TB0ne 11-18-2008 09:04 AM

Quote:

Originally Posted by Funkster (Post 3346098)
Hi all,

First post here, hope I'm in the right area. I've searched t'internet in general and on this forum, but can't find an answer to this one...

I would like to get http proxying working from the console, but as my Linux box is behind a corporate network it just so happens that my username for the proxy server contains an @ symbol. So, when I try to use the following type of command:

Code:

export http_proxy=http://username:password@proxy.thing.com:8080/
I insert my username and end up with something like:

Code:

export http_proxy=http://ted@thing.com:password@proxy.thing.com:8080/
This seems to break things, presumably because something is parsing everything after the first @ as the address of the proxy.

Can anyone give me any hints as to how I can get it to work? I've tried # and % as delimiters but just get different errors, as presumably the proxy server itself isn't set up to accept anything other than @.


As an aside, the only reason I really need to get this to work is so that I can try to use YUM from the console, as when I put an openSuSE 10.3 repository in as an installation source, YaST's Online Update utility just disappears shortly after I run it. So, if anyone has any bright ideas on that one then it'll avoid the need to fix the proxy issue!


Many thanks in advance,
--
Olly

Welcome!

Try to escape the @ character with a backslash \, and see if it works. You can also set up a .wgetrc/.netrc file, that has the proxy_user and proxy_passwd variables set, and that may work for you.

Funkster 11-18-2008 10:44 AM

Hi there!

Thanks for the suggestion... I had a go with username\@domain@proxy.domain but it still falls over, wget gives the error:

Resolving domain@proxy.domain... failed: Name or service not known.

I guess the first time it sees an @ it figures whatever is after that is supposed to be the address of the proxy.

I'll have a play with .wgetrc and see if it helps :o)

Cheers,
--
Olly

Funkster 11-18-2008 11:24 AM

Hallo,

I made a .wgetrc with the separate proxy_user and proxy_passwd fields set, and that works perfectly for wget!

Sadly, setting similar fields up for yum in /etc/yum.conf did not work - presumably yum cannot parse a username with an @ in. :o(

Back to the drawing board!

Many thanks,
--
Olly

TB0ne 11-18-2008 12:05 PM

Quote:

Originally Posted by Funkster (Post 3346448)
Hallo,

I made a .wgetrc with the separate proxy_user and proxy_passwd fields set, and that works perfectly for wget!

Sadly, setting similar fields up for yum in /etc/yum.conf did not work - presumably yum cannot parse a username with an @ in. :o(

Back to the drawing board!

Many thanks,
--
Olly

Glad it helped some. Tried this http://docs.fedoraproject.org/yum/sn...xy-server.html ?

DotHQ 11-18-2008 12:38 PM

Can't you simply change the username ...or add another username that does not have the @ symbol?

Funkster 11-19-2008 03:38 AM

The domain controller is very much not under my control, what with it belonging to the IT department of a multinational company :o)


All times are GMT -5. The time now is 10:31 AM.