slave_relay_2.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. #
  3. # This is an example of a SLAVE TURN server that accepts
  4. # the redirected requests.
  5. #
  6. # The TURN Server is started in
  7. # secure mode (when authentication is used) - see option -a
  8. # that means "use long-term credential mechanism".
  9. #
  10. # We start here a TURN Server listening on IPv4 address
  11. # 127.0.0.1. We use 127.0.0.1 as the relay address, too.
  12. #
  13. # Other options:
  14. #
  15. # 1) set bandwidth limit on client session 3000000 bytes per second (--max-bps).
  16. # 2) use fingerprints (-f)
  17. # 3) use 3 relay threads (-m 3)
  18. # 4) use min UDP relay port 20000 and max UDP relay port 29999
  19. # 5) "-r north.gov" means "use authentication realm north.gov"
  20. # 6) "--user=ninefingers:0xbc807ee29df3c9ffa736523fb2c4e8ee" means
  21. # "allow user 'ninefinger' with generated key '0xbc807ee29df3c9ffa736523fb2c4e8ee' ".
  22. # 7) "--user=gorst:hero" means "allow user 'gorst' with password 'hero' ".
  23. # 8) "--log-file=stdout" means that all log output will go to the stdout.
  24. # 9) "-v" means normal verbose mode (with some moderate logging).
  25. # 10) --no-dtls and --no-tls measn that we are not using DTLS & TLS protocols here
  26. # (for the sake of simplicity).
  27. # 11) -p 4444 means that we are using UDP & TCP listening port 4444.
  28. # Other parameters (config file name, etc) are default.
  29. if [ -d examples ] ; then
  30. cd examples
  31. fi
  32. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/:/usr/local/mysql/lib/
  33. export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/lib/:/usr/local/mysql/lib/
  34. PATH="./bin/:../bin/:../../bin/:${PATH}" turnserver --syslog -a -L 127.0.0.1 -E 127.0.0.1 --max-bps=3000000 -f -m 3 --min-port=20000 --max-port=29999 --user=ninefingers:0xbc807ee29df3c9ffa736523fb2c4e8ee --user=gorst:hero -r north.gov --log-file=stdout -v --no-dtls --no-tls -p 4444 --cli-port=5768 $@