Janus WebRTC Server 安裝

libmicrohttpd (only needed if you are interested in REST support for the Janus API)
libwebsockets (only needed if you are interested in WebSockets support for the Janus API)
cmake (only needed if you are interested in WebSockets and/or BoringSSL support, as they make use of it)
rabbitmq-c (only needed if you are interested in RabbitMQ support for the Janus API or events)
paho.mqtt.c (only needed if you are interested in MQTT support for the Janus API or events)
nanomsg (only needed if you are interested in Nanomsg support for the Janus API)
libcurl (only needed if you are interested in the TURN REST API support)
libogg (needed for the voicemail plugin and/or post-processor)
libcurl (only needed if you are interested in RTSP support in the Streaming plugin or in the sample Event Handler plugin)
All of those libraries are usually available on most of mon distributions. Installing these libraries on a recent Fedora, for instance, is very simple:
yum install libmicrohttpd-devel jansson-devel \
 openssl-devel libsrtp-devel sofia-sip-devel glib2-devel \
 opus-devel libogg-devel libcurl-devel pkgconfig gengetopt \
 libconfig-devel libtool autoconf automake 
Notice that you may have to yum install epel-release as well if you re attempting an installation on a CentOS machine instead. On Ubuntu or Debian, it would require something like this:
aptitude install libmicrohttpd-dev libjansson-dev \
 libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
 libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
 libconfig-dev pkg-config gengetopt libtool automake 

Note: please notice that libopus may not be available out of the box on Ubuntu or Debian, unless you re using a recent version (e.g., Ubuntu 14.04 LTS). In that case, you ll have to install it manually.
While libnice is typically available in most distros as a package, the version available out of the box in Ubuntu is known to cause problems. As such, we piling and installing the master version of libnice. Installation of libnice master is quite straightforward:
git clone libnice/libnice
cd libnice
./autogen.sh
./configure --prefix=/usr
make sudo make install 

Note: Make sure you remove the distro version first, or you ll cause conflicts between the installations. In case you want to keep both for some reason, for custom installations of libnice you can also run pkg-config --cflags --libs nice to make sure Janus can find the right installation. If that fails, you may need to set the PKG_CONFIG_PATH environment variable piling Janus, e.g., export PKG_CONFIG_PATH=/path/to/libnice/lib/pkgconfig
In case you re piling the sample Event Handler plugin, you ll need to install the development version of libcurl as well (usually libcurl-devel on Fedora/CentOS, libcurl4-openssl-dev on Ubuntu/Debian). If your distro ships a pre-1.5 version of libsrtp, you ll have to uninstall that version and install 1.5.x, 1.6.x or 2.x manually. In fact, 1.4.x is known to cause several issues with WebRTC. Installation of version 1.5.4 is quite straightforward:
wget cisco/libsrtp/archive/v1.5.4.tar.gz
tar xfv v1.5.4.tar.gz
cd libsrtp-1.5.4
./configure --prefix=/usr --enable-openssl
make shared_library sudo make install 
The instructions for version 2.x are practically the same. Notice that the following steps are for version 2.2.0, but there may be more recent versions available:
wget cisco/libsrtp/archive/v2.2.0.tar.gz
tar xfv v2.2.0.tar.gz
cd libsrtp-2.2.0
./configure --prefix=/usr --enable-openssl
make shared_library sudo make install 
The Janus configure script autodetects which one you have installed and links to the correct library automatically, choosing 2.x if both are installed. If you want 1.5 or 1.6 to be picked, pass --disable-libsrtp2 when configuring Janus to force it to use the older version instead.
Note: when installing libsrtp, no matter which version, you may need to pass --libdir=/usr/lib64 to the configure script if you re installing on a x86_64 distribution.
If you want to make use of BoringSSL instead of OpenSSL (e.g., because you want to take advantage of --enable-dtls-settimeout), you ll have to manually install it to a specific location. Use the following steps:
git clone boringssl
cd boringssl
# Don't barf on errors
sed -i s/" -Werror"//g CMakeLists.txt
# Build
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS="-lrt" ..
cd ..
# Install
sudo mkdir -p /opt/boringssl
sudo cp -R include /opt/boringssl/
sudo mkdir -p /opt/boringssl/lib
sudo cp build/ssl/libssl.a /opt/boringssl/lib/
sudo cp build/crypto/libcrypto.a /opt/boringssl/lib/ 
Once the library is installed, you ll have to pass an additional --enable-boringssl flag to the configure script, as by default Janus will be built assuming OpenSSL will be used. By default, Janus expects BoringSSL to be installed in /opt/boringssl  if it s installed in another location, pass the path to the configure script as such: --enable-boringssl=/path/to/boringssl If you were using OpenSSL and want to switch to BoringSSL, make sure you also do a make clean in the Janus piling with the new BoringSSL support. If you enabled BoringSSL support and also want Janus to detect and react to DTLS timeouts with faster retransmissions, then pass --enable-dtls-settimeout to the configure script too. For what concerns usrsctp, which is needed for Data Channels support, it is usually not available in repositories, so if you re interested in them (support is optional) you ll have to install it manually. It is a pretty easy and standard process:
git clone sctplab/usrsctp
cd usrsctp
./bootstrap
./configure --prefix=/usr make sudo make install 

