iOS communication with http proxy

  • Hi,
      I have streaming radio application in AppStore. It works fine. Recently I got a problem reported by an user, application does not work,if the http proxy is configured.

    I am establishing the connection with streaming server directly from my application. I don't know how do the same with proxy server is configured.

    Please some one show me the direction how to work with proxy to establish the connection with streaming server.

    Thanks
    Sasikumar

    Sent from my iPad
  • On Sun, Jul 8, 2012 at 6:18 PM, Sasikumar JP <jpsasi...> wrote:
    > I am establishing the connection with streaming server directly from my application. I don't know how do the same with proxy server is configured.
    >
    > Please some one show me the direction how to work with proxy to establish the connection with streaming server.

    I don't know what the API is for finding the host and port that
    provide the proxy service that the user has configured.  Perhaps there
    is some way you could ferret it out by using WebKit to HTTP GET a
    small document from your streaming server, then looking into the info
    that's provided for that connection.

    The following search turned up some Internet Engineering Task Force
    Requests For Comments that, once you do know what the proxy host and
    port are, explain what the protocol is.

      http://www.google.com/search?q=site:ietf.org+http+proxy

    I would hope that other than directing your requests to the proxy
    rather than the destination host and port, it would work just like
    your direct connection, but maybe there is some reason it would be
    different:

      RFC 2068 Hypertext Transfer Protocol -- HTTP 1.1
      http://www.ietf.org/rfc/rfc2068.txt

      RFC 2145 Use and Interpretation of HTTP Version Numbers
      http://www.ietf.org/rfc/rfc2145.txt

      RFC 2817 Upgrading to TLS Within HTTP/1.1
      http://www.ietf.org/rfc/rfc2817.txt

      RFC 3040 Internet Web Replication and Caching Taxonomy
      http://www.ietf.org/rfc/rfc3040.txt

      RFC 3143 Known HTTP/Proxy Caching Problems
      http://tools.ietf.org/html/rfc3143

    How many of you are old enough to remember the ISO Networking Stack?
    It was *widely* advertised that ISO Networking would eventually become
    what the Internet was intended but failed to be, had those who created
    the Internet only fixed all the warts in the Internet Protocols before
    actually rolling them out to end-users.

    I'm a lot older than most of you, so quite likely very, very few of
    you are even aware that there ever was such a thing as the Seven-Layer
    ISO Networking Model.

    I have no doubt that's because, as some IETF engineer actually posted
    to Usenet back in the day, "the ISO people people know how to write".

    The RFC's are *specifically* meant for regular people to read,
    understand and put to good use.

    That's why the Internet is so wildly popular these days; it really has
    very little to do with anyone's Venture Backed Startup, Killer App
    Idea or Insanely Great Product.

      ----> Read.

      -----> Them.

      -----> Or.

      ----> Weep.

    I'll send you my bill in the mail.
    --
    Don Quixote de la Mancha
    Dulcinea Technologies Corporation
    Software of Elegance and Beauty
    http://www.dulcineatech.com/don-quixote/
    <quixote...>

    +1 (503) 928-7501
  • On Jul 8, 2012, at 6:18 PM, Sasikumar JP wrote:

    > I am establishing the connection with streaming server directly from my application. I don't know how do the same with proxy server is configured.

    What API do you use to connect to the server?

    Have you tried typing "proxy" into the Xcode documentation window's search field and looking for relevant results?
    Take a look at CFNetworkCopyProxiesForURL and kCFStreamPropertySOCKSProxy, to begin with.

    —Jens
  • On Jul 8, 2012, at 9:27 PM, Don Quixote de la Mancha wrote:

    > The following search turned up some Internet Engineering Task Force
    > Requests For Comments that, once you do know what the proxy host and
    > port are, explain what the protocol is.

    It's really not necessary to drop down to reinventing the code to access the protocols. There are system APIs for this stuff, I promise; the fact that most other iOS apps work with proxies should be a tip-off.

    I mean, it's like Foley & Van Dam is a great computer graphics textbook, but I'm not going to drop it in someone's lap when they ask how to rotate a Bezier curve, I'll just point them at NSAffineTransform.

    > How many of you are old enough to remember the ISO Networking Stack?

    I do (I'm about the same age as you, I just don't point it out as often), but I really fail to see what it could possibly have to do with the topic of this thread, other than as a stream-of-consciousness segue from those RFCs.

    > The RFC's are *specifically* meant for regular people to read, understand and put to good use.

    Regular people like my mom? I could point her at RFC822 next time she calls and tells me her email is broken, but I don't know if she'd put it to good use.

    I'd say they're meant for savvy programmers with experience with data structures and network programming. Many of them are well written and clear, but it varies. Try RFC4158 <http://tools.ietf.org/html/rfc4158.html> on for size sometime. *shiver*

    —Jens
previous month july 2012 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today