HTTP proxies

Trevor DeVore lists at mangomultimedia.com
Tue Aug 20 14:26:00 EDT 2013


On Tue, Aug 20, 2013 at 1:22 PM, Devin Asay <devin_asay at byu.edu> wrote:

> I am a neophyte when it comes to proxy servers. My application phones home
> on occasion via HTTP requests (mostly GET but some PUT) to get content
> update updates and such. One user has reported that this fails because the
> application isn't set up to use his university's proxy server.
>
> I found the HTTPProxy property in the dictionary. Is it sufficient to give
> users a way in my application to enter their HTTP proxy server address?
> This is also a point of confusion to me. I thought that the HTTP proxy was
> an OS setting that users set up when setting their network settings. Can
> anyone point me in the right direction?
>

Ah, proxy servers. When it comes to proxy servers, what will work is highly
dependent on how the proxy server is set up. Here are a couple of scenarios
to consider. I have come across all of them while working with customers.

1) The user has a predefined proxy IP address stored in the OS. No
authentication required.

2) The user has a predefined proxy IP address with a username/password that
they need to enter. The proxy server might use Basic or Digest
authentication.

3a) The proxy server is determined by a PAC file that lives on their
internal network. This PAC file is javascript that determines which proxy
server should be used based on the URL that is being requested.

3b) You might have to find a PAC file on the network using the WPAD
detection protocol.

4) NTLM authentication may be required in which case you need an external
to handle the various handshakes between proxy server and your app.

In addition, if you are requesting urls using https then you need support
for the CONNECT protocol. libURL does not support this but curl does (if
you have a binary that was compiled correctly).

So basically proxy servers are a major pain to deal with.

If the user is behind a static proxy server IP address then you could
create a dialog allowing them to enter that address. If the proxy needs a
username/password then you also have to determine the auth type (e.g.
Basic, Digest, …).

For PAC files it becomes more complicated as does NTLM.

The GLX App Framework has a version of libURL that can support everything
except for https connections through proxy servers (NTLM is handled by an
external That Chipp and Chris provided). I've had to resort to a custom
version of libURL built around curl for CONNECT support, but that isn't
publicly available.

If you download the latest GLX Application Framework code then you can get
to the internet library and the routines for processing PAC/finding PAC (in
the glxappFramework stack file).

Here are some docs I have for it:

http://www.bluemangolearning.com/revolution/docs/glxapp_framework/api_docs/Documents/stack_glxapplicationFramework_package_10810598858276329711010032801141111201213283117112112111114116.htm

http://revolution.screenstepslive.com/s/revolution/m/glxapp/c/1950

-- 
Trevor DeVore
Blue Mango Learning Systems
www.clarify-it.com    -    www.screensteps.com



More information about the use-livecode mailing list