-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
135 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,98 @@ | ||
# tl-rtc-file-tool | ||
|
||
#### 简介 : (tl webrtc datachannel filetools)用webrt在web端传输文件,支持传输超大文件。 | ||
#### 优点 : 分片传输,跨终端,不限平台,方便使用,内网不限速,支持私有部署 | ||
#### 体验 : https://im.iamtsm.cn/file | ||
 | ||
 | ||
 | ||
 | ||
 | ||
|
||
## 准备 | ||
|
||
安装node,npm后进入项目目录 | ||
|
||
npm install | ||
#### demo : https://im.iamtsm.cn/file | ||
|
||
进入build目录 : cd build/webpack/ | ||
|
||
安装一些依赖 : npm install | ||
## Table of Contents | ||
|
||
- [Prepare](#Prepare) | ||
|
||
修改res目录, 保持后台开启即可 | ||
- [Debug](#Debug) | ||
|
||
npm run dev 打包开发环境min | ||
- [Production](#Production) | ||
|
||
npm run pro 打包生产环境min | ||
- [Database-Configuration](#Database-Configuration) | ||
|
||
## 测试环境 | ||
- [Wss-Configuration](#Wss-Configuration) | ||
|
||
本地启动file-res : npm run dev | ||
- [TurnServer-Configuration](#TurnServer-Configuration) | ||
|
||
本地启动file-socket : npm run devsocket | ||
- [Overview](#Overview) | ||
|
||
## 线上环境 (需要配置wss) | ||
- [中文说明](#Chinese) | ||
|
||
公网环境启动file-res : npm run svr | ||
### Prepare | ||
|
||
公网环境启动file-socket : npm run svrsocket | ||
Before this you need to install `node` and `npm`。 | ||
|
||
If already installed `node` and `npm`, enter the project directory and execute `npm install`, enter the build directory to install node dependencies `npm install`。 | ||
|
||
## 配置db | ||
If you want to modify the web resource code, keep webpack running in the background。 | ||
|
||
修改conf/cfg.json中相应db配置即可, 如open, dbName, host, port, user, pwd 等 | ||
debug environment uses `npm run dev` | ||
|
||
production environment uses `npm run pro` | ||
|
||
## 配置wss | ||
### Debug | ||
|
||
修改conf/cfg.json中相应ws配置即可,如port, ws_online等 | ||
debugging environment starts the web `npm run dev` | ||
|
||
debugging environment starts the file socket `npm run devsocket` | ||
|
||
## 配置turnserver (私有部署) | ||
### Production | ||
|
||
ubuntu: | ||
##### If you want to deploy in a public network environment, you need to configure wss | ||
|
||
1. sudo apt-get install coturn #安装coturn | ||
Production environment starts the web `npm run svr` | ||
|
||
2. cp conf/turn/turnserver.conf /etc/turnserver.conf #修改配置文件, 文件内容按需修改 | ||
Production environment starts the file socket `npm run svrsocket` | ||
|
||
3. chomd +x bin/genTurnUser.sh && ./genTurnUser.sh #文件内容按需修改 | ||
|
||
4. chomd +x bin/startTurnServer.sh && ./startTurnServer.sh #启动turnserver,文件内容按需修改 | ||
### Database-Configuration | ||
|
||
If you want to configure open database related, you can modify the configuration in conf/cfg.json。`open, dbName, host, port, user, pwd ...` | ||
|
||
## 概述图 | ||
|
||
 | ||
### Wss-Configuration | ||
|
||
If you want to configure open database related, you can modify the configuration ws in conf/cfg.json。`port, ws_online ...` | ||
|
||
|
||
### TurnServer-Configuration | ||
|
||
1. install coturn ( ubuntu ) | ||
|
||
sudo apt-get install coturn | ||
|
||
2. modify conf/turn/turnserver.conf and execute | ||
|
||
cp conf/turn/turnserver.conf /etc/turnserver.conf | ||
|
||
3. modify bin/genTurnUser.sh and execute | ||
|
||
chomd +x bin/genTurnUser.sh && ./genTurnUser.sh | ||
|
||
4. modify bin/startTurnServer.sh and execute | ||
|
||
chomd +x bin/startTurnServer.sh | ||
|
||
5. start turn server | ||
|
||
./startTurnServer.sh | ||
|
||
|
||
### Overview | ||
|
||
 | ||
|
||
|
||
### Chinese | ||
|
||
[中文说明](doc/README_ZN.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# tl-rtc-file-tool | ||
|
||
 | ||
 | ||
 | ||
 | ||
 | ||
|
||
#### 简介 : (tl webrtc datachannel filetools)用webrt在web端传输文件,支持传输超大文件。 | ||
#### 优点 : 分片传输,跨终端,不限平台,方便使用,内网不限速,支持私有部署 | ||
|
||
#### 体验 : https://im.iamtsm.cn/file | ||
|
||
## 准备 | ||
|
||
安装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,文件内容按需修改 | ||
|
||
|
||
## 概述图 | ||
|
||
 |