secure_tcp_client_c2c_tcp_relay.sh 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. #
  3. # This is an example of a script to run a "secure" TURN TCP client
  4. # with the long-term credentials mechanism and with
  5. # TCP relay endpoints (RFC 6062).
  6. #
  7. # Options:
  8. #
  9. # 1) -T is present, it means that TCP networking is used, with TCP relay endpoints (RFC 6062).
  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 connect to the 'neighbor' clients, no peer app will be used.
  16. # 9) -g means "set DONT_FRAGMENT parameter in TURN requests".
  17. # 10) -u gorst means that if the server challenges the client with
  18. # authentication challenge, then we use account "gorst".
  19. # 11) -w hero sets the password for the account as "hero".
  20. # 12) 127.0.0.1 (the last parameter) is the TURN Server IP address. We use IPv4 here
  21. # to illustrate how the TURN Server convert the traffic from IPv6 to IPv4 and back.
  22. #
  23. if [ -d examples ] ; then
  24. cd examples
  25. fi
  26. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/
  27. PATH=examples/bin/:../bin/:./bin/:${PATH} turnutils_uclient -T -n 1000 -m 10 -l 170 -y -g -u gorst -w hero $@ 127.0.0.1