Note: you may need to pass --libdir=/usr/lib64 to the configure script if you re installing on a x86_64 distribution.
The same applies for libwebsockets, which is needed for the optional WebSockets support. If you re interested in supporting WebSockets to control Janus, as an alternative (or replacement) to the default plain HTTP REST API, you ll have to install it manually:
git clone repo/libwebsockets
cd libwebsockets
# If you want the stable version of libwebsockets, uncomment the next line
# git checkout v2.4-stable
mkdir build
cd build
# See meetecho/janus-gateway/issues/732 re: LWS_MAX_SMP
cmake -DLWS_MAX_SMP=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make sudo make install 

Note:  is unreachable for any reason, replace the first line with this:

git clone warmcat/libwebsockets.git


The same applies for Eclipse Paho MQTT C client library, which is needed for the optional MQTT support. If you re interested in integrating MQTT channels as an alternative (or replacement) to HTTP and/or WebSockets to control Janus, or as a carrier of Janus Events, you can install the latest version with the following steps:
git clone eclipse/paho.mqtt.c.git
cd paho.mqtt.c
make sudo make install 

Note: you may want to set up a different install path for the library, to achieve that, replace mand by sudo prefix=/usr make install .
In case you re interested in Nanomsg support, you ll need to install the related C library. It is usually available as an easily installable package in pretty much all repositories. The following is an example on how to install it on Ubuntu:
aptitude install libnanomsg-dev 
Finally, the same can be said for rabbitmq-c as well, which is needed for the optional RabbitMQ support. In fact, several different versions of the library can be found, and the versions usually available in most distribution repositories are not up-do-date with respect to the current state of the development. As such, if you re interested in integrating RabbitMQ queues as an alternative (or replacement) to HTTP and/or WebSockets to control Janus, you can install the latest version with the following steps:
git clone alanxz/rabbitmq-c
cd rabbitmq-c
git submodule init
git submodule update
mkdir build cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make sudo make install 

Note: you may need to pass --libdir=/usr/lib64 to the configure script if you re installing on a x86_64 distribution.
To conclude, should you be interested in building the Janus documentation as well, you ll need some additional tools too:

Compile
Once you have installed all the dependencies, get the code:

git clone meetecho/janus-gateway.git
cd janus-gateway 
Then just use:
sh autogen.sh 
to generate the configure file. After that, pile as usual to start pilation process:
./configure --prefix=/opt/janus
make install 
Since Janus requires configuration files for both the core and its modules in order to work, you ll probably also want to install the default configuration files to use, which you can do this way:
make configs 
Remember to only do this once, or otherwise a subsequent make configs will overwrite any configuration file you may have modified in themeanwhile. If you ve installed the above libraries but are not interested, for instance, in Data Channels, WebSockets, MQTT and/or RabbitMQ, you can disable them when configuring:
./configure --disable-websockets --disable-data-channels --disable-rabbitmq --disable-mqtt 
There are configuration flags for pretty much all external modules and many of the features, so you may want to issue a ./configure --help to dig through the available options. A summary of what s going to be built will always appear after you do a configure, allowing you to double check if what you need and don t need is there. If Doxygen and graphviz are available, the process can also build the documentation for you. By pilation process will not try to build the documentation, so if you instead prefer to build it, use the --enable-docs configuration option:
./configure --enable-docs 
You can also selectively enable/disable other features (e.g., specific plugins you don t care about, or whether or not you want to build the recordings post-processor). Use the help option when configuring .

