3 Replies Latest reply on Mar 30, 2007 10:01 AM by peterent

    URL classes and HTTP proxies

    IonicRobin
      I've been using the URLLoader and URLStream classes in ActionScript 3.0 and wondered if these go via an HTTP proxy (if one is configured on the user's machine).

      More generally, does the flash player detect a user's proxy settings? and if so, can I access this information from actionscript?
        • 1. Re: URL classes and HTTP proxies
          peterent Level 2
          The Flash Player uses the browser's http(s) connection code. When the Player is instructed to go to some URL it hands that off to the browser because the browser is what is connected to the world. When the response comes back the browser calls the Player and gives it the information. If you've instructed the browser to use a proxy then it will. The Player doesn't know how the browser is doing its job.

          It is obviously more complex than that, but that's the general way it works.
          • 2. Re: URL classes and HTTP proxies
            IonicRobin Level 1
            Thanks Peter, this is interesting to know.
            I had assumed that the Flash player was making the connections itself (as it must, I guess, for the Socket and XMLSocket connections?).

            The reason I ask is that I am writing some code that needs a streaming two way connection between (flash) client and (linux/C++) server.

            I've been using a direct Socket connection, but there is the potential for firewall problems for our corporate clients, who generally only have ports 80 and 443 open (and often through a proxy).

            What I'd like to do is run it as a stream over port 443 (https), sending a CONNECT if there is a proxy in the way. However, in order to do that, I'd need to know if the browser was configured to use a proxy.

            Hope this clarifies.

            Robin
            • 3. Re: URL classes and HTTP proxies
              peterent Level 2
              You are still at the mercy of the browser. You might try our RTMP but I don't know if that's what you want. I remember reading somewhere in the Flash docs that you can use XMLSocket for low port numbers but I don't remember enough about it off the top of my head.