Apr 13, 2009 4:03 PM
What are exact calling conditions for TURN proxy?
-
Like (0)
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
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
Pls find attached the log from a test session using a manipulated version of reSIProcate1.4.
I switched off the fallback in my app to FMS, so I wait more than long enough
The config is one with two client behind the same Cone NAT, one that normally let's me work with Flash 10 / Stratus with no problems.
To simulate my customer situation I blocked internal UDP traffic from one machine to the other as follows:
sudo ipfw -q add deny udp from 192.168.0.100 to 192.168.0.101
I just assume that it is perfectly OK by design if only one side uses the proxy, the other not.
The ip addresses are as follows:
84.27.132.206 - my public IP, hiding both of my clients
76.74.170.60 - one of the Stratus servers
Do you see anything in particular that I could change to make this work?
- Frans
And I did an experiment whereby both clients have a TURN proxy configured in mms.cfg.
You indeed now see both machines in the TURN server log, but still no comms.
- Frans
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]
I solved the bugs: magic cookie was tested and created in reversed order, and code made assumption that channelbind call was done, but Flash uses Send and Data Indications. Everything works perfect now.
And of course my next question now is: is there any other way we can configure the proxy name sowhere is the api? I haven't found it, and you haven't suggested it, but still want to give it a try.
We now have to bother end users as well as their IT support. It would be ideal if we could fully control this from the app.
- Frans
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?
Unfortunately not!
there is no API to configure the RTMFP TURN proxy. it can only be set in mms.cfg.
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.
You can't pass userid from Flash. I had to patch authentication out in 1.5. I can deliver patch file if you wish. Did not check 1.6 yet. No plan to do so soon.
Thank you so much, yes please send me the patch file and I will try to see if it can work for 1.6.
Pls send mail addres. Rather not send via forum.
I sent my email address tofmaas@incontext.nl, thanks again
email address deleted
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
Copyright © 2011 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).