Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtsm committed Jan 15, 2022
1 parent 94917ff commit 968a550
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 30 deletions.
96 changes: 66 additions & 30 deletions README.md
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
![](https://img.shields.io/badge/webrtc-p2p-blue)
![](https://img.shields.io/badge/code-simple-green)
![](https://img.shields.io/badge/large%20file-support-green)
![](https://img.shields.io/badge/deployment-private-yellow)
![](https://img.shields.io/badge/platform-unlimited-coral)

## 准备

安装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 ...`

## 概述图

![image](doc/tl-rtc-file-tool.jpg)
### 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

![image](doc/tl-rtc-file-tool.jpg)


### Chinese

[中文说明](doc/README_ZN.md)
69 changes: 69 additions & 0 deletions doc/README_ZN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# tl-rtc-file-tool

![](https://img.shields.io/badge/webrtc-p2p-blue)
![](https://img.shields.io/badge/code-simple-green)
![](https://img.shields.io/badge/large%20file-support-green)
![](https://img.shields.io/badge/deployment-private-yellow)
![](https://img.shields.io/badge/platform-unlimited-coral)

#### 简介 : (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,文件内容按需修改


## 概述图

![image](tl-rtc-file-tool.jpg)

0 comments on commit 968a550

Please sign in to comment.