Building on MacOS
While most of the above instructions will piling Janus on MacOS as well, there are a few aspects to highlight when doing that. First of all, you can use brew to install most of the dependencies:

brew install jansson libnice openssl srtp libusrsctp libmicrohttpd \
 libwebsockets cmake rabbitmq-c sofia-sip opus libogg curl glib \
 libconfig pkg-config gengetopt autoconf automake libtool 
For what concerns libwebsockets, though, make sure that the installed version is higher than 2.4.1, or you might encounter the problems described in this post. If brew doesn t provide a more recent version, you ll have to install the library manually. Notice that you may need to provide a custom prefix and PKG_CONFIG_PATH when configuring Janus as well, e.g.:
./configure --prefix=/usr/local/janus PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig 
Everything else works exactly the same way as on Linux.

Configure and start
To start the server, you can use the janus executable. There are several things you can configure, either in a configuration file:

 installdir /etc/janus/janus.jcfg 
or mand line:
 installdir /bin/janus --help
janus 0.7.5
Usage: janus [OPTIONS]...
-h, --help Print help and exit
-V, --version Print version and exit
-b, --daemon Launch Janus in background as a daemon
 (default=off)
-p, --pid-file=path Open the specified PID file when starting Janus
 (default=none)
-N, --disable-stdout Disable stdout based logging (default=off)
-L, --log-file=path Log to the specified file (default=stdout only)
-H --cwd-path Working directory for Janus daemon process
 (default=/)
-i, --interface=ipaddress Interface to use (will be the public IP)
-P, --plugins-folder=path Plugins folder (default=./plugins)
-C, --config=filename Configuration file to use
-F, --configs-folder=path Configuration files folder (default=./conf)
-c, --cert-pem=filename DTLS certificate
-k, --cert-key=filename DTLS certificate key
-K, --cert-pwd=text DTLS certificate key passphrase (if needed)
-S, --stun-server=filename STUN server(:port) to use, if needed (e.g.,
 Janus behind NAT, default=none)
-1, --nat-1-1=ip Public IP to put in all host candidates,
 assuming a 1:1 NAT is in place (e.g., Amazon
 EC2 instances, default=none)
-E, --ice-enforce-list=list Comma-separated list of the only interfaces to
 use for ICE gathering; partial strings are
 supported (e.g., eth0 or eno1,wlan0,
 default=none)
-X, --ice-ignore-list=list Comma-separated list of interfaces or IP
 addresses to ignore for ICE gathering;
 partial strings are supported (e.g.,
 vmnet8,192.168.0.1,10.0.0.1 or
 vmnet,192.168., )
-6, --ipv6-candidates Whether to enable IPv6 candidates or not
 (experimental) (default=off)
-l, --libnice-debug Whether to enable libnice debugging or not
 (default=off)
-f, --full-trickle Do full-trickle instead of half-trickle
 (default=off)
-I, --ice-lite Whether to enable the ICE Lite mode or not
 (default=off)
-T, --ice-tcp Whether to enable ICE-TCP or not (warning: only
 works with ICE Lite)
 (default=off)
-R, --rfc-4588 Whether to enable RFC4588 retransmissions
 support or not (default=off)
-q, --max-nack-queue=number Maximum size of the NACK queue (in ms) per user
 for retransmissions
-t, --no-media-timer=number Time (in s) that should pass with no media
 (audio or video) being received before Janus
 notifies you about this
-W, --slowlink-threshold=number
 Number of lost packets (per s) that should
 trigger a 'slowlink' Janus API event to users
-r, --rtp-port-range=min-max Port range to use for RTP/RTCP (only available
 if the installed libnice supports it)
-B, --twcc-period=number How often (in ms) to send TWCC feedback back to
 senders, if negotiated (default=1s)
-n, --server-name=name Public name of this Janus instance
 (default=MyJanusInstance)
-s, --session-timeout=number Session timeout value, in seconds (default=60)
-m, --reclaim-session-timeout=number
 Reclaim session timeout value, in seconds
 (default=0)
