Browse Source

working on SCTP

mom040267 10 years ago
parent
commit
7d5ab2472a
3 changed files with 37 additions and 1 deletions
  1. 2 1
      INSTALL
  2. 34 0
      examples/scripts/longtermsecure/secure_sctp_client.sh
  3. 1 0
      rpm/turnserver.spec

+ 2 - 1
INSTALL

@@ -594,6 +594,7 @@ In shell number 3, run secure test client application:
  (or ./scripts/longtermsecure/secure_tcp_client.sh)
  (or ./scripts/longtermsecure/secure_tls_client.sh)
  (or ./scripts/longtermsecure/secure_dtls_client.sh)
+ (or ./scripts/longtermsecure/secure_sctp_client.sh)
  (or ./scripts/longtermsecure/secure_udp_c2c.sh for "peerless" 
 client-to-client communications)
 
@@ -1196,7 +1197,7 @@ XXV. SCTP support
 
 Starting with version 4.4.3.1, the TURN server supports 'native' SCTP.
 On the client side, the TURN server, additionally, supports SCTP and 
-TLS-over-SCTP. 
+TLS-over-SCTP.
 
 The relay side is not changing - the relay communications will still be UDP
 or TCP.

+ 34 - 0
examples/scripts/longtermsecure/secure_sctp_client.sh

@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# This is an example of a script to run a "secure" TURN TLS client
+# with the long-term credentials mechanism.
+#
+# Options:
+#
+# 1) -b is present, it means that SCTP networking is used.
+# 2) -S means "SSL/TLS protocol with default cipher" will be used over SCTP.
+# 3) -i absent.
+# 4) -k sets private key file for TLS.
+# 5) -n 1000 means 1000 messages per single emulated client. Messages
+# are sent with interval of 20 milliseconds, to emulate an RTP stream.
+# 6) -m 10 means that 10 clients are emulated.
+# 7) -l 170 means that the payload size of the packets is 170 bytes 
+# (like average audio RTP packet).
+# 8) -e 127.0.0.1 means that the clients will use peer address 127.0.0.1.
+# 9) -g means "set DONT_FRAGMENT parameter in TURN requests".
+# 10) -u gorst means that if the server challenges the client with 
+# authentication challenge, then we use account "gorst".
+# 11) -w hero sets the password for the account as "hero".
+# 12) -s option means that the client will be using "send" mechanism for data.
+# 13) ::1 (the last parameter) is the TURN Server IP address. We use IPv6 here
+# to illustrate how the TURN Server convert the traffic from IPv6 to IPv4 and back.
+#
+
+if [ -d examples ] ; then
+       cd examples
+fi
+
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/
+
+PATH=examples/bin/:../bin:./bin/:${PATH} turnutils_uclient -t -S -k turn_client_pkey.pem -n 1000 -m 10 -l 170 -e 127.0.0.1 -X -g -u gorst -w hero $@ ::1
+

+ 1 - 0
rpm/turnserver.spec

@@ -228,6 +228,7 @@ fi
 %{_datadir}/%{name}/scripts/longtermsecure/secure_tls_client_c2c_tcp_relay.sh
 %{_datadir}/%{name}/scripts/longtermsecure/secure_udp_c2c.sh
 %{_datadir}/%{name}/scripts/longtermsecure/secure_udp_client.sh
+%{_datadir}/%{name}/scripts/longtermsecure/secure_sctp_client.sh
 %dir %{_datadir}/%{name}/scripts/longtermsecuredb
 %{_datadir}/%{name}/scripts/longtermsecuredb/secure_relay_with_db_mysql.sh
 %{_datadir}/%{name}/scripts/longtermsecuredb/secure_relay_with_db_mysql_ssl.sh