Need help on proxy with username and password

Dave Cragg dcragg at lacscentre.co.uk
Wed Sep 14 02:23:42 CDT 2005


On 14 Sep 2005, at 03:59, Tariel Gogoberidze wrote:

> Hi,
>
> I'm posting in hope that Dave Gragg may read this and give me a tip.
>
> We received the following letter from one of our potential clients  
> ("CyberaRat" is one of our products)
>
> --------------
> We have received a copy of Cyberrat for evaluation but we are  
> having problems connecting to your server.
> I have “told” Cyberrat of the existence of our proxy server by  
> entering the URL (wwwZZZZ.ex.ac.uk) and the port number (8080).
> However, our proxy server is expecting a username and password to  
> be passed to it.
> Is there any way we can enter these values?
> Many thanks
>             ZZZZ
>
> School of Psychology
> University of ZZZZZ
> ----------------
>
> I believe LibURL should be able to handle proxy which requires  
> username / password
>
> <http://support.runrev.com/resources/liburlrealdocs.html>
>
> I'm just short in time and if possible want to avoid trial and  
> error exchange with this client (I don't have proxy installed on  
> any of my computers and I hate to do this just for this case).  So,  
> if somebody has an example stack or handler to share I would really  
> appreciate this.

You'll need to use the libUrlSetAuthCallback routine:

    http://support.runrev.com/resources/ 
liburlrealdocs.html#libUrlSetAuthCallback

The entry at the above url has an example of a callback handler that  
will work for the *Basic* authentication scheme. It's not very  
elegant, using the standard ask dialog twice, first for user name and  
second for password. But that part can be easily changed to obtain  
the name and password.

However, you'll need to check with the client what authentication  
schemes are supported. Not all corporates support the Basic scheme,  
and NTLM is common in Windows shops. If the person you ask does not  
have this information, it may be difficult to avoid the "trial and  
error exchange".

I have a stack that implements Basic and NTLM proxy authentication.  
However, it uses a third party dll for the NTLM stuff, and I'll have  
to check with the author before distributing it. I'll get back to you  
on this.

Cheers for now
Dave


More information about the metacard mailing list