| 
 | 1 | +# Debugging ICE Connections Using Pion/TURN  | 
 | 2 | + | 
 | 3 | +This guide is designed to help you test your STUN/TURN connectivity using [Pion/TURN](https://github.com/pion/turn/tree/master/examples).  | 
 | 4 | + | 
 | 5 | +This guide is broken up into the following steps:  | 
 | 6 | + | 
 | 7 | +1. Setting up Pion/TURN Server on your cloud machine  | 
 | 8 | + | 
 | 9 | +2. Run a ICE Trickle test using your fresh new Pion/TURN server details  | 
 | 10 | + | 
 | 11 | +3. Ping your Pion/TURN using the Pion/TURN client ping utility  | 
 | 12 | + | 
 | 13 | +## 1. Setting up Pion/TURN on your cloud instance  | 
 | 14 | + | 
 | 15 | +1. Log into your cloud Instance  | 
 | 16 | + | 
 | 17 | +2. Download and unzip your relevant OS folder from [here](https://github.com/pion/turn/releases/tag/v2.0.2)  | 
 | 18 | + | 
 | 19 | +3. Open cmd in directory and run:  | 
 | 20 | + | 
 | 21 | +`turn-server-simple.exe -public-ip $INSTANCE_PUBLIC_IP -users username=password`  | 
 | 22 | + | 
 | 23 | +## 2. Setting up Ice Trickle Test  | 
 | 24 | + | 
 | 25 | +1. To set up ice trickle test for new custom turn server, head to: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/  | 
 | 26 | + | 
 | 27 | +2. Click Remove server to clear the current default  | 
 | 28 | + | 
 | 29 | +3. Enter the following into the relevant fields:   | 
 | 30 | + | 
 | 31 | + * Enter turn:publicip:port in the TURN URI category  | 
 | 32 | + * Enter "username" in username field  | 
 | 33 | + * Enter "password" in password field  | 
 | 34 | + | 
 | 35 | +4. Click add server.  | 
 | 36 | + | 
 | 37 | +5. Click "Gather candidates"  | 
 | 38 | + | 
 | 39 | +6. Successful results will show "Relay candidates"   | 
 | 40 | + | 
 | 41 | + | 
 | 42 | +## 3. Ping your TURN server  | 
 | 43 | + | 
 | 44 | +1. Unzip the same files from the instance on your local machine  | 
 | 45 | + | 
 | 46 | +2. Open cmd in the directory  | 
 | 47 | + | 
 | 48 | +3. Run the following command:  | 
 | 49 | + | 
 | 50 | +`turn-client-udp.exe -host $INSTANCE_PUBLIC_IP -user=username=password -ping`  | 
 | 51 | + | 
 | 52 | +4. Successful ping will show standard ping output (e.g. Reply from IP)  | 
 | 53 | + | 
 | 54 | +For more details about additional commands you can run, please see the provider page here:  | 
 | 55 | + | 
 | 56 | +https://github.com/pion/turn/tree/master/examples   | 
0 commit comments