1. 介绍
开源的多平台支持的屏幕共享与协作工具,旨在促进无缝的远程沟通和团队协作。
主要功能
屏幕共享。
远程协助:通过互联网查看和控制其他计算机的桌面,提供远程支持和协助。
文件传输:无需依赖第三方工具或云存储服务,在本地计算机和远程计算机之间传输文件,确保高效的文档和数据共享。
2. 需要环境
2.1 硬件需求
CPU:至少1核
内存:推荐≥1G
硬盘:无特殊要求
2.2 软件需求
需要Linux系统,Docker、Docker-Compose,环境安装见《必备的Docker和Dockercompose环境安装》,本安装环境均基于Debian11。
3.部署
3.1 Docker-Compose方式安装
# 切换到root权限
sudo -i
# 创建数据文件夹
mkdir /etc/docker/screego && cd /etc/docker/screego
```bash
# 编辑docker-compose文件
vim docker-compose.yaml
```json
version: "3.7"
services:
screego:
image: ghcr.io/screego/server:1.10.3
container_name: screego
restart: always
ports:
- 5050:5050
- 3478:3478
- 50000-50200:50000-50200/udp
volumes:
- /etc/docker/screego:/etc/screego
environment:
# 局域网 ip 或公网 ip,访问时 https://ip:5050,非固定IP参考下方配置文件写法
SCREEGO_EXTERNAL_IP: xx.xx.xx.xx
SCREEGO_TURN_PORT_RANGE: "50000:50200"
# 设置密钥,任意随机字符就行
SCREEGO_SECRET: SECRET
# all: User login is always required
# turn: User login is required for TURN connections
# none: User login is never required
SCREEGO_AUTH_MODE: turn
# File Format:
# user1:bcrypt_password_hash
# user2:bcrypt_password_hash
# Example:
# user1:$2a$12$WEfYCnWGk0PDzbATLTNiTuoZ7e/43v6DM/h7arOnPU6qEtFG.kZQy
#
# The user password pair can be created via
# screego hash --name "user1" --pass "your password"
# 可用screego的win版本生成,也可用hash直接生成
SCREEGO_USERS_FILE: /etc/screego/users
复制上述配置文件内容,shift+ins
粘贴文本后,输入 :wq
退出保存
#启动安装服务
docker-compose up -d
screego读取配置文件的目录顺序
Environment Variables
screego.config.local (in same path as the binary)
screego.config (in same path as the binary)
$HOME/.config/screego/server.config
/etc/screego/server.config
官方配置文件参考
# The external ip of the server.
# When using a dual stack setup define both IPv4 & IPv6 separated by a comma.
# Execute the following command on the server you want to host Screego
# to find your external ip.
# curl 'https://api.ipify.org'
# Example:
# SCREEGO_EXTERNAL_IP=192.168.178.2,2a01:c22:a87c:e500:2d8:61ff:fec7:f92a
#
# If the server doesn't have a static ip, the ip can be obtained via a domain:
# SCREEGO_EXTERNAL_IP=dns:app.screego.net
# You can also specify the dns server to use
# SCREEGO_EXTERNAL_IP=dns:[email protected]:53
SCREEGO_EXTERNAL_IP=
# A secret which should be unique. Is used for cookie authentication.
SCREEGO_SECRET=
# If TLS should be enabled for HTTP requests. Screego requires TLS,
# you either have to enable this setting or serve TLS via a reverse proxy.
SCREEGO_SERVER_TLS=false
# The TLS cert file (only needed if TLS is enabled)
SCREEGO_TLS_CERT_FILE=
# The TLS key file (only needed if TLS is enabled)
SCREEGO_TLS_KEY_FILE=
# The address the http server will listen on.
# Formats:
# - host:port
# Example: 127.0.0.1:5050
# - unix socket (must be prefixed with unix:)
# Example: unix:/my/file/path.socket
SCREEGO_SERVER_ADDRESS=0.0.0.0:5050
# The address the TURN server will listen on.
SCREEGO_TURN_ADDRESS=0.0.0.0:3478
# Limit the ports that TURN will use for data relaying.
# Format: min:max
# Example:
# 50000:55000
SCREEGO_TURN_PORT_RANGE=
# If set, screego will not start TURN server and instead use an external TURN server.
# When using a dual stack setup define both IPv4 & IPv6 separated by a comma.
# Execute the following command on the server where you host TURN server
# to find your external ip.
# curl 'https://api.ipify.org'
# Example:
# SCREEGO_TURN_EXTERNAL_IP=192.168.178.2,2a01:c22:a87c:e500:2d8:61ff:fec7:f92a
#
# If the turn server doesn't have a static ip, the ip can be obtained via a domain:
# SCREEGO_TURN_EXTERNAL_IP=dns:turn.screego.net
# You can also specify the dns server to use
# SCREEGO_TURN_EXTERNAL_IP=dns:[email protected]:53
SCREEGO_TURN_EXTERNAL_IP=
# The port the external TURN server listens on.
SCREEGO_TURN_EXTERNAL_PORT=3478
# Authentication secret for the external TURN server.
SCREEGO_TURN_EXTERNAL_SECRET=
# If reverse proxy headers should be trusted.
# Screego uses ip whitelisting for authentication
# of TURN connections. When behind a proxy the ip is always the proxy server.
# To still allow whitelisting this setting must be enabled and
# the `X-Real-Ip` header must be set by the reverse proxy.
SCREEGO_TRUST_PROXY_HEADERS=false
# Defines when a user login is required
# Possible values:
# all: User login is always required
# turn: User login is required for TURN connections
# none: User login is never required
SCREEGO_AUTH_MODE=turn
# Defines origins that will be allowed to access Screego (HTTP + WebSocket)
# The default value is sufficient for most use-cases.
# Example Value: https://screego.net,https://sub.gotify.net
SCREEGO_CORS_ALLOWED_ORIGINS=
# Defines the location of the users file.
# File Format:
# user1:bcrypt_password_hash
# user2:bcrypt_password_hash
#
# Example:
# user1:$2a$12$WEfYCnWGk0PDzbATLTNiTuoZ7e/43v6DM/h7arOnPU6qEtFG.kZQy
#
# The user password pair can be created via
# screego hash --name "user1" --pass "your password"
SCREEGO_USERS_FILE=
# Defines how long a user session is valid in seconds.
# 0 = session invalides after browser session ends
SCREEGO_SESSION_TIMEOUT_SECONDS=0
# Defines the default value for the checkbox in the room creation dialog to select
# if the room should be closed when the room owner leaves
SCREEGO_CLOSE_ROOM_WHEN_OWNER_LEAVES=true
# The loglevel (one of: debug, info, warn, error)
SCREEGO_LOG_LEVEL=info
# If screego should expose a prometheus endpoint at /metrics. The endpoint
# requires basic authentication from a user in the users file.
SCREEGO_PROMETHEUS=false
4.使用配置
screego的win版本,可用来搭建windows版本,或者生成user密钥
screego hash --name "user1" --pass "your password"
screego_1.10.3_windows_i386.zip
https://wwxo.lanzoub.com/itZfd2nh63wj
端对端连接方式有两种一种是turn,一种stun。
stun只在创建room时经过服务器,当传输视频流时,由端对端直连不经过服务器中转。
turn全程经过服务器中转,包括创建room和视频流。
评论区