-d, --debug-level=1-7 Debug/logging level (0=disable debugging,
 7=maximum debug level; default=4)
-D, --debug-timestamps Enable debug/logging timestamps (default=off)
-o, --disable-colors Disable color in the logging (default=off)
-M, --debug-locks Enable debugging of locks/mutexes (very
 verbose!) (default=off)
-a, --apisecret=randomstring API secret all requests need to pass in order
 to be accepted by Janus (useful when wrapping
 Janus API requests in a server, none by
 default)
-A, --token-auth Enable token-based authentication for all
 requests (default=off)
-e, --event-handlers Enable event handlers (default=off) 
Options passed mand line have the precedence on those specified in the configuration file. To start the server, simply run:
 installdir /bin/janus 
This will start the server, and have it look at the configuration file. Make sure you have a look at all of the configuration files, to tailor Janus to your specific needs: each configuration file is documented, so it shouldn t be hard to make changes according to your requirements. es with some defaults (assuming you issues make configs after installing the server) that tend to make sense for generic deployments, and also includes some sample configurations for all the plugins (e.g., web servers to listen on, conference rooms to create, streaming mountpoints to make available at startup, etc.).  page in either Chrome or Firefox. A list of demo pages exploiting the different plugins will be available. Remember to edit the transport/port details in the demo JavaScript files if you changed any transport-related configuration from its defaults. Besides, the demos refer to the pre-configured plugin resources, so if you add some new resources (e.g., a new videoconference) you may have to tweak the demo pages to actually use them.


有关fredzeng

fredzeng致力于为互连网及移动互联网网全球的技术性服务,在linux,DNS,DNS详细地址,CDN,CDN加快技术性,WEB网络服务器,网站域名申请注册等层面技术性,与诸位喜好者共享感受。手机微信号:fredzeng


一个含有SSL资格证书的网站域名
必须对外开放相匹配的端口号:8 3-9000 443

资格证书变换
mkdir /etc/ssl/
cd /etc/ssl/
提交资格证书到此文件目录,一般用Nginx可用的资格证书就可以。假如有pem的最好,立即提交到这里,假如沒有得话,必须变换。

openssl rsa -.key -text > key.pem
openssl x509 -inform PEM -.crt > cert.pem
刚开始安裝
刚开始Webrtc服务的布署及安裝,将逐层骤详尽纪录。及其在按流程实行全过程中碰到的难题的解决。

安裝依靠包
yum update
yum -y install epel-release nginx libmicrohttpd-devel jansson-devel openssl-devel libsrtp-devel sofia-sip-devel glib2-devel opus-devel libogg-devel libcurl-devel pkgconfig gengetopt libconfig-devel libtool autoconf automake libnice libnice-devel libwebsockets libwebsockets-devel doxygen graphviz cmake gtk-doc-tools git lrzsz
安裝libsrtp
cd ~
wget cisco/libsrtp/archive/v1.5.4.tar.gz
tar zxvf v1.5.4.tar.gz cd libsrtp-1.5.4
./configure prefix=/usr enable-openssl libdir=/usr/lib64
make shared_library sudo make install
安裝usrsctp
cd ~
git clone sctplab/usrsctp
cd usrsctp
./bootstrap
./configure prefix=/usr libdir=/usr/lib64 make sudo make install
安裝RabbitMQ
cd ~
git clone alanxz/rabbitmq-c
cd rabbitmq-c
git submodule init
git submodule update
mkdir build cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib64 ..
make sudo make install
安裝Janus-Gateway
cd ~
git clone meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure prefix=/opt/janus enable-websockets
make
make install
make configs
輸出下列信息内容,表明./configure prefix=/opt/janus enable-websockets 实行取得成功。

