Skip navigation
Home/Support/

Forums

2622 Views 15 Replies Latest reply: Sep 8, 2010 2:45 PM by Meijuan Yin RSS
fmaas@incontext.nl Calculating status... 35 posts since
Jan 5, 2009
Currently Being Moderated

Apr 13, 2009 4:03 PM

What are exact calling conditions for TURN proxy?

Hi,

 

I have continued exploring how to set up a TURN proxy.

I am using reSIProcate.1.4 as a starting point.

Now I have deployed this product on a server, specified RTMFPTURNProxy=ip-addr in mm.cfg, and blocked outbound UDP to the peer I am talking to.

Now, I don't see any attempt of my app to visit the proxy.

I am using Wireshark to monitor the network.

What could be the reason?

Under what conditions will Flash 10 attempt to access peer via the proxy?

I am now working in the blind... please give me some clue. Thanks.

 

- Frans

  • Michael Thornburgh Adobe Employee 646 posts since
    Jul 4, 2008

    the most important thing is it's mms.cfg, not mm.cfg.  be sure you have the file in the correct location for your platform (for example, on the Mac it's "/Library/Application Support/Macromedia/mms.cfg").  this file is only read when Flash Player starts up.  you may need to quit your web browser and restart it to ensure the file has been re-read.

     

    if RTMFPTURNProxy is defined in your mms.cfg file, then Flash Player will attempt to open a connection to the TURN proxy when you create a NetConnection and connect it to an RTMFP URI, so if you have it configured correctly you should see traffic immediately.  the TURN proxy then becomes an additional, remote interface for the NetConnection (in addition to your local IPv4 and IPv6 network interfaces).  connections to the server and to peers are tried simultaneously through all available interfaces.  typically, if a local interface can work, it will win the race.  if they can't work, then the TURN interface will probably succeed eventually.  Flash Player 10.0 adds an extra delay to the TURN interface to try to give more of a chance for the local interface(s) to work.  however, we've found this behavior to mostly be undesirable, so the artificial delay may be changed or removed in a future release.

     

    -mike

  • Michael Thornburgh Adobe Employee 646 posts since
    Jul 4, 2008

    in the log, i see entries that look like (trimming some stuff out):

     

     

    Received stun message: 104 bytes

    stun magic cookie not found.

    Turn Remote Address = 76.74.170.78:10000

    Successfully parsed StunMessage: STUN Indication: Send, id 1111804880114189070411418907041-17104569751

    TurnAllocation sendDataToPeer: clientLocal=[UDP 0.0.0.0:3478] clientRemote=[UDP 84.27.132.206:51033] requested=[UDP 0.0.0.0:49152] peerAddress=[UDP 76.74.170.78:10000]

     

    this is a TURN send indication, which makes a UDP packet get sent.  in this case, it's sending to 76.74.170.78:10000.  as of TURN draft 8, sending a packet like this is supposed to enable a return permission, so that packets coming from that "peer address" will be allowed back to the TURN client.  however, almost immediately after this send indication in the log file, you'll see

     

    Read 52 bytes from udp relay socket (76.74.170.78:10000):
    sendDataToClient RemotePeer info not found - discarding data: clientLocal=[UDP 0.0.0.0:3478] clientRemote=[UDP 84.27.132.206:51033] requested=[UDP 0.0.0.0:49152] peerAddress=[UDP 76.74.170.78:10000]

     

    so even though it just sent data to that address and is getting back a reply, AND it can look up the TURN client, it doesn't think it's seen anything from that address before, so it discards this packet rather than relaying it to the client (Flash Player).
    that and complaining about "stun magic cookie not found" is bogus.  i'm looking at the source code and a packet dump right now, and we're sending the "STUN magic cookie" from RFC 5389 (0x2112a442 in network byte order) just as it was defined for TURN draft 8.
    it feels like there are bugs in that TURN server.

     

    -mike
  • remoteitservices Calculating status... 10 posts since
    Jul 30, 2010

    Did you ever find out where we can configure the proxy name sowhere in the api? I don`t whant to bother users to edit their mms.cfg

     

    Maybe someone else?

  • Michael Thornburgh Adobe Employee 646 posts since
    Jul 4, 2008

    there is no API to configure the RTMFP TURN proxy.  it can only be set in mms.cfg.

  • Meijuan Yin Calculating status... 10 posts since
    May 22, 2009

    I'm using Resiprocate 1.6 and I set RTMFPTURN proxy, and I changed ReturnConfig.cxx  mAuthenticationMode(LogTermPassword) to NoAuthentication because I found that flash player support draft-08 without authentication, but I still kept getting "WARNING | 20100908-102816.647 | reTurnServer | RETURN | 3081141136 | RequestHandler.cxx:480 | Turn allocate request without authentication.  Sending 401.
    ". From mms.cfg I only can set the RTMFPproxy,  I don't know how I can set  username("test") from flash. Thanks a lot.

  • Meijuan Yin User 10 posts since
    May 22, 2009

    Thank you so much, yes please send me the patch file and I will try to see if it can work for 1.6.

  • Meijuan Yin User 10 posts since
    May 22, 2009

    I sent my email address tofmaas@incontext.nl, thanks again

  • Meijuan Yin User 10 posts since
    May 22, 2009

    email address deleted

  • Meijuan Yin User 10 posts since
    May 22, 2009

    I tried to modify the requestHandler.cxx to set the username and password, now when my flex app connects to reTurn, it won't give me that error. But I got new error "Segmentation fault"  from ./reTurnServer x.x.x.x 3478 5349 x.x.x.x 3479 when flash app connected to it

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points