Revolution - firewall - httpProxy

Dave Cragg dcragg at lacscentre.co.uk
Thu Aug 29 18:31:01 EDT 2002


At 3:09 pm -0400 29/8/02, Roger.E.Eller at sealedair.com wrote:
>Hello,
>
>Has anyone used Rev to access the internet from behind a firewall?  What is
>the proper way to pass a firewall username/password combination so the
>firewall will not complain?

Be warned, I've used proxy servers, but never ones that required 
authentication.  But I read about it. :) (in rfc 2616 and rfc 2617)

First, you will need to set the httpProxy property to your proxy 
server's address:

set the httpProxy to 192.1xx.xxx.xxx:80 ##or whatever

Then you should try setting a Proxy-Authorization header using the 
httpHeaders property. This header field looks something like this:

Proxy-Authorization: Basic encodedString

The encoded string is made up the username and password separated by 
a colon, and then the whole lot is base64encoded. So you would do 
something like:

put myUserName & ":" & myPassword into tAuthString
put base64Encode(tAuthString) into tEncString
put "Proxy-Authorization: Basic" && tEncString into tHeader
set the httpHeaders to tHeader

Then try doing the regular thing:

get url "http://www.runrev.com/index.html"

If that doesn't work, try again, this time without setting the 
Proxy-Authorization header (but do set the httpProxy). This time, 
check the result function after the get url call. Hopefully it will 
look something like this:

error 407 Proxy-Authorization required

If so, use the libUrlLastRhHeaders() function, and it should give you 
information about the authorization scheme. At that point, you could 
look at one of the rfc's above to see what it means. Or get back to 
the list.

If the result returned something different...  well let us know, or 
perhaps find out more about the authorization scheme from someone who 
looks after the proxy server.

Hopefully, it will just involve setting the httpHeaders property appropriately.

Good luck!

Dave



More information about the use-livecode mailing list