Thread: Download File through HTTP Proxy

  1. #1
    Registered User cyberCLoWn's Avatar
    Join Date
    Dec 2003
    Location
    South Africa
    Posts
    124

    Download File through HTTP Proxy

    All my university's internet traffic goes through an HTTP proxy. What I need to do is download XML files from certain websites, but before I can access these websites I need to authenticate through the proxy.

    Basically what I'd like to find out is how to go about getting my program (C++) to use IE settings (where the proxy details have been entered), then popup an authentication screen and if that's valid then retrieve the file.

    Any ideas?

  2. #2
    Registered User
    Join Date
    Jun 2007
    Posts
    13
    Have you looked into the WinInet API ?

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    IE uses WinINet, not the other way around, so that wouldn't work.

    There might me some reg keys pertaining to what you want.

  4. #4
    Registered User cyberCLoWn's Avatar
    Join Date
    Dec 2003
    Location
    South Africa
    Posts
    124
    Sounds like an incredible mission. Surely there's some way of going about this, as there are lots of commercial apps that can update through a proxy etc.

  5. #5
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    You could monitor IE with this while changing the proxy settings. You might find a key(s) that way.

  6. #6
    Registered User
    Join Date
    Aug 2006
    Posts
    68
    Actually I've been experimenting with the IE registry (especially with proxy handling) and I wrote down the key needed:

    Code:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
    The REG_SZ "ProxyServer" defines the Proxy server as an "address:port" type, the REG_DWORD "ProxyEnable" is set to 1 if the proxy is enabled in IE (0 otherwise).

  7. #7
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Quote Originally Posted by Hawkin View Post
    Actually I've been experimenting with the IE registry (especially with proxy handling) and I wrote down the key needed:

    Code:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
    The REG_SZ "ProxyServer" defines the Proxy server as an "addressort" type, the REG_DWORD "ProxyEnable" is set to 1 if the proxy is enabled in IE (0 otherwise).
    If you call InternetOpen with INTERNET_OPEN_TYPE_PRECONFIG, WinINet will use these values, as explained in 'setting access types'.

    You can set the proxy username and password using InternetSetOption as explained in 'proxy authentication'.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Reverse Engineering on a Download file
    By c_geek in forum C Programming
    Replies: 1
    Last Post: 03-22-2008, 03:15 PM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  5. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM