turn-server 4.0.1

A pure rust-implemented turn server.
Documentation
[server]
#
# Port range, the maximum range is 49152 - 65535.
#
port-range = "49152..65535"
#
#
# Maximum number of threads the TURN server can use.
#
max-threads = 12
#
#
# turn server realm
#
# specify the domain where the server is located. for a single node,
# this configuration is fixed, but each node can be configured as a
# different domain. this is a good idea to divide the nodes by namespace.
#
realm = "localhost"
#
#
# turn server listen interfaces
#
# The address and port to which the UDP Server is bound. Multiple
# addresses can be bound at the same time. The binding address supports
# ipv4 and ipv6.
#
[[server.interfaces]]
transport = "udp"
listen = "127.0.0.1:3478"
#
#
# external address
#
# specify the node external address and port. for the case of
# exposing the service to the outside, you need to manually
# specify the server external IP address and service listening
# port.
#
external = "127.0.0.1:3478"
#
#
# Idle timeout
#
# If no packet is received within the specified number of
# seconds, the connection will be closed to prevent resources
# from being occupied for a long time.
#
idle-timeout = 20
#
#
# Maximum Transmission Unit (MTU) size for network packets.
#
mtu = 1500
#
#
# ssl configuration
#
# [server.interfaces.ssl]
# private-key = "/etc/turn-rs/tls/private.key"
# certificate-chain = "/etc/turn-rs/tls/certificate.crt"
#
#
# Additional interface examples (commented):
#
# [[server.interfaces]]
# transport = "tcp"
# listen = "127.0.0.1:3478"
# external = "127.0.0.1:3478"
# 
# [[server.interfaces]]
# transport = "udp"
# listen = "[::1]:3478"
# external = "[::1]:3478"
# 
#
#
# rpc server listen
#
# This option specifies the grpc server binding address used to control
# the turn server.
#
# [api]
# listen = "127.0.0.1:3000"
#
#
# Set a timeout on for all request handlers.
#
# timeout = 5
#
#
# ssl configuration
#
# [api.ssl]
# private-key = "/etc/turn-rs/tls/private.key"
# certificate-chain = "/etc/turn-rs/tls/certificate.crt"
#
#
#
# [prometheus]
#
# prometheus server listen
#
# This option specifies the prometheus server binding address used to expose
# the metrics.
#
# listen = "127.0.0.1:9090"
#
#
# ssl configuration
#
# [prometheus.ssl]
# private-key = "/etc/turn-rs/tls/private.key"
# certificate-chain = "/etc/turn-rs/tls/certificate.crt"
#
#
#
# [hooks]
#
# hooks server endpoint
#
# The endpoint of the hooks server
#
# endpoint = "http://127.0.0.1:3000"
#
#
# Maximum number of channels for the hooks server.
#
# max-channel-size = 1024
#
#
# ssl configuration
#
# [hooks.ssl]
# private-key = "/etc/turn-rs/tls/private.key"
# certificate-chain = "/etc/turn-rs/tls/certificate.crt"
#
#
#
# log level
# An enum representing the available verbosity levels of the logger.
[log]
level = "info"
#
# log to stdout
#
# This option can be used to log to stdout.
#
stdout = true
#
# log to file directory
#
# This option can be used to log to a file directory.
#
# file-directory = "/var/log/turn-server"
#
#
[auth]
#
# Enable hooks authentication.
#
# This option can be used to enable the hooks authentication.
#
enable-hooks-auth = false
#
#
# Static authentication key value (string) that applies only to the TURN REST API.
# If set, the turn server will not request external services via the GRPC
# Hooks API to obtain the key.
#
# static-auth-secret = ""
#
#
# static user password
#
# This option can be used to specify the static identity authentication
# information used by the turn server for verification.
#
# Note: this is a high-priority authentication method, the server
# will try to use static authentication first, and then use external
# control service authentication.
#
[auth.static-credentials]
user1 = "test"
user2 = "test"