Add coturn
This commit is contained in:
parent
7486254d3e
commit
839a1d2a56
1
Makefile
1
Makefile
|
@ -430,6 +430,7 @@ SUBDIR+= coreclr-git
|
|||
SUBDIR+= corefx-git
|
||||
SUBDIR+= corert-git
|
||||
SUBDIR+= cortex-var
|
||||
SUBDIR+= coturn
|
||||
SUBDIR+= courierpassd
|
||||
SUBDIR+= coverity-analysis-bin
|
||||
SUBDIR+= cowpatty
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
The TURN Server is a VoIP media traffic NAT traversal server
|
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: MESSAGE $
|
||||
===========================================================================
|
||||
|
||||
1) You can start and stop the turnserver manually. But, if you want
|
||||
to enable turnserver as an automatically started system service,
|
||||
you have to:
|
||||
|
||||
a) Create and edit ${PREFIX}/etc/turnserver.conf file.
|
||||
Use ${PREFIX}/etc/turnserver.conf.default as an example.
|
||||
|
||||
b) For user accounts settings: set up SQLite or PostgreSQL or
|
||||
MySQL or Redis database for user accounts.
|
||||
Use ${PREFIX}/share/doc/schema.sql as an SQL database schema,
|
||||
or use ${PREFIX}/share/doc/schema*redis as Redis database description.
|
||||
|
||||
If SQLite is used, then @VARBASE@/db/turndb is the default database
|
||||
location.
|
||||
|
||||
d) add line turnserver="YES" to /etc/rc.conf or /etc/rc.conf.local.
|
||||
|
||||
e) Restart the system or run the command:
|
||||
$ ${PREFIX}/etc/rc.d/turnserver start
|
||||
|
||||
2) If you do not want the turnserver to be a system service,
|
||||
then you can start/stop it "manually", using the "turnserver"
|
||||
executable with appropriate options (see the documentation).
|
||||
|
||||
3) To create database schema, use schema in file ${PREFIX}/share/doc/schema.sql.
|
||||
The TURN Server supports (optionally) SQLite, MySQL, PostgreSQL, Redis.
|
||||
|
||||
4) For additional information, run:
|
||||
|
||||
$ man turnserver
|
||||
$ man turnadmin
|
||||
$ man turnutils
|
||||
|
||||
===========================================================================
|
|
@ -0,0 +1,42 @@
|
|||
# $NetBSD$
|
||||
|
||||
DISTNAME= coturn-4.5.0.6
|
||||
CATEGORIES= net
|
||||
GITHUB_PROJECT= coturn
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=coturn/}
|
||||
EXTRACT_SUFX= .zip
|
||||
|
||||
MAINTAINER= kethzer.dr@gmail.com
|
||||
HOMEPAGE= https://github.com/coturn/coturn
|
||||
COMMENT= The TURN Server is a VoIP media traffic NAT traversal server
|
||||
LICENSE= citrix_ica-license
|
||||
|
||||
USE_LANGUAGES= c c++
|
||||
USE_LIBTOOL= yes
|
||||
|
||||
CONFIGURE_ENV+= PTHREAD_LIBS=-pthread TURN_DISABLE_RPATH=1
|
||||
CONFIGURE_ENV+= LIBEVENT_OPENSSL_CFLAGS="-I${BUILDLINK_PREFIX.libevent}/include"
|
||||
CONFIGURE_ENV+= LIBEVENT_OPENSSL_LIBS="-L${BUILDLINK_PREFIX.libevent}/lib -levent_openssl -levent"
|
||||
CONFIGURE_ENV+= LOCALSTATEDIR=/var
|
||||
CONFIGURE_ENV+= BINDIR=${PREFIX}/bin
|
||||
CONFIGURE_ENV+= LIBDIR=${PREFIX}/lib
|
||||
CONFIGURE_ENV+= CONFDIR=${PKG_SYSCONFDIR}
|
||||
CONFIGURE_ENV+= MANPREFIX=${PREFIX}
|
||||
CONFIGURE_ENV+= DOCSDIR=${PREFIX}/share/doc
|
||||
CONFIGURE_ENV+= INCLUDEDIR=${PREFIX}/include
|
||||
CONFIGURE_ENV+= EXAMPLESDIR=${PREFIX}/share/examples
|
||||
CONFIGURE_ENV+= TURNDBDIR=${PREFIX}/share/turnserver
|
||||
CONFIGURE_ENV+= TURNINCLUDEDIR=${PREFIX}/include/turn
|
||||
|
||||
INSTALLATION_DIRS+= bin include lib ${PKGMANDIR}/man1 share/doc share/examples/etc share/examples/scripts share/turnserver
|
||||
#CONF_FILES+= ${PREFIX}/etc/turnserver.conf.default
|
||||
#RCD_SCRIPTS= turnserver
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
HAS_CONFIGURE= yes
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
.include "../../devel/libevent/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -0,0 +1,97 @@
|
|||
@comment $NetBSD$
|
||||
bin/turnadmin
|
||||
bin/turnserver
|
||||
bin/turnutils_natdiscovery
|
||||
bin/turnutils_oauth
|
||||
bin/turnutils_peer
|
||||
bin/turnutils_stunclient
|
||||
bin/turnutils_uclient
|
||||
etc/turnserver.conf.default
|
||||
include/turn/client/TurnMsgLib.h
|
||||
include/turn/client/ns_turn_ioaddr.h
|
||||
include/turn/client/ns_turn_msg.h
|
||||
include/turn/client/ns_turn_msg_addr.h
|
||||
include/turn/client/ns_turn_msg_defs.h
|
||||
include/turn/client/ns_turn_msg_defs_experimental.h
|
||||
include/turn/ns_turn_defs.h
|
||||
lib/libturnclient.a
|
||||
man/man1/coturn.1
|
||||
man/man1/turnadmin.1
|
||||
man/man1/turnserver.1
|
||||
man/man1/turnutils.1
|
||||
man/man1/turnutils_natdiscovery.1
|
||||
man/man1/turnutils_oauth.1
|
||||
man/man1/turnutils_peer.1
|
||||
man/man1/turnutils_stunclient.1
|
||||
man/man1/turnutils_uclient.1
|
||||
share/doc/INSTALL
|
||||
share/doc/LICENSE
|
||||
share/doc/README.turnadmin
|
||||
share/doc/README.turnserver
|
||||
share/doc/README.turnutils
|
||||
share/doc/postinstall.txt
|
||||
share/doc/schema.mongo.sh
|
||||
share/doc/schema.sql
|
||||
share/doc/schema.stats.redis
|
||||
share/doc/schema.userdb.redis
|
||||
share/examples/etc/turn_client_cert.pem
|
||||
share/examples/etc/turn_client_pkey.pem
|
||||
share/examples/etc/turn_server_cert.pem
|
||||
share/examples/etc/turn_server_pkey.pem
|
||||
share/examples/etc/turnserver.conf
|
||||
share/examples/scripts/basic/dos_attack.sh
|
||||
share/examples/scripts/basic/relay.sh
|
||||
share/examples/scripts/basic/tcp_client.sh
|
||||
share/examples/scripts/basic/tcp_client_c2c_tcp_relay.sh
|
||||
share/examples/scripts/basic/udp_c2c_client.sh
|
||||
share/examples/scripts/basic/udp_client.sh
|
||||
share/examples/scripts/loadbalance/master_relay.sh
|
||||
share/examples/scripts/loadbalance/slave_relay_1.sh
|
||||
share/examples/scripts/loadbalance/slave_relay_2.sh
|
||||
share/examples/scripts/loadbalance/tcp_c2c_tcp_relay.sh
|
||||
share/examples/scripts/loadbalance/udp_c2c.sh
|
||||
share/examples/scripts/longtermsecure/secure_dos_attack.sh
|
||||
share/examples/scripts/longtermsecure/secure_dtls_client.sh
|
||||
share/examples/scripts/longtermsecure/secure_dtls_client_cert.sh
|
||||
share/examples/scripts/longtermsecure/secure_relay.sh
|
||||
share/examples/scripts/longtermsecure/secure_relay_cert.sh
|
||||
share/examples/scripts/longtermsecure/secure_sctp_client.sh
|
||||
share/examples/scripts/longtermsecure/secure_tcp_client.sh
|
||||
share/examples/scripts/longtermsecure/secure_tcp_client_c2c_tcp_relay.sh
|
||||
share/examples/scripts/longtermsecure/secure_tls_client.sh
|
||||
share/examples/scripts/longtermsecure/secure_tls_client_c2c_tcp_relay.sh
|
||||
share/examples/scripts/longtermsecure/secure_tls_client_cert.sh
|
||||
share/examples/scripts/longtermsecure/secure_udp_c2c.sh
|
||||
share/examples/scripts/longtermsecure/secure_udp_client.sh
|
||||
share/examples/scripts/longtermsecuredb/secure_relay_with_db_mongo.sh
|
||||
share/examples/scripts/longtermsecuredb/secure_relay_with_db_mysql.sh
|
||||
share/examples/scripts/longtermsecuredb/secure_relay_with_db_mysql_ssl.sh
|
||||
share/examples/scripts/longtermsecuredb/secure_relay_with_db_psql.sh
|
||||
share/examples/scripts/longtermsecuredb/secure_relay_with_db_redis.sh
|
||||
share/examples/scripts/longtermsecuredb/secure_relay_with_db_sqlite.sh
|
||||
share/examples/scripts/mobile/mobile_dtls_client.sh
|
||||
share/examples/scripts/mobile/mobile_relay.sh
|
||||
share/examples/scripts/mobile/mobile_tcp_client.sh
|
||||
share/examples/scripts/mobile/mobile_tls_client_c2c_tcp_relay.sh
|
||||
share/examples/scripts/mobile/mobile_udp_client.sh
|
||||
share/examples/scripts/oauth.sh
|
||||
share/examples/scripts/peer.sh
|
||||
share/examples/scripts/readme.txt
|
||||
share/examples/scripts/restapi/secure_relay_secret.sh
|
||||
share/examples/scripts/restapi/secure_relay_secret_with_db_mongo.sh
|
||||
share/examples/scripts/restapi/secure_relay_secret_with_db_mysql.sh
|
||||
share/examples/scripts/restapi/secure_relay_secret_with_db_psql.sh
|
||||
share/examples/scripts/restapi/secure_relay_secret_with_db_redis.sh
|
||||
share/examples/scripts/restapi/secure_relay_secret_with_db_sqlite.sh
|
||||
share/examples/scripts/restapi/secure_udp_client_with_secret.sh
|
||||
share/examples/scripts/restapi/shared_secret_maintainer.pl
|
||||
share/examples/scripts/selfloadbalance/secure_dos_attack.sh
|
||||
share/examples/scripts/selfloadbalance/secure_relay.sh
|
||||
share/turnserver/schema.mongo.sh
|
||||
share/turnserver/schema.sql
|
||||
share/turnserver/schema.stats.redis
|
||||
share/turnserver/schema.userdb.redis
|
||||
share/turnserver/testmongosetup.sh
|
||||
share/turnserver/testredisdbsetup.sh
|
||||
share/turnserver/testsqldbsetup.sql
|
||||
share/turnserver/turndb
|
|
@ -0,0 +1,7 @@
|
|||
$NetBSD$
|
||||
|
||||
SHA1 (coturn-4.5.0.6.zip) = 97c18ecb5d71aafd8ab311e6266a83b5a6e1635a
|
||||
RMD160 (coturn-4.5.0.6.zip) = db2944d57eb0a3ab63fe15575fef5f1396f4a580
|
||||
SHA512 (coturn-4.5.0.6.zip) = d24096f06bc1c3c69f73d2a582ae30fe619f5d045b21a156948fc36df2f7fee5f534157d38c4a7f3a3d7be63f2f8b21e8b7d235aca202803d289861ad24f6d8e
|
||||
Size (coturn-4.5.0.6.zip) = 533057 bytes
|
||||
SHA1 (patch-postinstall.txt) = 0369389fa3436f4da472ac6b00cbe8dffe48da6d
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: head/net/coturn/files/turnserver.sh
|
||||
#
|
||||
# PROVIDE: turnserver
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# turnserver (bool): Set to NO by default.
|
||||
# Set it to YES to enable turnserver.
|
||||
# turnserver_config (path): Set to @PREFIX@/etc/turnserver.conf
|
||||
# by default.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="turnserver"
|
||||
rcvar=$name
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${turnserver:=no}
|
||||
: ${turnserver_config=@PREFIX@/etc/turnserver.conf}
|
||||
|
||||
command="@PREFIX@/bin/${name}"
|
||||
command_args="--daemon -c ${turnserver_config}"
|
||||
required_files=${turnserver_config}
|
||||
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,28 @@
|
|||
PKG_OPTIONS_VAR= PKG_OPTIONS.coturn
|
||||
PKG_SUPPORTED_OPTIONS= hiredis mysql pgsql sqlite redis
|
||||
|
||||
PKG_SUGGESTED_OPTIONS= sqlite
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mhiredis)
|
||||
.include "../../databases/hiredis/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mmysql)
|
||||
.include "../../databases/mysql55-client/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mpgsql)
|
||||
.include "../../databases/postgresql94-client/buildlink3.mk"
|
||||
DBLIBS+= ${BUILDLINK_PREFIX.postgresql-lib}
|
||||
CONFIGURE_ENV+= POSTCFLAGS="-I${PREFIX}/include/postgresql"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Msqlite)
|
||||
.include "../../databases/sqlite3/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mredis)
|
||||
DEPENDS+= redis-[0-9]*:../../databases/redis
|
||||
.endif
|
|
@ -0,0 +1,44 @@
|
|||
$NetBSD$
|
||||
|
||||
--- postinstall.txt.orig 2017-03-27 03:11:03.000000000 +0000
|
||||
+++ postinstall.txt
|
||||
@@ -1,39 +1 @@ else
|
||||
-==================================================================
|
||||
|
||||
-1) If you system supports automatic start-up system daemon services,
|
||||
-the, to enable the turnserver as an automatically started system
|
||||
-service, you have to:
|
||||
-
|
||||
- a) Create and edit /etc/turnserver.conf or
|
||||
- /usr/local/etc/turnserver.conf .
|
||||
- Use /usr/local/etc/turnserver.conf.default as an example.
|
||||
-
|
||||
- b) For user accounts settings: set up SQLite or PostgreSQL or
|
||||
- MySQL or MongoDB or Redis database for user accounts.
|
||||
- Use /usr/local/share/turnserver/schema.sql as SQL database schema,
|
||||
- or use /usr/local/share/turnserver/schema.userdb.redis as Redis
|
||||
- database schema description and/or
|
||||
- /usr/local/share/turnserver/schema.stats.redis
|
||||
- as Redis status & statistics database schema description.
|
||||
-
|
||||
- If you are using SQLite, the default database location is in
|
||||
- /var/db/turndb or in /usr/local/var/db/turndb or in /var/lib/turn/turndb.
|
||||
-
|
||||
- c) add whatever is necessary to enable start-up daemon for the
|
||||
- /usr/local/bin/turnserver.
|
||||
-
|
||||
-2) If you do not want the turnserver to be a system service,
|
||||
- then you can start/stop it "manually", using the "turnserver"
|
||||
- executable with appropriate options (see the documentation).
|
||||
-
|
||||
-3) To create database schema, use schema in file
|
||||
-/usr/local/share/turnserver/schema.sql.
|
||||
-
|
||||
-4) For additional information, run:
|
||||
-
|
||||
- $ man turnserver
|
||||
- $ man turnadmin
|
||||
- $ man turnutils
|
||||
-
|
||||
-==================================================================
|
||||
-
|
Loading…
Reference in New Issue