Transport files
One file per transport. The HTTP and WebSockets files are read by the janus binary at start; the others only matter when that transport is enabled. Each transport is described in more detail on its own transport page.
How to read the tables
Sample is the value in the C sample file. In the port says whether the Rust source mentions the key as a string (read) or not (not found). It is a grep, not a proof: a key that is "read" may be read only in some modes, and a key that is "not found" is accepted and ignored with a warning, as the compatibility notes describe.
HTTP
File: janus.transport.http.jcfg in the configs folder. Sample: conf/janus.transport.http.jcfg.sample in the C repo.
Web server stuff: whether any should be enabled, which ports they should use, whether security should be handled directly or demanded to an external application (e.g., web frontend) and what should be the base path for the Janus API protocol. Notice that by default all the web servers will try and bind on both IPv4 and IPv6: if you want to only bind to IPv4 addresses (e.g., because your system does not support IPv6), you should set the web server 'ip' property to '0.0.0.0'. To see debug logs from the HTTP server library, set 'mhd_debug'.
general
| Key | Sample | Meaning | In the port |
|---|---|---|---|
events | true (commented out) | Whether to notify event handlers about transport events (default=true) | read |
json | "compact" | Whether the JSON messages should be indented (pretty), plain (no indentation) or compact (no indentation and no spaces) | read |
base_path | "/janus" | Base path to bind to in the web server (plain HTTP only) | read |
http | true | Whether to enable the plain HTTP interface | read |
port | 8088 | Web server HTTP port | read |
interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address (v4 or v6) only | read |
https | false | Whether to enable HTTPS (default=false) | read |
secure_port | 8089 (commented out) | Web server HTTPS port, if enabled | read |
secure_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
secure_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address (v4 or v6) only | read |
acl | "127.,192.168.0." (commented out) | Only allow requests coming from this comma separated list of addresses | read |
acl_forwarded | true (commented out) | Whether we should check the X-Forwarded-For header too for the ACL (default=false, since without a proxy in the middle this could be abused) | read |
mhd_connection_limit | 1020 (commented out) | Open connections limit in libmicrohttpd (default=1020) | read |
mhd_debug | false (commented out) | Ask libmicrohttpd to write warning and error messages to stderr (default=false) | not found |
admin
| Key | Sample | Meaning | In the port |
|---|---|---|---|
admin_base_path | "/admin" | Base path to bind to in the admin/monitor web server (plain HTTP only) | read |
admin_http | false | Whether to enable the plain HTTP interface | read |
admin_port | 7088 | Admin/monitor web server HTTP port | read |
admin_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
admin_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address (v4 or v6) only | read |
admin_https | false | Whether to enable HTTPS (default=false) | read |
admin_secure_port | 7889 (commented out) | Admin/monitor web server HTTPS port, if enabled | read |
admin_secure_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
admin_secure_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address (v4 or v6) only | read |
admin_acl | "127.,192.168.0." (commented out) | Only allow requests coming from this comma separated list of addresses | read |
admin_acl_forwarded | true (commented out) | Whether we should check the X-Forwarded-For header too for the admin ACL (default=false, since without a proxy in the middle this could be abused) | read |
cors
| Key | Sample | Meaning | In the port |
|---|---|---|---|
allow_origin | "http://foo.example" (commented out) | read | |
enforce_cors | true (commented out) | read |
certificates
| Key | Sample | Meaning | In the port |
|---|---|---|---|
cert_pem | "/path/to/cert.pem" (commented out) | read | |
cert_key | "/path/to/key.pem" (commented out) | read | |
cert_pwd | "secretpassphrase" (commented out) | read | |
ciphers | "PFS:-VERS-TLS1.0:-VERS-TLS1.1:-3DES-CBC:-ARCFOUR-128" (commented out) | read |
WebSockets
File: janus.transport.websockets.jcfg in the configs folder. Sample: conf/janus.transport.websockets.jcfg.sample in the C repo.
WebSockets stuff: whether they should be enabled, which ports they should use, and so on.
general
| Key | Sample | Meaning | In the port |
|---|---|---|---|
events | true (commented out) | Whether to notify event handlers about transport events (default=true) | read |
json | "compact" | Whether the JSON messages should be indented (pretty), plain (no indentation) or compact (no indentation and no spaces) | read |
pingpong_trigger | 30 (commented out) | After how many seconds of idle, a PING should be sent | read |
pingpong_timeout | 10 (commented out) | After how many seconds of not getting a PONG, a timeout should be detected | read |
ws | true | Whether to enable the WebSockets API | read |
ws_port | 8188 | WebSockets server port | read |
ws_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
ws_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address only | read |
ws_unix | "/run/ws.sock" (commented out) | Use WebSocket server over UNIX socket instead of TCP | not found |
wss | false | Whether to enable secure WebSockets | read |
wss_port | 8989 (commented out) | WebSockets server secure port, if enabled | read |
wss_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
wss_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address only | read |
wss_unix | "/run/wss.sock" (commented out) | Use WebSocket server over UNIX socket instead of TCP | not found |
ws_logging | "err,warn" (commented out) | libwebsockets debugging level as a comma separated list of things to debug, supported values: err, warn, notice, info, debug, parser, header, ext, client, latency, user, count (plus 'none' and 'all') | not found |
ws_acl | "127.,192.168.0." (commented out) | Only allow requests coming from this comma separated list of addresses | read |
ws_acl_forwarded | true (commented out) | Whether we should check the X-Forwarded-For header too for the ACL (default=false, since without a proxy in the middle this could be abused) | read |
admin
| Key | Sample | Meaning | In the port |
|---|---|---|---|
admin_ws | false | Whether to enable the Admin API WebSockets API | read |
admin_ws_port | 7188 | Admin API WebSockets server port, if enabled | read |
admin_ws_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
admin_ws_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address only | read |
admin_ws_unix | "/run/aws.sock" (commented out) | Use WebSocket server over UNIX socket instead of TCP | not found |
admin_wss | false | Whether to enable the Admin API secure WebSockets | read |
admin_wss_port | 7989 (commented out) | Admin API WebSockets server secure port, if enabled | read |
admin_wss_interface | "eth0" (commented out) | Whether we should bind this server to a specific interface only | read |
admin_wss_ip | "192.168.0.1" (commented out) | Whether we should bind this server to a specific IP address only | read |
admin_wss_unix | "/run/awss.sock" (commented out) | Use WebSocket server over UNIX socket instead of TCP | not found |
admin_ws_acl | "127.,192.168.0." (commented out) | Only allow requests coming from this comma separated list of addresses | read |
admin_ws_acl_forwarded | true (commented out) | Whether we should check the X-Forwarded-For header too for the ACL (default=false, since without a proxy in the middle this could be abused) | read |
cors
| Key | Sample | Meaning | In the port |
|---|---|---|---|
allow_origin | "http://foo.example" (commented out) | read | |
enforce_cors | true (commented out) | read |
certificates
| Key | Sample | Meaning | In the port |
|---|---|---|---|
cert_pem | "/path/to/cert.pem" (commented out) | read | |
cert_key | "/path/to/key.pem" (commented out) | read | |
cert_pwd | "secretpassphrase" (commented out) | read | |
ciphers | "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256" (commented out) | read |
Unix sockets
File: janus.transport.pfunix.jcfg in the configs folder. Sample: conf/janus.transport.pfunix.jcfg.sample in the C repo.
You can also control a Janus instance using Unix Sockets. The only aspect you need to configure here is the path of the Unix Sockets server. Notice that by default the interface is disabled, as you need to specify the path(s) to bind to for the API(s).
general
| Key | Sample | Meaning | In the port |
|---|---|---|---|
enabled | false | Whether to enable the Unix Sockets interface for Janus API clients | read |
events | true (commented out) | Whether to notify event handlers about transport events (default=true) | read |
json | "compact" | Whether the JSON messages should be indented (pretty), plain (no indentation) or compact (no indentation and no spaces) | read |
path | "/path/to/ux-janusapi" (commented out) | Path to bind to (Janus API) | read |
type | "SOCK_SEQPACKET" (commented out) | SOCK_SEQPACKET (default) or SOCK_DGRAM? | read |
admin
| Key | Sample | Meaning | In the port |
|---|---|---|---|
admin_enabled | false | Whether to enable the Unix Sockets interface for Admin API clients | read |
admin_path | "/path/to/ux-janusadmin" (commented out) | Path to bind to (Admin API) | read |
admin_type | "SOCK_SEQPACKET" (commented out) | SOCK_SEQPACKET (default) or SOCK_DGRAM? | read |
MQTT
File: janus.transport.mqtt.jcfg in the configs folder. Sample: conf/janus.transport.mqtt.jcfg.sample in the C repo.
Configuration of the MQTT additional transport for the Janus API.
general
| Key | Sample | Meaning | In the port |
|---|---|---|---|
enabled | false | Whether the support must be enabled | read |
events | true (commented out) | Whether to notify event handlers about transport events (default=true) | read |
json | "compact" | Whether the JSON messages should be indented (pretty), plain (no indentation) or compact (no indentation and no spaces) | read |
url | "tcp://localhost:1883" | The connection URL of the MQTT broker: if you want to use SSL, make sure you type ssl:// instead of tcp://, and that you configure the SSL settings below | read |
mqtt_version | "3.1.1" (commented out) | Protocol version. Available values: 3.1, 3.1.1 (default), 5. | read |
client_id | "guest" (commented out) | Client identifier | read |
username | "guest" (commented out) | Username to use to authenticate, if needed | read |
password | "guest" (commented out) | Password to use to authenticate, if needed | read |
keep_alive_interval | 20 (commented out) | Keep connection for N seconds | read |
cleansession | 0 (commented out) | Clean session flag | read |
max_inflight | 10 (commented out) | Maximum number of inflight messages | read |
max_buffered | 100 (commented out) | Maximum number of buffered messages | read |
disconnect_timeout | 100 (commented out) | Milliseconds to wait before destroying client | read |
subscribe_topic | "to-janus" | Topic for incoming messages | read |
subscribe_qos | 1 (commented out) | QoS for incoming messages | read |
publish_topic | "from-janus" | Topic for outgoing messages | read |
publish_qos | 1 (commented out) | QoS for outgoing messages | read |
ssl_enabled | true (commented out) | Whether ssl support must be enabled | read |
verify_peer | true (commented out) | Whether peer verification must be enabled | read |
cacertfile | /path/to/cacert.pem (commented out) | Certificates to use when SSL support is enabled, if needed | read |
certfile | /path/to/cert.pem (commented out) | read | |
keyfile | /path/to/key.pem (commented out) | read | |
vacuum_interval | 60 (commented out) | Interval for removing old transaction states in seconds. | read |
proxy_transaction_user_properties | [] (commented out) | Array of user property names to copy from the incoming message. | read |
add_transaction_user_properties | () (commented out) | List of user property ["key", "value"] pairs to add. | read |
admin
| Key | Sample | Meaning | In the port |
|---|---|---|---|
admin_enabled | false (commented out) | Whether the support must be enabled | read |
subscribe_topic | "to-janus-admin" | Topic for incoming admin messages | read |
subscribe_qos | 1 (commented out) | QoS for incoming admin messages | read |
publish_topic | "from-janus-admin" | Topic for outgoing admin messages | read |
publish_qos | 1 (commented out) | QoS for outgoing admin messages | read |
status
| Key | Sample | Meaning | In the port |
|---|---|---|---|
enabled | false | Whether status messages must be enabled (default: false) | read |
connect_message | "{\"online\": true}" (commented out) | Initial message sent to status topic. Nothing is being sent if not set. | read |
disconnect_message | "{\"online\": false}" (commented out) | Message sent after disconnect or as LWT. Nothing is being sent if not set. | read |
topic | "status" (commented out) | Status topic (default: "status") | read |
qos | 1 (commented out) | QoS for status messages (default: 1) | read |
retain | false (commented out) | Whether status messages should be retained (default: false) | read |
RabbitMQ
File: janus.transport.rabbitmq.jcfg in the configs folder. Sample: conf/janus.transport.rabbitmq.jcfg.sample in the C repo.
Configuration of the RabbitMQ additional transport for the Janus API. This is only useful when you're wrapping Janus requests in your server application, and handling the communication with clients your own way. At the moment, only a single "application" can be handled at the same time, meaning that Janus won't implement multiple queues to handle multiple concurrent "application servers" taking advantage of its features. Support for this is planned, though (e.g., through some kind of negotiation to create queues on the fly). Right now, you can only configure the address of the RabbitMQ server to use, and the queues to make use of to receive (to-janus) and send (from-janus) messages from/to an external application. If you're using the same RabbitMQ server instance for multiple Janus instances, make sure you configure different queues for each of them (e.g., from-janus-1/to-janus-1 and from-janus-2/to-janus-2), or otherwise both the instances will make use of the same queues and messages will get lost. The integration is disabled by default, so set enabled=true if you want to use it.
general
| Key | Sample | Meaning | In the port |
|---|---|---|---|
enabled | false | Whether the support must be enabled | read |
events | true (commented out) | Whether to notify event handlers about transport events (default=true) | read |
json | "compact" | Whether the JSON messages should be indented (pretty), plain (no indentation) or compact (no indentation and no spaces) | read |
host | "localhost" | The address of the RabbitMQ server | read |
port | 5672 (commented out) | The port of the RabbitMQ server (5672 by default) | read |
username | "guest" (commented out) | Username to use to authenticate, if needed | read |
password | "guest" (commented out) | Password to use to authenticate, if needed | read |
vhost | "/" (commented out) | Virtual host to specify when logging in, if needed | read |
janus_exchange | "janus-exchange" (commented out) | Exchange for outgoing messages, using default if not provided | read |
janus_exchange_type | "fanout" (commented out) | Rabbitmq exchange_type can be one of the available types: direct, topic, headers and fanout (fanout by defualt). | read |
queue_name | "janus-gateway" (commented out) | Queue name for incoming messages (if set and janus_exchange_type is topic/direct, to_janus will be the routing key the queue is bound to the exchange on) | read |
to_janus | "to-janus" | Name of the queue for incoming messages if queue_name isn't set, otherwise, the routing key that queue_name is bound to | read |
from_janus | "from-janus" | Routing key of the message sent from janus (as well as the name of the outgoing queue if declare_outgoing_queue = true) | read |
declare_outgoing_queue | true (commented out) | By default (for backwards compatibility), we declare an outgoing queue. Set this to false to disable that behavior | read |
queue_durable | false (commented out) | Whether or not incoming queue should remain after a RabbitMQ reboot | read |
queue_autodelete | false (commented out) | Whether or not incoming queue should autodelete after janus disconnects from RabbitMQ | read |
queue_exclusive | false (commented out) | Whether or not incoming queue should only allow one subscriber | read |
heartbeat | 60 (commented out) | Defines the seconds without communication that should pass before considering the TCP connection unreachable. | read |
block_startup_until_connected | false (commented out) | Whether to block startup until connected to RabbitMQ | read |
retry_interval | 5 (commented out) | Seconds between startup retries (1-65535, default=5) Also caps runtime reconnect backoff (100ms initial, multiplier=1.5) | read |
ssl_enabled | false (commented out) | Whether ssl support must be enabled | read |
ssl_verify_peer | true (commented out) | Whether peer verification must be enabled | read |
ssl_verify_hostname | true (commented out) | Whether hostname verification must be enabled | read |
ssl_cacert | "/path/to/cacert.pem" (commented out) | Certificates to use when SSL support is enabled, if needed | read |
ssl_cert | "/path/to/cert.pem" (commented out) | read | |
ssl_key | "/path/to/key.pem" (commented out) | read |
admin
| Key | Sample | Meaning | In the port |
|---|---|---|---|
admin_enabled | false (commented out) | Whether the support must be enabled | read |
queue_name_admin | "janus-gateway-admin" (commented out) | Queue name for incoming admin messages (if set and janus_exchange_type is topic/direct, to_janus_admin will be the the routing key the queue is bound to the exchange on) | read |
to_janus_admin | "to-janus-admin" (commented out) | Name of the queue for incoming messages if queue_name_admin isn't set, otherwise, the routing key that queue_name_admin is bound to | read |
from_janus_admin | "from-janus-admin" (commented out) | Routing key of the message sent from janus (as well as the name of the outgoing queue if declare_outgoing_queue_admin = true) | read |
declare_outgoing_queue_admin | true (commented out) | By default (for backwards compatibility), we declare an outgoing queue. Set this to false to disable that behavior | read |
queue_durable_admin | false (commented out) | Whether or not incoming queue should remain after a RabbitMQ reboot | read |
queue_autodelete_admin | false (commented out) | Whether or not incoming queue should autodelete after janus disconnects from RabbitMQ | read |
queue_exclusive_admin | false (commented out) | Whether or not incoming queue should only allow one subscriber | read |
nanomsg
File: janus.transport.nanomsg.jcfg in the configs folder. Sample: conf/janus.transport.nanomsg.jcfg.sample in the C repo.
You can also control a Janus instance using Nanomsg sockets. The only aspect you need to configure here is the address to use for the communication, and whether the address should be used to bind locally or to connect to a remote endpoint. Notice that the only supported pattern is NN_PAIR, so you'll only be able to have a single client controlling the API with this plugin. As usual, both Janus API and Admin API endpoints can be configured.
general
| Key | Sample | Meaning | In the port |
|---|---|---|---|
enabled | true | Whether to enable the Nanomsg interface for Janus API clients | read |
events | true (commented out) | Whether to notify event handlers about transport events (default=true) | read |
json | "compact" | Whether the JSON messages should be indented (pretty), plain (no indentation) or compact (no indentation and no spaces) | read |
mode | "bind" (commented out) | Whether we should 'bind' to the specified address (default), or connect to it if remote | read |
address | "ipc:///tmp/janus.ipc" | Address to use (Janus API), refer to the Nanomsg documentation for more info on different transports you can use here | read |
admin
| Key | Sample | Meaning | In the port |
|---|---|---|---|
admin_enabled | false | Whether to enable the Nanomsg interface for Admin API clients | read |
admin_mode | "bind" (commented out) | read | |
admin_address | "ipc:///tmp/janus-admin.ipc" (commented out) | read |