Help: Using Wininet with an FTP Proxy that requires Authentication 
Author Message
 Help: Using Wininet with an FTP Proxy that requires Authentication

Help!!  I am trying to write an FTP client that will go through an FTP
Proxy that requires a username and a password.  My FTP client is written
(in C) using the WININET.DLL.  My FTP Proxy (it happens to be a Trusted
Information Systems brand) requires the following FTP commands:

USER proxyusername
PASS proxypassword

PASS destpassword

If I tell InternetOpen I have a proxy, then I do the InternetConnect,
Wininet sends only the second user/password sequence

work (but not how mine works).  I tried setting the
INTERNET_OPTION_PROXY_USERNAME and INTERNET_OPTION_PROXY_PASSWORD on the
handle returned from InternetOpen, but that didn't seem to have any
affect.  Has anyone tried that and gotten it to work with an FTP proxy?

If I tell InternetOpen I do not have a proxy, and then do the
InternetConnect to the proxy (not the destination), then I can log in to
the proxy with the proper proxyusername and proxypassword.  However, I
can't figure out how to send a second USER/PASS sequence.  There was
once an FtpCommand in the API, but that seems to have disappeared.  Does
anyone know where it went?  Does anyone know how to send raw commands to
an FTP server, given an InternetConnect handle?  Is it possible to
obtain the WinSocket handle from the InternetConnect handle, and do a
WinSocket send()?  Is there a WININET command to send a USER/PASS
sequence (to change the current user)?

I'll buy you a beer if you help me :-).




Sat, 05 Feb 2000 03:00:00 GMT  
 Help: Using Wininet with an FTP Proxy that requires Authentication


Quote:
> Help!!  I am trying to write an FTP client that will go through an FTP
> Proxy that requires a username and a password.  My FTP client is written
> (in C) using the WININET.DLL.  My FTP Proxy (it happens to be a Trusted
> Information Systems brand) requires the following FTP commands:

> USER proxyusername
> PASS proxypassword

> PASS destpassword

> If I tell InternetOpen I have a proxy, then I do the InternetConnect,
> Wininet sends only the second user/password sequence

> work (but not how mine works).  I tried setting the
> INTERNET_OPTION_PROXY_USERNAME and INTERNET_OPTION_PROXY_PASSWORD on the
> handle returned from InternetOpen, but that didn't seem to have any
> affect.  Has anyone tried that and gotten it to work with an FTP proxy?

I believe the wininet that comes with IE4 supports this though I
don't know if it actually works. You might try the newsgroup:

microsoft.public.inetsdk.programming.wininet

There's an MS guy in there who answers many of the posted
questions and has been quite helpful.

Rich



Sat, 05 Feb 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help: Using Wininet with an FTP Proxy that requires Authentication

2. WinInet API/MFC FTP via Proxy Server (Help!)

3. Proxy Authentication Required.

4. How to ...Create a proxy server using wininet classes

5. hostname not resolved using ftp and wininet.dll

6. FTP and sockets (not using WinInet)?

7. FTP and sockets (not using WinInet)?

8. FTP without using WinInet

9. FTP using wininet.h

10. Help me!! Proxy (FTP)

11. HELP!: MFC FTP Connection via proxy server

12. Proxy Authentication

 

 
Powered by phpBB® Forum Software