-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcffd10b5.cdca6b52.js
More file actions
1 lines (1 loc) · 10.4 KB
/
cffd10b5.cdca6b52.js
File metadata and controls
1 lines (1 loc) · 10.4 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{111:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return i})),t.d(n,"metadata",(function(){return o})),t.d(n,"rightToc",(function(){return s})),t.d(n,"default",(function(){return p}));var a=t(2),r=t(6),c=(t(0),t(130)),i={layout:"post",title:"Coturn\u670d\u52a1\u5b89\u88c5",category:"IM",description:"im muti-conference"},o={unversionedId:"prepare/coturn",id:"prepare/coturn",isDocsHomePage:!1,title:"Coturn\u670d\u52a1\u5b89\u88c5",description:"im muti-conference",source:"@site/docs/prepare/coturn.md",slug:"/prepare/coturn",permalink:"/docs/prepare/coturn",version:"current",sidebar:"docs",previous:{title:"Nginx\u5b89\u88c5\u914d\u7f6e\u8bf4\u660e",permalink:"/docs/prepare/nginx"},next:{title:"Centos\u4e0a\u5355\u673a\u90e8\u7f72\u5b9e\u8df5",permalink:"/docs/guide/centos"}},s=[{value:"Ubuntu \u5b89\u88c5\u8bf4\u660e",id:"ubuntu-\u5b89\u88c5\u8bf4\u660e",children:[{value:"\u5b89\u88c5\u4f9d\u8d56\u5e93",id:"\u5b89\u88c5\u4f9d\u8d56\u5e93",children:[]},{value:"\u4e0b\u8f7d\u6e90\u7801\u5e76\u7f16\u8bd1\u5b89\u88c5",id:"\u4e0b\u8f7d\u6e90\u7801\u5e76\u7f16\u8bd1\u5b89\u88c5",children:[]},{value:"\u914d\u7f6e\u6587\u4ef6",id:"\u914d\u7f6e\u6587\u4ef6",children:[]},{value:"\u542f\u52a8turnserver",id:"\u542f\u52a8turnserver",children:[]}]},{value:"\u5b89\u88c5\u9a8c\u8bc1",id:"\u5b89\u88c5\u9a8c\u8bc1",children:[]},{value:"\u53c2\u8003\u8d44\u6599",id:"\u53c2\u8003\u8d44\u6599",children:[]}],l={rightToc:s};function p(e){var n=e.components,t=Object(r.a)(e,["components"]);return Object(c.b)("wrapper",Object(a.a)({},l,t,{components:n,mdxType:"MDXLayout"}),Object(c.b)("p",null,"\u672c\u6587\u4e3b\u8981\u8bf4\u660e\u5982\u4f55\u5728",Object(c.b)("inlineCode",{parentName:"p"},"ubuntu"),"\u548c",Object(c.b)("inlineCode",{parentName:"p"},"centos"),"\u5b89\u88c5",Object(c.b)("inlineCode",{parentName:"p"},"coturn"),"\u670d\u52a1."),Object(c.b)("h2",{id:"ubuntu-\u5b89\u88c5\u8bf4\u660e"},"Ubuntu \u5b89\u88c5\u8bf4\u660e"),Object(c.b)("h3",{id:"\u5b89\u88c5\u4f9d\u8d56\u5e93"},"\u5b89\u88c5\u4f9d\u8d56\u5e93"),Object(c.b)("pre",null,Object(c.b)("code",Object(a.a)({parentName:"pre"},{className:"language-shell"}),"sudo apt-get update \nsudo apt-get install libssl-dev libevent-dev libpq-dev mysql-client libmysqlclient-dev libhiredis-dev make -y\nsudo apt-get install gdebi-core -y\nsudo apt-get install sqlite libsqlite3-dev -y\nsudo apt-get install git -y\n")),Object(c.b)("h3",{id:"\u4e0b\u8f7d\u6e90\u7801\u5e76\u7f16\u8bd1\u5b89\u88c5"},"\u4e0b\u8f7d\u6e90\u7801\u5e76\u7f16\u8bd1\u5b89\u88c5"),Object(c.b)("pre",null,Object(c.b)("code",Object(a.a)({parentName:"pre"},{className:"language-shell"}),"git clone https://github.com/coturn/coturn\ncd coturn\n./configure --prefix=/usr/local/coturn\nmake && make install\n")),Object(c.b)("h3",{id:"\u914d\u7f6e\u6587\u4ef6"},"\u914d\u7f6e\u6587\u4ef6"),Object(c.b)("pre",null,Object(c.b)("code",Object(a.a)({parentName:"pre"},{className:"language-conf"}),"# \u76d1\u542c\u7aef\u53e3\uff0c\u4e0d\u914d\u7f6e\u7684\u8bdd\uff0c\u9ed8\u8ba4\u662f3478\nlistening-port=3478\n# \u5185\u7f51\u5730\u5740,\u8fd9\u91ccubuntu\u8bbe\u7f6e\u4e3a\u5916\u7f51\u5730\u5740,\u4e0d\u7136relay\u4f7f\u7528\u662f\u5185\u7f51\u5730\u5740,\u5bfc\u81f4\u6d4b\u8bd5\u65e0\u6cd5\u8054\u901a\nlistening-ip=129.227.138.58\n# \u5916\u7f51\u5730\u5740\nexternal-ip=129.227.138.58\n# \u8bbe\u7f6e\u7528\u6237\u540d\u53ca\u5bc6\u7801\uff0c\u53ef\u8bbe\u7f6e\u591a\u4e2a,\u81ea\u5df1\u53ef\u4ee5\u4fee\u6539\nuser=user:key\nno-cli\ncli-password=$5$79a316b350311570$81df9cfb9af7f5e5a76eada31e7097b663a0670f99a3c07ded3f1c8e59c5658a\n")),Object(c.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(c.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(c.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(c.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},"\u53ef\u4ee5\u5c06\u4ee5\u4e0a\u6587\u4ef6\u4fdd\u5b58\u53ea",Object(c.b)("inlineCode",{parentName:"p"},"turnserver.cnf")," \u9632\u6b62\u5230",Object(c.b)("inlineCode",{parentName:"p"},"/etc/"),"\u76ee\u5f55\u4e0b"))),Object(c.b)("h3",{id:"\u542f\u52a8turnserver"},"\u542f\u52a8turnserver"),Object(c.b)("pre",null,Object(c.b)("code",Object(a.a)({parentName:"pre"},{className:"language-shell"}),"root@talk02:./usr/local/coturn/bin/turnserver -v -r \u5916\u7f51\u5730\u5740:3478 -a -o -c /etc/turnserver.conf\n")),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\u6267\u884c\u6210\u529f\u65e5\u5fd7")),Object(c.b)("pre",null,Object(c.b)("code",Object(a.a)({parentName:"pre"},{className:"language-shell"}),"0: log file opened: /var/log/turn_13704_2020-11-12.log\n0: Listener address to use: 129.227.138.58\n0: \nRFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server\nVersion Coturn-4.5.1.3 'dan Eider'\n0: \nMax number of open files/sockets allowed for this process: 1048576\n0: \nDue to the open files/sockets limitation,\nmax supported number of TURN Sessions possible is: 524000 (approximately)\n0: \n\n==== Show him the instruments, Practical Frost: ====\n\n0: TLS supported\n0: DTLS supported\n0: DTLS 1.2 supported\n0: TURN/STUN ALPN supported\n0: Third-party authorization (oAuth) supported\n0: GCM (AEAD) supported\n0: OpenSSL compile-time version: OpenSSL 1.1.1 11 Sep 2018 (0x1010100f)\n0: \n0: SQLite supported, default database location is /usr/local/coturn/var/db/turndb\n0: Redis supported\n0: PostgreSQL supported\n0: MySQL supported\n0: MongoDB is not supported\n0: \n0: Default Net Engine version: 3 (UDP thread per CPU core)\n\n=====================================================\n\n0: Domain name: \n0: Default realm: 129.227.138.58:3478\n0: WARNING: cannot find certificate file: turn_server_cert.pem (1)\n0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly\n0: WARNING: cannot find private key file: turn_server_pkey.pem (1)\n0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly\n0: Relay address to use: 129.227.138.58\n\n")),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},"\u9a8c\u8bc13478\u7aef\u53e3\u662f\u5426\u76d1\u542c\u6210\u529f")),Object(c.b)("pre",null,Object(c.b)("code",Object(a.a)({parentName:"pre"},{className:"language-shell"}),"root@talk02:/usr/local/coturn/bin# netstat -nao | grep 3478\n\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\ntcp 0 0 129.227.138.58:3478 0.0.0.0:* LISTEN off (0.00/0/0)\nsctp 129.227.138.58:3478 LISTEN \nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\nudp 0 0 129.227.138.58:3478 0.0.0.0:* off (0.00/0/0)\n\n")),Object(c.b)("h2",{id:"\u5b89\u88c5\u9a8c\u8bc1"},"\u5b89\u88c5\u9a8c\u8bc1"),Object(c.b)("p",null,"\u70b9\u51fb",Object(c.b)("a",Object(a.a)({parentName:"p"},{href:"https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/"}),"WebRTC samples Trickle ICE")),Object(c.b)("p",null,Object(c.b)("img",Object(a.a)({parentName:"p"},{src:"https://media.comsince.cn/minio-bucket-image-name/1-qJqkqkBB-1605164184442-image.png",alt:"trackleice"}))),Object(c.b)("div",{className:"admonition admonition-warning alert alert--danger"},Object(c.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(c.b)("h5",{parentName:"div"},Object(c.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(c.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(c.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})))),"warning")),Object(c.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(c.b)("p",{parentName:"div"},"\u51fa\u73b0\u5982\u4e0a\u7684\u7ea2\u8272\u6807\u8bb0\u4ee3\u8868\u6210\u529f."))),Object(c.b)("h2",{id:"\u53c2\u8003\u8d44\u6599"},"\u53c2\u8003\u8d44\u6599"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(a.a)({parentName:"li"},{href:"https://www.tiocloud.com/1215956203931312128?pageNumber=1"}),"centos\u4e0b\u5b89\u88c5turnserver"))))}p.isMDXComponent=!0}}]);