LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-10-2012, 08:07 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
wget is using not the proxy I just set in http_proxy


Hi!

I have in my .bashrc stuff settings for http_proxy and https_proxy. Works like a charm.

Now, I want to use _another_proxy to download one file from internet. I set/export http_proxy and https_proxy on the terminal I'm running wget and wget is still using the proxy that was set up in the variables before. why is that?

Thanks in advance.

Kubuntu 12.04 (updated)
 
Old 10-10-2012, 08:27 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,373

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
what do you see if you run "echo $http_proxy"? note that the scope of variables is per session, you can't change them from a different terminal etc.
 
Old 10-10-2012, 08:37 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I know. Look:

Code:
$ echo $http_proxy $https_proxy
plata.cps.local:8080 plata.cps.local:8080
$ export http_proxy=helio.cps.local:8080
$ export https_proxy=helio.cps.local:8080
$ echo $http_proxy $https_proxy
helio.cps.local:8080 helio.cps.local:8080
$ wget http://releases.ubuntu.com/lucid/ubuntu-10.04.4-server-i386.iso
--2012-10-10 09:05:51--  http://releases.ubuntu.com/lucid/ubuntu-10.04.4-server-i386.iso
Resolving plata.cps.local (plata.cps.local)... 10.240.178.202
Connecting to plata.cps.local (plata.cps.local)|10.240.178.202|:8080... connected.
Proxy request sent, awaiting response... ^C
How about that?
 
Old 10-10-2012, 08:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,373

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
Hmm, odd. there are a fair few other variables it might be seeing, anything else in "set | grep -i proxy" ?
 
Old 10-10-2012, 08:47 AM   #5
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Code:
$ set | grep -i proxy
UBUNTU_MENUPROXY=libappmenu.so
http_proxy=helio.cps.local:8080
https_proxy=helio.cps.local:8080
            -find -s -nice -nouserlib -noclasspath -autoproxy -main'             -- "$cur" ));
                        url proxy fetch push mirror skipDefaultUpdate
                core.gitProxy
                http.proxy
        PreferredAuthentications Protocol ProxyCommand PubkeyAuthentication \


---------- Post added 10-10-12 at 10:48 AM ----------

That's on the same session I used before.
 
Old 10-10-2012, 08:52 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,373

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
Nope, I'm lost!

If you put the variable on the same command line, it does work correctly, right?

$ http_proxy=helio.cps.local:8080 wget http://releases.ubuntu.com/lucid/ubu...erver-i386.iso
 
Old 10-10-2012, 08:55 AM   #7
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,452

Rep: Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210
do you have a wgetrc? ($HOME/.wgetrc)
 
Old 10-10-2012, 08:59 AM   #8
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I thought of the .rc file but I think I have none. Let me double check. Nope, nothing.

Actually, it does not work with the environment variable set on the same command line:

Code:
$ http_proxy=helio.cps.local:8080  wget http://releases.ubuntu.com/lucid/ubuntu-10.04.4-server-i386.iso
--2012-10-10 09:27:39--  http://releases.ubuntu.com/lucid/ubuntu-10.04.4-server-i386.iso
Resolving plata.cps.local (plata.cps.local)... 10.240.178.202
Connecting to plata.cps.local (plata.cps.local)|10.240.178.202|:8080... connected.
Proxy request sent, awaiting response... ^C
$ http_proxy=helio.cps.local:8080 https_proxy=helio.cps.local:8080 wget http://releases.ubuntu.com/lucid/ubuntu-10.04.4-server-i386.iso
--2012-10-10 09:28:57--  http://releases.ubuntu.com/lucid/ubuntu-10.04.4-server-i386.iso
Resolving plata.cps.local (plata.cps.local)... 10.240.178.202
Connecting to plata.cps.local (plata.cps.local)|10.240.178.202|:8080... connected.
Proxy request sent, awaiting response... ^C
weird... veeeeeeeeeeeeery weird.
 
Old 10-10-2012, 09:08 AM   #9
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,452

Rep: Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210Reputation: 1210
try to unset those variables and use strace to see what's happened (which file was accessed before connecting)
 
  


Reply

Tags
environment, proxy, wget


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ask] using wget through SOCKS proxy arroquant Linux - Software 5 09-30-2009 06:12 PM
wget - where is it getting proxy information? gandalfrat Linux - Newbie 3 04-21-2007 11:38 PM
wget through proxy TheRealDeal Linux - Networking 5 09-14-2005 06:07 AM
wget with proxy? Cornholio Linux - Software 8 01-13-2005 02:12 AM
wget proxy problem henryluo Linux - Newbie 1 07-05-2004 06:31 PM


All times are GMT -5. The time now is 05:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration