WebRTC推流
小节要点:
- localhost可以用http直接推
- 内网或服务器IP用自签名的https证书
- 有效SSL不需要安全确认
HTTP
http可以通过localhost来推流
自签名证书
使用go-oryx
git clone https://gitee.com/modouhang/go-oryx.git
cd httpx-static
生成证书:
openssl genrsa -out server.key 2048&& subj="/C=CN/ST=Beijing/L=Beijing/O=Me/OU=Me/CN=me.org"&& openssl rep -new -x509 -key server.key -out server.crt -days 365 -subj $subj
编译二进制:
go build -mod=vendor .
得到httpx-static
执行
./httpx-static
得到私钥和证