Jump to content


Photo
- - - - -

Wget syntax with proxy


  • Please log in to reply
2 replies to this topic

#1 m2mike

m2mike

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 462 posts
  • Gender:Male

Posted 20 November 2005 - 12:17 AM

If I want to use wget with a proxy, what is the correct syntax? I have tried the following with no success:

wget --proxy http_proxy = xxx.xxx.xxx.xxx:80 http://www.targeturl.com
wget --proxy=on http_proxy = xxx.xxx.xxx.xxx:80 http://www.targeturl.com
wget --proxy=on http_proxy = xxx.xxx.xxx.xxx:80/http://www.targeturl.com


Can someone post the correct syntax?

Edited by m2mike, 20 November 2005 - 12:18 AM.


#2 Dr^ZigMan

Dr^ZigMan

    Publish or Perish!

  • Agents of the Revolution
  • 1,207 posts
  • Location:561

Posted 20 November 2005 - 12:42 AM

I had a similar problem!

You have to set the http_proxy variable first then you can use it in the wget... I have the exact syntax around here somewhere let me dig for it. Ok if you need the exact syntax I can post it for you tommrow, it's on my other partition but their is two ways to do it, one which is just using command line arguments work with export http_proxy and then using that proxy for wget, the other method is to add the information directly to the .wgetrc I've pasted the relevent man page parts for ya

STARTUP FILE

    Wget supports the use of initialization file .wgetrc. First a system-wide init file will be looked for (/usr/local/lib/wgetrc by default) and loaded. Then the user's file will be searched for in two places: In the environmental variable WGETRC (which is presumed to hold the full pathname) and $HOME/.wgetrc. Note that the settings in user's startup file may override the system settings, which includes the quota settings (he he).

    The syntax of each line of startup file is simple:

        variable = value

http_proxy = string

    Use the string as HTTP proxy, instead of the one specified in environment.

then you can manage use of the proxy with just

-Y on/off --proxy=on/off

    Turn proxy on or off. The proxy is on by default if the appropriate environmental variable is defined.


If this is all too confusing and strange I can get you the exact syntax I used tommrow. Good luck
-Dr^ZigMan

#3 stacksmasher

stacksmasher

    Mack Daddy 31337

  • Members
  • 214 posts

Posted 20 November 2005 - 08:28 AM

Disregard this post; I’m just trying to break 100. <-----post whore.




BinRev is hosted by the great people at Lunarpages!