webrtc file transfer tool

語言: CN / TW / HK

tl-rtc-file-tool

背景 : 20年畢設的題目相關整理出來的

簡介 : (tl webrtc datachannel filetools)用webrt在web端傳輸檔案,支援傳輸超大檔案。

優點 : 分片傳輸,跨終端,不限平臺,方便使用,內網不限速,支援私有部署

體驗 : http://im.iamtsm.cn/file

qq交流群 : 624214498

準備

安裝node,npm後進入專案目錄

npm install

進入build目錄 : cd build/webpack/  

安裝一些依賴 : npm install


修改res目錄, 保持後臺開啟即可

npm run dev 打包開發環境min

npm run pro 打包生產環境min

測試環境

本地啟動file-res : npm run dev

本地啟動file-socket : npm run devsocket

線上環境 (需要配置wss)

公網環境啟動file-res : npm run svr 

公網環境啟動file-socket : npm run svrsocket

配置db

修改conf/cfg.json中相應db配置即可, 如open, dbName, host, port, user, pwd 等

配置wss

修改conf/cfg.json中相應ws配置即可,如port, ws_online等

配置turnserver (私有部署)

ubuntu:

1. sudo apt-get install coturn  #安裝coturn 

2. cp conf/turn/turnserver.conf /etc/turnserver.conf    #修改配置檔案, 檔案內容按需修改

3. chomd +x bin/genTurnUser.sh && ./genTurnUser.sh     #檔案內容按需修改

4. chomd +x bin/startTurnServer.sh && ./startTurnServer.sh     #啟動turnserver,檔案內容按需修改

Docker

修改conf/cfg.json中的ws_online的ip地址(有更好的辦法可以反饋下)

docker build -t iamtsm/tl-rtc-file .

docker run -p 9092:9092 -p 8444:8444 --name local -d iamtsm/tl-rtc-file

訪問 : http://localhost:9092 或者 http://本機ip:9092

概述圖

引用致謝

scroxt

layui

webpack

swiper

License

Apache License 2.0