TURN and STUN 服务器

mom040267 f23c9dccf6 comments added 10 năm trước cách đây
examples c92e4e7480 encrypted admin user passwords 10 năm trước cách đây
man c45ac5e582 docs fixed 10 năm trước cách đây
rpm 7d5ab2472a working on SCTP 10 năm trước cách đây
src c45ac5e582 docs fixed 10 năm trước cách đây
turndb f23c9dccf6 comments added 10 năm trước cách đây
AUTHORS 2d9595e9b1 email fixed 10 năm trước cách đây
ChangeLog 601fda4423 changelog 10 năm trước cách đây
INSTALL c92e4e7480 encrypted admin user passwords 10 năm trước cách đây
LICENSE 702b29bc22 initial code import 11 năm trước cách đây
LICENSE.OpenSSL 702b29bc22 initial code import 11 năm trước cách đây
Makefile.in e8394a8f01 working on https 10 năm trước cách đây
NOTE 702b29bc22 initial code import 11 năm trước cách đây
README.turnadmin c45ac5e582 docs fixed 10 năm trước cách đây
README.turnserver a2cf8155a6 docs changed 10 năm trước cách đây
README.turnutils 69653ea259 native SCTP support 10 năm trước cách đây
STATUS caf63a35de sha384 added 10 năm trước cách đây
TODO 304608f714 TODO updated 10 năm trước cách đây
configure 6fccc65fc7 working on sctp 10 năm trước cách đây
make-man.sh 702b29bc22 initial code import 11 năm trước cách đây
postinstall.txt dafedda0b9 tunable TURNDBDIR 11 năm trước cách đây

README.turnadmin

GENERAL INFORMATION

turnadmin is a TURN administration tool. This tool can be used to manage
the user accounts (add/remove users, generate
TURN keys for the users). For security reasons, we do not recommend
storing passwords openly. The better option is to use pre-processed "keys"
which are then used for authentication. These keys are generated by turnadmin.
Turnadmin is a link to turnserver binary, but turnadmin performs different
functions.

Options note: turnadmin has long and short option names, for most options.
Some options have only long form, some options have only short form. Their syntax
somewhat different, if an argument is required:

The short form must be used as this (for example):

$ turnadmin -u ...

The long form equivalent must use the "=" character:

$ turnadmin --user= ...

If this is a flag option (no argument required) then their usage are the same, for example:

$ turnadmin -k ...

is equivalent to:

$ turnadmin --key ...

You have always the use the -r option with commands for long term credentials -
because data for multiple realms can be stored in the same database.

=====================================

NAME

turnadmin - a TURN relay administration tool.

SYNOPSIS

$ turnadmin [command] [options]

$ turnadmin [ -h | --help]

DESCRIPTION

Commands:

-P, --generate-encrypted-password Generate and print to the standard
output an encrypted form of a password (for web admin user or CLI).
The value then can be used as a safe key for the password
storage on disk or in the database. Every invocation for the same password
produces a different result. The for mat of the encrypted password is:
$5$<...salt...>$<...sha256(salt+password)...>. Salt is 16 characters,
the sha256 output is 64 characters. Character 5 is the algorithm id (sha256).
Only sha256 is supported as the hash function.

-k, --key Generate key for a long-term credentials mechanism user.

-a, --add Add or update a long-term user.

-A, --add-admin Add or update an admin user.

-d, --delete Delete a long-term user.

-D, --delete-admin Delete an admin user.

-l, --list List long-term users in the database.

-L, --list-admin List admin users in the database.

-s, --set-secret= Add shared secret for TURN RESP API

-S, --show-secret Show stored shared secrets for TURN REST API

-X, --delete-secret= Delete a shared secret.
--delete-all_secrets Delete all shared secrets for REST API.

-O, --add-origin Add origin-to-realm relation.

-R, --del-origin Delete origin-to-realm relation.

-I, --list-origins List origin-to-realm relations.

-g, --set-realm-option Set realm params: max-bps, total-quota, user-quota.

-G, --list-realm-options List realm params.

Options with required values:

-b, --db, --userdb SQLite user database file name (default - /var/db/turndb or
/usr/local/var/db/turndb or /var/lib/turn/turndb).
See the same option in the turnserver section.
-e, --psql-userdb PostgreSQL user database connection string.
See the --psql-userdb option in the turnserver section.
-M, --mysql-userdb MySQL user database connection string.
See the --mysql-userdb option in the turnserver section.
-J, --mongo-userdb MongoDB user database connection string.
See the --mysql-mongo option in the turnserver section.
-N, --redis-userdb Redis user database connection string.
See the --redis-userdb option in the turnserver section.
-u, --user User name.
-r, --realm Realm.
-p, --password Password.
-o, --origin Origin
-H, --sha256 Use SHA256 as the keys hash function (a non-standard feature).
By default, MD5 is used for the key storage encryption
(as required by the current STUN/TURNstandards).
-Y, --sha384 Use SHA384 as the keys hash function (a non-standard feature).
-K, --sha512 Use SHA512 as the keys hash function (a non-standard feature).
--max-bps Set value of realm's max-bps parameter.
--total-quota Set value of realm's total-quota parameter.
--user-quota Set value of realm's user-quota parameter.
-h, --help Help.

Command examples:

Generate an encrypted form of a password:

$ turnadmin -P -p

Generate a key:

$ turnadmin -k -u -r -p

Add/update a user in the in the database:

$ turnadmin -a [-b | -e | -M | -N ] -u -r -p

Delete a user from the database:

$ turnadmin -d [-b | -e | -M | -N ] -u -r

List all long-term users in MySQL database:

$ turnadmin -l --mysql-userdb="" -r

List all admin users in Redis database:

$ turnadmin -L --redis-userdb=""

Set secret in MySQL database:

$ turnadmin -s --mysql-userdb="" -r

Show secret stored in PostgreSQL database:

$ turnadmin -S --psql-userdb="" -r

Set origin-to-realm relation in MySQL database:

$ turnadmin --mysql-userdb="" -r -o

Delete origin-to-realm relation from Redis DB:

$ turnadmin --redis-userdb="" -o

List all origin-to-realm relations in Redis DB:

$ turnadmin --redis-userdb="" -I

List the origin-to-realm relations in PostgreSQL DB for a single realm:

$ turnadmin --psql-userdb="" -I -r

Help:

$ turnadmin -h

=======================================

DOCS

After installation, run the command:

$ man turnadmin

or in the project root directory:

$ man -M man turnadmin

to see the man page.

=====================================

FILES

/etc/turnserver.conf

/var/db/turndb

/usr/local/var/db/turndb

/var/lib/turn/turndb

/usr/local/etc/turnserver.conf

=====================================

DIRECTORIES

/usr/local/share/turnserver

/usr/local/share/doc/turnserver

/usr/local/share/examples/turnserver

======================================

SEE ALSO

turnserver, turnutils

======================================

WEB RESOURCES

project page:

http://code.google.com/p/coturn/

Wiki page:

http://code.google.com/p/coturn/wiki/Readme

forum:

https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/

======================================

AUTHORS

Oleg Moskalenko

Gabor Kovesdan http://kovesdan.org/

Daniel Pocock http://danielpocock.com/

John Selbie ([email protected])

Lee Sylvester

Erik Johnston

Roman Lisagor

Vladimir Tsanev

Po-sheng Lin

Peter Dunkley

Mutsutoshi Yoshimoto

Federico Pinna

Bradley T. Hughes