Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

WWW class and proxies

Discussion in 'Multiplayer' started by Flynn, Jun 18, 2012.

  1. Flynn

    Flynn

    Joined:
    May 24, 2009
    Posts:
    311
    I am a mac OSX user, and long story short.... Any Unity games I make will NOT route their WWW requests though my configured HTTP proxy. I'd like to use an interception proxy to see the exact data that my games are sending -- as an easier method of debugging issues. I've had a lot of issues with WWW in the past, and things would have been much faster if I could have simply used an interception proxy.


    The problem is, Unity doesn't seem to use my computer's configured HTTP proxy for it's WWW requests! I have successfully configured my computer to use a local interception proxy, and it works great for browsers and other sorts of applications. But any of Unity's WWW requests NEVER get routed through the interception proxy! I'm confused by this, but I suspect that Unity is manually opening a connection on port 80 to the websites it connects to. If this is the case, knowing how to configure my mac to use an interception proxy for socket communication as well would be nice.


    Thankyou!
    --Flynn
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Unity only supports proxies on the webplayer (where WWW is not handled by unity at all but the browsers HTTP pipe), it will in other cases not check the OS proxy settings and make use of it I fear as its an own TCP socket based implementation
     
  3. Flynn

    Flynn

    Joined:
    May 24, 2009
    Posts:
    311
    Ahah... Well, that would definitely cause issues. Is there any way for me to configure my computer to use an interception proxy with its TCP socket connections as well? I'll be googling for this, but if you know of any specific solutions off the top of your head, it would be greatly appreciated!
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    No you can't enforce it on os socket layer.
    you will either need to use an own solution, invest into the unity webrequest library on the asset store or use the System.Web HTTP request feature which should use proxies too but naturally in all those cases you lose the asset loading if that was your target.