Code Monkey home page Code Monkey logo

tl-open-source / tl-rtc-file Goto Github PK

View Code? Open in Web Editor NEW
2.2K 9.0 223.0 32.89 MB

WebRTC P2P online web media streaming tool (for files, video, screen, live streaming, text) with management and statistical monitoring capabilities.

Home Page: https://im.iamtsm.cn/website/index.html

License: MIT License

Shell 3.35% JavaScript 67.94% CSS 3.64% HTML 17.54% Vue 3.00% TypeScript 4.03% Batchfile 0.48% Dockerfile 0.02%
webrtc p2p filetransfer websocket node turnserver demotool

tl-rtc-file's Issues

安装成功的例子

  1. 开放端口 3478 9092
  2. git clone https://github.com/tl-open-source/tl-rtc-file.git
  3. cd tl-rtc-file/svr/
  4. npm install
  5. npm run build:pro
  6. npm run lsocket
  7. IP:9092
  8. git clone https://github.com/coturn/coturn.git
    腾讯云CentOS 8.4搭建coturn服务

用户名密码:tlrtcfile tlrtcfile 不是 admin 123456
https://blog.csdn.net/u012414498/article/details/129020739?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-129020739-blog-121621052.235%5Ev38%5Epc_relevant_anti_t3_base&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-129020739-blog-121621052.235%5Ev38%5Epc_relevant_anti_t3_base&utm_relevant_index=2

8.sh start-local.sh # 缺少pm2就装npm install -g pm2
9.IP:9092

其他命令:
lsof -i tcp:8444
kill -9 1243894 #依端口停止应用
ps -ef | grep nginx | awk '{print $2}' | xargs kill -9#根据名字批量停止应用
image

握手失败通过tcp直连

我在一个有公网IP的服务器上部署,如果用户P2P握手失败,可以通过该服务器中转,保证连通性。

请教 Docker 启动后 ,nginx 该如何配置.

docker compose --profile=http up

#PROXY-START/


location /
{
    proxy_pass http://127.0.0.1:9092;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    
    add_header X-Cache $upstream_cache_status;
    
    #Set Nginx Cache
    
    	add_header Cache-Control no-cache;
}

location /ws {
  proxy_pass http://127.0.0.1:8444;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
  proxy_set_header Host $host;
}

#PROXY-END/

但是发现只有Chrome正常的.
手机 和 电脑的Safari 连接时报错. docker 也没有日志输出
image

env 文件没有改

#-----------------以下为基础配置-----------------#
## api服务端口
tl_rtc_file_api_port=9092
## websocket服务端口
tl_rtc_file_socket_port=8444
## websocket服务地址
tl_rtc_file_socket_host=127.0.0.1:8444


#-----------------以下为webrtc相关配置-----------------#
## webrtc-stun中继服务地址
tl_rtc_file_webrtc_stun_host=stun:127.0.0.1:3478
## webrtc-turn中继服务地址
tl_rtc_file_webrtc_turn_host=turn:127.0.0.1:3478?transport=udp
## webrtc中继服务用户名
tl_rtc_file_webrtc_turn_username=tlrtcfile
## webrtc中继服务密码
tl_rtc_file_webrtc_turn_credential=tlrtcfile
## webrtc中继服务Secret
tl_rtc_file_webrtc_turn_secret=tlrtcfile
## webrtc中继服务帐号过期时间 (毫秒)
tl_rtc_file_webrtc_turn_expire=86400000


#-----------------以下为mysql数据库相关配置-----------------#
## 是否开启数据库
tl_rtc_file_db_open=false
## 数据库地址
tl_rtc_file_db_mysql_host=mysql
## 数据库端口
tl_rtc_file_db_mysql_port=3306
## 数据库名称
tl_rtc_file_db_mysql_dbName=webchat
## 数据库用户名
tl_rtc_file_db_mysql_user=tlrtcfile
## 数据库密码
tl_rtc_file_db_mysql_password=tlrtcfile

