secure_udp_client.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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. #
  6. # Options:
  7. #
  8. # 1) -t is absent, it means that UDP networking is used.
  9. # 5) -n 1000 means 1000 messages per single emulated client. Messages
  10. # are sent with interval of 20 milliseconds, to emulate an RTP stream.
  11. # 6) -m 10 means that 10 clients are emulated.
  12. # 7) -l 170 means that the payload size of the packets is 170 bytes
  13. # (like average audio RTP packet).
  14. # 8) -e 127.0.0.1 means that the clients will use peer address 127.0.0.1.
  15. # 9) -g means "set DONT_FRAGMENT parameter in TURN requests".
  16. # 10) -u ninefingers means that if the server challenges the client with
  17. # authentication challenge, then we use account "ninefingers".
  18. # 11) -w youhavetoberealistic sets the password for the account as "youhavetoberealistic".
  19. # 12) -s option is absent - it means that the client will be using
  20. # the "channel" mechanism for data.
  21. # 13) ::1 (the last parameter) is the TURN Server IP address. We use IPv6 here
  22. # to illustrate how the TURN Server convert the traffic from IPv6 to IPv4 and back.
  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 -e 127.0.0.1 -X -g -u ninefingers -w youhavetoberealistic $@ ::1