coturn: initial commit, version 4.6.2
This commit is contained in:
parent
657fcc6f92
commit
fe4bc23d9f
130
coturn/.footprint
Normal file
130
coturn/.footprint
Normal file
@ -0,0 +1,130 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/turnserver
|
||||
drwx------ root/root etc/turnserver/
|
||||
-rw-r--r-- root/root etc/turnserver/turnserver.conf
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/turnadmin
|
||||
-rwxr-xr-x root/root usr/bin/turnserver
|
||||
-rwxr-xr-x root/root usr/bin/turnutils_natdiscovery
|
||||
-rwxr-xr-x root/root usr/bin/turnutils_oauth
|
||||
-rwxr-xr-x root/root usr/bin/turnutils_peer
|
||||
-rwxr-xr-x root/root usr/bin/turnutils_stunclient
|
||||
-rwxr-xr-x root/root usr/bin/turnutils_uclient
|
||||
drwxr-xr-x root/root usr/include/
|
||||
drwxr-xr-x root/root usr/include/turn/
|
||||
drwxr-xr-x root/root usr/include/turn/client/
|
||||
-rw-r--r-- root/root usr/include/turn/client/TurnMsgLib.h
|
||||
-rw-r--r-- root/root usr/include/turn/client/ns_turn_ioaddr.h
|
||||
-rw-r--r-- root/root usr/include/turn/client/ns_turn_msg.h
|
||||
-rw-r--r-- root/root usr/include/turn/client/ns_turn_msg_addr.h
|
||||
-rw-r--r-- root/root usr/include/turn/client/ns_turn_msg_defs.h
|
||||
-rw-r--r-- root/root usr/include/turn/client/ns_turn_msg_defs_experimental.h
|
||||
-rw-r--r-- root/root usr/include/turn/ns_turn_defs.h
|
||||
drwxr-xr-x root/root usr/lib/
|
||||
-rw-r--r-- root/root usr/lib/libturnclient.a
|
||||
drwxr-xr-x root/root usr/share/
|
||||
drwxr-xr-x root/root usr/share/doc/
|
||||
drwxr-xr-x root/root usr/share/doc/turnserver/
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/INSTALL
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/LICENSE
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/README.turnadmin
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/README.turnserver
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/README.turnutils
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/postinstall.txt
|
||||
-rwxr-xr-x root/root usr/share/doc/turnserver/schema.mongo.sh
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/schema.sql
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/schema.stats.redis
|
||||
-rw-r--r-- root/root usr/share/doc/turnserver/schema.userdb.redis
|
||||
drwxr-xr-x root/root usr/share/man/
|
||||
drwxr-xr-x root/root usr/share/man/man1/
|
||||
-rw-r--r-- root/root usr/share/man/man1/coturn.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnadmin.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnserver.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnutils.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnutils_natdiscovery.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnutils_oauth.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnutils_peer.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnutils_stunclient.1.gz
|
||||
-rw-r--r-- root/root usr/share/man/man1/turnutils_uclient.1.gz
|
||||
drwxr-xr-x root/root usr/share/turnserver/
|
||||
drwxr-xr-x root/root usr/share/turnserver/examples/
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/etc/
|
||||
lrwxrwxrwx root/root usr/share/turnserver/examples/etc/cacert.pem -> ../ca/CA/cacert.pem
|
||||
-rw-r--r-- root/root usr/share/turnserver/examples/etc/coturn.service
|
||||
lrwxrwxrwx root/root usr/share/turnserver/examples/etc/turn_client_cert.pem -> ../ca/turn_client_cert.pem
|
||||
lrwxrwxrwx root/root usr/share/turnserver/examples/etc/turn_client_pkey.pem -> ../ca/turn_client_pkey.pem
|
||||
lrwxrwxrwx root/root usr/share/turnserver/examples/etc/turn_server_cert.pem -> ../ca/turn_server_cert.pem
|
||||
lrwxrwxrwx root/root usr/share/turnserver/examples/etc/turn_server_pkey.pem -> ../ca/turn_server_pkey.pem
|
||||
-rw-r--r-- root/root usr/share/turnserver/examples/etc/turnserver.conf
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/dos_attack.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/tcp_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/tcp_client_c2c_tcp_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/udp_c2c_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/basic/udp_client.sh
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/loadbalance/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/loadbalance/master_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/loadbalance/slave_relay_1.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/loadbalance/slave_relay_2.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/loadbalance/tcp_c2c_tcp_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/loadbalance/udp_c2c.sh
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_dos_attack.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_dtls_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_dtls_client_cert.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_relay_cert.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_sctp_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_tcp_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_tcp_client_c2c_tcp_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_tls_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_tls_client_c2c_tcp_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_tls_client_cert.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_udp_c2c.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecure/secure_udp_client.sh
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/secure_relay_with_db_mongo.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/secure_relay_with_db_mysql.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/secure_relay_with_db_mysql_ssl.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/secure_relay_with_db_psql.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/secure_relay_with_db_redis.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/longtermsecuredb/secure_relay_with_db_sqlite.sh
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/mobile/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/mobile/mobile_dtls_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/mobile/mobile_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/mobile/mobile_tcp_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/mobile/mobile_tls_client_c2c_tcp_relay.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/mobile/mobile_udp_client.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/oauth.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/pack.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/peer.sh
|
||||
-rw-r--r-- root/root usr/share/turnserver/examples/scripts/readme.txt
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_relay_secret.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_relay_secret_with_db_mongo.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_relay_secret_with_db_mysql.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_relay_secret_with_db_psql.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_relay_secret_with_db_redis.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_relay_secret_with_db_sqlite.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/secure_udp_client_with_secret.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/restapi/shared_secret_maintainer.pl
|
||||
drwxrwxr-x root/root usr/share/turnserver/examples/scripts/selfloadbalance/
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/selfloadbalance/secure_dos_attack.sh
|
||||
-rwxrwxr-x root/root usr/share/turnserver/examples/scripts/selfloadbalance/secure_relay.sh
|
||||
-rwxr-xr-x root/root usr/share/turnserver/schema.mongo.sh
|
||||
-rw-r--r-- root/root usr/share/turnserver/schema.sql
|
||||
-rw-r--r-- root/root usr/share/turnserver/schema.stats.redis
|
||||
-rw-r--r-- root/root usr/share/turnserver/schema.userdb.redis
|
||||
-rwxr-xr-x root/root usr/share/turnserver/testmongosetup.sh
|
||||
-rwxr-xr-x root/root usr/share/turnserver/testredisdbsetup.sh
|
||||
-rw-r--r-- root/root usr/share/turnserver/testsqldbsetup.sql
|
||||
drwxr-xr-x root/root var/
|
||||
drwxr-xr-x root/root var/db/
|
||||
drwxr-xr-x root/root var/lib/
|
||||
drwx------ coturn/coturn var/lib/coturn/
|
||||
drwxr-xr-x root/root var/log/
|
||||
drwxr-x--- coturn/root var/log/turnserver/
|
6
coturn/.signature
Normal file
6
coturn/.signature
Normal file
@ -0,0 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF34AliJZmK2hh8TZZ1xLq4iDkYeCrxpNz3nswnWTQhkfVLA1BCsfV1k4jemPcauOrOmSVNaAa+rkftJdWEvI2PQE=
|
||||
SHA256 (Pkgfile) = fab1e6ce1cd504d696305d7d66b8a31803cecf436dd84827f6f3cc5680f8a962
|
||||
SHA256 (.footprint) = 037c026df0fe5b6f240bb652ff47bef24e7565d2bae8d75a951e5fabb17a0c39
|
||||
SHA256 (coturn-4.6.2.tar.gz) = 13f2a38b66cffb73d86b5ed24acba4e1371d738d758a6039e3a18f0c84c176ad
|
||||
SHA256 (turnserver.service) = ef8fbb04dad78a51d2d0a6816dda3b6c824065a4e59541852c73012d96a60bd9
|
41
coturn/Pkgfile
Normal file
41
coturn/Pkgfile
Normal file
@ -0,0 +1,41 @@
|
||||
# Description: coturn TURN server project
|
||||
# URL: https://github.com/coturn/coturn
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: libevent
|
||||
# Optional: hiredis libmicrohttpd mariadb postgresql sqlite3
|
||||
|
||||
name=coturn
|
||||
version=4.6.2
|
||||
release=2
|
||||
source=(https://github.com/coturn/coturn/archive/$version/$name-$version.tar.gz
|
||||
turnserver.service)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
export CFLAGS="$CFLAGS -ffat-lto-objects"
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--manprefix=/usr/share \
|
||||
--examplesdir=/usr/share/turnserver/examples \
|
||||
--disable-rpath
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
install -dm 700 $PKG/etc/turnserver
|
||||
|
||||
mv $PKG/{usr/etc/turnserver.conf.default,etc/turnserver/turnserver.conf}
|
||||
sed \
|
||||
-e '/^#log-file=\/var\/tmp\/turn.log$/c log-file=\/var\/log\/turnserver\/turn.log' \
|
||||
-e '/^#pidfile="\/var\/run\/turnserver.pid"$/c pidfile=\/run\/turnserver\/turnserver.pid' \
|
||||
-i $PKG/etc/turnserver/turnserver.conf
|
||||
rmdir $PKG/usr/etc
|
||||
rm -rf $PKG/var/db/turndb
|
||||
|
||||
find $PKG/{etc,usr/include,usr/lib,usr/share,var} -type f ! -name '*.sh' ! -name '*.pl' -exec chmod 644 {} +
|
||||
|
||||
setcap 'cap_net_bind_service=+ep' $PKG/usr/bin/turnserver
|
||||
install -dm 750 -o coturn -g root $PKG/var/log/turnserver
|
||||
install -dm 700 -o coturn -g coturn $PKG/var/lib/coturn
|
||||
install -Dm 755 $SRC/turnserver.service $PKG/etc/rc.d/turnserver
|
||||
}
|
9
coturn/pre-install
Executable file
9
coturn/pre-install
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
_USER=coturn
|
||||
_HOME=/var/lib/coturn
|
||||
_GROUP=coturn
|
||||
|
||||
/usr/bin/getent group $_GROUP > /dev/null 2>&1 || /usr/sbin/groupadd $_GROUP
|
||||
/usr/bin/getent passwd $_USER > /dev/null 2>&1 || /usr/sbin/useradd -c 'coturn system user' -g $_GROUP -d $_HOME -s /sbin/nologin $_USER
|
||||
passwd -l $_USER > /dev/null
|
44
coturn/turnserver.service
Normal file
44
coturn/turnserver.service
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/coturn: start/stop coturn daemon
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/bin/turnserver
|
||||
PIDFILE=/run/turnserver/turnserver.pid
|
||||
USER=coturn
|
||||
OPTS="-c /etc/turnserver/turnserver.conf --no-stdout-log --daemon --pidfile $PIDFILE"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
if [ ! -e /run/turnserver ]; then
|
||||
install -vdm 750 -o coturn -g root /run/turnserver
|
||||
fi
|
||||
$SSD --start -u $USER -c $USER --background --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop -u $USER --retry 10 --pidfile $PIDFILE --remove-pidfile
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status -u $USER --name turnserver --pidfile $PIDFILE
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(cat $PIDFILE)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PIDFILE exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|reload|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
Loading…
x
Reference in New Issue
Block a user