Question: How does one operate behind a proxy that requires you to login before connecting to the internet ? (Using a proxy that does not require a loginID/password is no problem)
A few months ago I posted a similar question and got a reply from Thomas Morgan. He sent me a file in from Squeak 2.1 that fixed the problem for me (I was running 2.2). I have not tried it with 2.3 though.
I've placed the file at:
http://www.cnd.co.nz/squeak/HTTP.12Nov921pm.cs
Thomas Morgan supplied it to me, so thank him for it, not me :-)
From his email message to me:
To use it:
"Set and clear proxy authentication credentials" " HTTPSocket clearProxyUserPassword. HTTPSocket useProxyServerNamed: 'proxy.yourdomain.com' port: 8080. HTTPSocket proxyUser: 'tmorgan' password: 'xxxxxxxx'"
" HTTPSocket stopUsingProxyServer "
You will find these code fragments in the 'examples' protocol, for the class methods of HTTPSockets, in the method:
proxyUserTestingComment
The main trick here can be seen in the method
proxyUser: userName password: password
in the 'proxy settings' protocol of HTTPSocket, class methods.
This method will show you what an authentication string looks like, and how it is encoded. Pretty neat that there was already a base 64 encoder in the image, eh?
I just tested these changes with 2.2 with the proxy at work, but please be careful; I haven't checked the small number of changes that I made to make this go with 2.2 as carefully as should be done.
Hope this helps, Chris.
squeak-dev@lists.squeakfoundation.org