Compiler: gcc
libsrtp version: 1.5.x
SSL/crypto library: OpenSSL
DTLS set-timeout: not available
Mutex implementation: GMutex (native futex on Linux)
DataChannels support: yes
Recordings post-processor: no
TURN REST API client: yes
Doxygen documentation: no
Transports:
REST (HTTP/HTTPS): yes
WebSockets: yes
RabbitMQ: yes
MQTT: no
Unix Sockets: yes
Nanomsg: no
Plugins:
Echo Test: yes
Streaming: yes
Video Call: yes
SIP Gateway (Sofia): no
SIP Gateway (libre): no
NoSIP (RTP Bridge): yes
Audio Bridge: yes
Video Room: yes
Voice Mail: yes
Record Play: yes
Text Room: yes
Lua Interpreter: no
Duktape Interpreter: no
Event handlers:
Sample event handler: yes
RabbitMQ event handler:yes
MQTT event handler: no
JavaScript modules: no
安裝CoTurn服务
在安裝CoTurn服务实行./configure时,遇到了一个出错,这儿提早表明,先做处理。

Libevent2 development is not installed properly
ERROR: Libevent2 development libraries are not installed properly in required location.
ERROR: may be you have just too old libevent tool then you have to upgrade it.
See the INSTALL file.
Abort.
处理方法以下:

sudo yum install libevent libevent-devel openssl openssl-libs -y
随后:

cd ~
wget projects/levent/files/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz/download
mv download libevent-2.0.22-stable.tar.gz
tar zxvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure
make
sudo make install
随后刚开始一切正常安裝CoTurn服务。

cd ~
mkdir /root/webrtc
cd /root/webrtc
wget turnserver/v4.5.0.7/turnserver-4.5.0.7.tar.gz
tar zxvf turnserver-4.5.0.7.tar.gz
cd /root/webrtc/turnserver-4.5.0.7
./configure
make install
服务配备
这里关键是涉及到到turn服务及Janus服务的配备新项目。

CoTurn服务的配备
vi /usr/local/etc/turnserver.conf
开启后在文档中加上下列配备:

relay-device=eth0
listening-ip=192.168.1.100 #LocalIP
listening-port=3478
tls-listening-port=5349
relay-ip=192.168.1.100 #LocalIP
external-ip=112.112.x.x #NetIP
relay-threads=50
lt-cred-mech
cert=/etc/ssl/cert/domain/cert.pem
pkey=/etc/ssl/cert/domain/key.pem
user=user:password123 #配备一个客户名登陆密码
min-port=3480
max-port=3500
#常用的网站域名
Janus配备
vi /opt/janus/etc/janus/janus.jcfg
寻找certificates配备项,在里边开启下列內容的配备,并设定。

certificates:
cert_pem = /etc/ssl/cert/domain/cert.pem
cert_key = /etc/ssl/cert/domain/key.pem
寻找nat配备项,在里边开启下列內容的配备,并设定,在其中的客户名及登陆密码为turnserver.conf中配备的客户名及登陆密码。

nat:
turn_server =
turn_port = 3478
turn_type = udp
turn_user = user
turn_pwd = passwd123
ice_enforce_list = eth0
再开启janus.transport.http.jcfg开展配备。

vi /opt/janus/etc/janus/janus.transport.http.jcfg
各自寻找general、admin、certificates三项的配备处,改动下列配备(沒有提及的无需动)。

general:
https = true

admin:
admin_https = true

certificates:
cert_pem = /etc/ssl/cert/domain/cert.pem
cert_key = /etc/ssl/cert/domain/key.pem
再开启janus.transport.websockets.jcfg开展配备。

vi /opt/janus/etc/janus/janus.transport.websockets.jcfg
各自寻找general、admin、certificates三项的配备处,改动下列配备(沒有提及的无需动)。

general:
wss = true

admin:
admin_wss = true

certificates:
cert_pem = /etc/ssl/cert/domain/cert.pem
cert_key = /etc/ssl/cert/domain/key.pem
Nginx的配备
初创建一个配备文档:

vi /etc/nginx/conf.d/janus.conf
加上下列內容

server {
licsten 80;
listen 443 ssl;
;
ssl_certificate /etc/ssl/cert/.crt;
ssl_certificate_key /etc/ssl/cert/.key;
charset utf-8;
root /opt/janus/share/janus/demos;
index.htm;
access_log /var/log/nginx/access.log main;
location / {
}
}
服务起动
这里关键为每个服务的起动方法。

起动Turn服务
/usr/local/bin/turnserver -c /usr/local/etc/turnserver.conf -o
能够查询3478端口号是不是被占有,若占有,则表明服务起动取得成功。

