udp_c2c.sh 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. #
  3. # This is an example of a script to run a "secure" TURN UDP client
  4. # with the long-term credentials mechanism,
  5. # in client-to-client communication patter.
  6. #
  7. # Options:
  8. #
  9. # 1) -t is absent, it means that UDP networking is used.
  10. # 5) -n 1000 means 1000 messages per single emulated client. Messages
  11. # are sent with interval of 20 milliseconds, to emulate an RTP stream.
  12. # 6) -m 10 means that 10 clients are emulated.
  13. # 7) -l 170 means that the payload size of the packets is 170 bytes
  14. # (like average audio RTP packet).
  15. # 8) -y means that the clients will be connecting to each other and the peer will not be used.
  16. # 9) -g means "set DONT_FRAGMENT parameter in TURN requests".
  17. # 10) -u ninefingers means that if the server challenges the client with
  18. # authentication challenge, then we use account "ninefingers".
  19. # 11) -w youhavetoberealistic sets the password for the account as "youhavetoberealistic".
  20. # 12) -s option is absent - it means that the client will be using
  21. # the "channel" mechanism for data.
  22. # 13) 127.0.0.1 (the last parameter) is the TURN Server IP address.
  23. #
  24. if [ -d examples ] ; then
  25. cd examples
  26. fi
  27. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/
  28. PATH=examples/bin/:../bin/:./bin/:${PATH} turnutils_uclient -n 1000 -m 10 -l 170 -g -u ninefingers -w youhavetoberealistic -y $@ 127.0.0.1