#-----------------以下为oss相关配置-----------------#
## oss-seafile存储库ID
tl_rtc_file_oss_seafile_repoid=
## oss-seafile地址
tl_rtc_file_oss_seafile_host=
## oss-seafile用户名
tl_rtc_file_oss_seafile_username=
## oss-seafile密码
tl_rtc_file_oss_seafile_password=

## oss-alyun存储accessKey
tl_rtc_file_oss_alyun_AccessKey=
## oss-aly存储SecretKey
tl_rtc_file_oss_alyun_Secretkey=
## oss-aly存储bucket
tl_rtc_file_oss_alyun_bucket=

## oss-txyun存储accessKey
tl_rtc_file_oss_txyun_AccessKey=
## oss-txyunt存储SecretKey
tl_rtc_file_oss_txyun_Secretkey=
## oss-txyun存储bucket
tl_rtc_file_oss_txyun_bucket=

## oss-qiniuyun存储accessKey
tl_rtc_file_oss_qiniuyun_AccessKey=
## oss-qiniuyunt存储SecretKey
tl_rtc_file_oss_qiniuyun_Secretkey=
## oss-qiniuyun存储bucket
tl_rtc_file_oss_qiniuyun_bucket=


#-----------------以下为管理后台相关配置-----------------#
## 管理后台房间号
tl_rtc_file_manage_room=tlrtcfile
## 管理后台密码
tl_rtc_file_manage_password=tlrtcfile


#-----------------以下为openai相关配置-----------------#
## openai-key,如果有多个key,逗号分隔
tl_rtc_file_openai_keys=


#-----------------以下为企业微信通知相关配置-----------------#
## 企业微信通知开关
tl_rtc_file_notify_open=false
## 企业微信通知机器人KEY,正常通知,如果有多个key,逗号分隔
tl_rtc_file_notify_qiwei_normal=
## 企业微信通知机器人KEY,错误通知,如果有多个key,逗号分隔
tl_rtc_file_notify_qiwei_error=

Docker部署后遇到的报错

按照如下步骤进行操作
image

执行镜像以后,镜像启动失败,报错如下:standard_init_linux.go:185: exec user process caused "exec format error"
image

操作系统:ubuntu16.04 server
docker版本:
image

请大佬帮忙看下,如何解决

服务访问异常

启动看着没问题,但是浏览器访问不了

做了些改动
[root@tool-10-0-0-13 tl-rtc-file]# cat Dockerfile
FROM node:14

WORKDIR /home/tlrtcfile

ADD . ./

COPY sources.list /etc/apt/sources.list

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 &&
apt update &&
apt install -y libxtst-dev &&
npm conf set registry https://registry.npm.taobao.org/ &&
npm install -g pm2 &&
cd /home/tlrtcfile/svr/ &&
npm install &&
cd /home/tlrtcfile/svr/build/webpack/ &&
npm install

EXPOSE 9092 8444

CMD ["/bin/sh", "docker-entrypoint.sh"

[root@tool-10-0-0-13 tl-rtc-file]# cat docker-entrypoint.sh
#!/bin/bash

cd /home/tlrtcfile/svr

pm2 start npm --name=tlsocket -- run ssocket
pm2 start npm --name=tlapi -- run sapi

cd build/webpack

pm2 start npm --name=tlbuild -- run pro

pm2 logs --lines 1000

数据库连接已添加

image
image

是否支持内网传输

我看这篇文章 https://zhuanlan.zhihu.com/p/345733012 的后面说到 “新版chrome内核已经无法获取明确的本地ip,而是一个指向本机ip的mDNS,导致在相同内网的不同设备无法走内网传输;” , 请问你这个项目能突破这个限制,实现内网传输吗?如果所有文件都必须经过中转服务器,那么就会严重受到服务器带宽限制了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.