netstat -nap|grep 3478
起动Janus服务
nohup /opt/janus/bin/janus >> /var/log/janus.log 2> 1
起动Nginx服务
systemctl restart nginx
认证
这时服务早已经起动,可浏览p>
网络服务器IP:内部网(192.168.10.17),外网地址(124.160.xxx.xxx)
网站域名: (带https资格证书)
防火安全墙对外开放端口号:tcp/udp 3 7000-9000 443
内部网网站域名关联:/etc/hosts => 192.168.10.17 (因为该机內部浏览外网地址IP堵塞)
二、网站域名资格证书
mkdir /cert
将网站域名资格证书放到/cert文件目录下,各自取名为cert.pem,key.pem
假如是domain.crt,domain.key 能够依据下列指令转化成pem资格证书
openssl rsa -in server.key -text > key.pem
openssl x509 -inform PEM -in server.crt > cert.pem
三、依靠包安裝
yum -y install epel-release nginx
yum -y install libmicrohttpd-devel jansson-devel openssl-devel libsrtp-devel sofia-sip-devel glib2-devel opus-devel libogg-devel libcurl-devel pkgconfig gengetopt libconfig-devel libtool autoconf automake
yum -y install libnice libnice-devel
yum -y install libwebsockets libwebsockets-devel
yum -y install doxygen graphviz
yum -y install cmake
wget cisco/libsrtp/archive/v1.5.4.tar.gz

./configure prefix=/usr enable-openssl libdir=/usr/lib64

make shared_library sudo make install
git clone sctplab/usrsctp

./bootstrap

./configure prefix=/usr libdir=/usr/lib64 make sudo make install
git clone alanxz/rabbitmq-c

cd rabbitmq-c

git submodule init

git submodule update

mkdir build cd build

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib64 ..

make sudo make install
git clone meetecho/janus-gateway.git

cd janus-gateway

sh autogen.sh

./configure prefix=/opt/janus enable-websockets

make

make install

make configs
STUN\TURN网络服务器

cd /root/webrtc

wget turnserver/v4.5.0.7/turnserver-4.5.0.7.tar.gz

tar xvfz turnserver-4.5.0.7.tar.gz

cd /root/webrtc/turnserver-4.5.0.7

./configure

make install

vim /usr/local/etc/turnserver.conf
relay-device=bond0

listening-ip=192.168.10.17 #内部网IP

listening-port=3478

tls-listening-port=5349

relay-ip=192.168.10.17

external-ip=124.160.xxx.xxx #外网地址IP

relay-threads=50

lt-cred-mech

cert=/cert/cert.pem

pkey=/cert/key.pem

user=xie:123456

min-port=3480

max-port=3500

realm=
nginx 配备 vim /etc/nginx/conf.d/janus.conf
server {
listen 443 ssl;
server_name ;
ssl_certificate /etc/nginx/.crt;
ssl_certificate_key /etc/nginx/.key;
charset utf-8;
root /opt/janus/share/janus/demos;
index.htm;
access_log /var/log/nginx/access.log main;
location / {
}
}
四、Janus自然环境配备(变化一部分)
vim /opt/janus/etc/janus/janus.jcfg

certificates:

cert_pem = /cert/cert.pem

cert_key = /cert/key.pem

nat:

turn_server =

#turn_server = 192.168.10.17

turn_port = 3478

turn_type = udp

turn_user = xie

turn_pwd = 123456

ice_enforce_list = bond0
vim /opt/janus/etc/janus/janus.transport.http.jcfg

general:

https = true

admin:

admin_https = true

certificates:

cert_pem = /cert/cert.pem

cert_key = /cert/key.pem
vim /opt/janus/etc/janus/janus.transport.websockets.jcfg

general:

wss = true

admin:

admin_wss = true

certificates:

cert_pem = /cert/cert.pem

cert_key = /cert/key.pem
五、起动有关手机软件
a.起动STUN\TURN网络服务器
/usr/local/bin/turnserver -c /usr/local/etc/turnserver.conf -o
内部网/外网地址/网站域名 IP 3478 端口号 必须通才行
b.起动janus-gateway server
/opt/janus/bin/janus -b
c.起动nginx
systemctl restart nginx
六、2个pc中间检测

janus 的demo 对访问器适配并不是非常好

文中关键参照:meetecho/janus-gateway