静看光阴荏苒
不管不顾不问不说也不念

Screego:便捷的共享你的屏幕

Screego可以以高质量和低延迟来共享你的屏幕,带有简单的身份验证,并集成了TURN服务方便NAT遍历。

先安装一些需要用到的基本工具:

apt -y update
apt -y install nginx python-certbot-nginx supervisor
systemctl start supervisor nginx
systemctl enable supervisor nginx

作者提供了screego的二进制文件,直接下载解压即可:

mkdir -p /opt/screego && cd /opt/screego
wget https://github.com/screego/server/releases/download/v1.0.1/screego_1.0.1_linux_amd64.tar.gz
tar -xzvf screego_1.0.1_linux_amd64.tar.gz

新建一个配置文件:

nano screego.config

写入如下配置:

# 设置你的服务器公网IP
SCREEGO_EXTERNAL_IP=
# 设置一个随机的密钥
SCREEGO_SECRET=
# 后续使用nginx反向代理,这里关闭内部的TLS
SCREEGO_SERVER_TLS=false
# 监听端口,后续使用反向代理,这里设置监听在本地
SCREEGO_SERVER_ADDRESS=127.0.0.1:5050
# TURN监听端口
SCREEGO_TURN_ADDRESS=0.0.0.0:3478
# 使用反向代理必须启用
SCREEGO_TRUST_PROXY_HEADERS=true
# 所有请求都需要身份验证
SCREEGO_AUTH_MODE=all
# 修改为你的域名
SCREEGO_CORS_ALLOWED_ORIGINS=https://screego.imlala.best
# 日志信息
SCREEGO_LOG_LEVEL=info
# 用于身份验证的文件
SCREEGO_USERS_FILE=user

使用下面的命令生成一个账号:

./screego hash --name "imlala" --pass "password"

再新建一个user文件保存账号信息:

nano user

写入之前命令回显的内容,类似于:

imlala:$2c$12$zjkTfyIjX7JMDCQyiDk/nuApesI.sLJEGLbR1sjy8.T/EicxvA0WK

这样做一个身份验证的好处是防止滥用,只有登录的用户才有权限建立一个新的房间。

否则只要访问到你的域名,任何人都可以建立房间,当然如果你希望这样做的话,可以修改screego.config:

SCREEGO_AUTH_MODE=turn

或者(这将不会验证TURN连接)

SCREEGO_AUTH_MODE=none

接下来新建一个supervisor配置文件用于守护screego进程:

nano /etc/supervisor/conf.d/screego.conf

写入如下配置:

[program:screego]
priority=1
directory=/opt/screego
command=/opt/screego/screego serve
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/supervisor/screego.log

更新supervisor一下即可启动screego:

supervisorctl update

现在使用nginx进行反向代理,新建一个nginx站点配置文件:

nano /etc/nginx/conf.d/screego.conf

写入如下配置:

server {
    listen 80;
    server_name screego.imlala.best;

    location / {
        proxy_pass         http://127.0.0.1:5050;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection "upgrade";
        proxy_redirect     http:// $scheme://;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto http;
        proxy_set_header   Host $http_host;
    }
}

使用certbot签ssl证书:

certbot --nginx --agree-tos --no-eff-email --email example@qq.com

登录:

创建房间,创建好的房间地址复制可以分享给别人访问:

接下来就可以共享你的屏幕或者程序窗口了:

赞(5)
未经允许不得转载:荒岛 » Screego:便捷的共享你的屏幕
分享到: 更多 (0)

评论 13

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    共享看片 指日可待 :shock:

    橘子4年前 (2020-10-07) Google Chrome 84.0.4147.81 Google Chrome 84.0.4147.81 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 真别说,以前酷安上有人用 TeamViewer 共享看片。

      Daniel4年前 (2020-10-07) Google Chrome 85.0.4183.127 Google Chrome 85.0.4183.127 Android 9 Android 9回复
    • 明天在水一个可以直播看片的小东西 :razz:

      LALA4年前 (2020-10-07) Google Chrome 80.0.3987.163 Google Chrome 80.0.3987.163 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 啊期待 :mrgreen:

        cupidads4年前 (2020-10-08) Google Chrome 85.0.4183.121 Google Chrome 85.0.4183.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    跟windows rdp比起来咋样

    :)4年前 (2020-10-08) Firefox 33.0 Firefox 33.0 Windows 7 x64 Edition Windows 7 x64 Edition回复
  3. #3

    如果我想使用远程协助,不仅仅是看屏幕,还要操作,是否有这样的开源服务?

    cctv4年前 (2020-10-08) Google Chrome 78.0.3904.108 Google Chrome 78.0.3904.108 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    唉,lala还在坚持玩着冒险岛,我上次玩了下,感觉没太多时间就放弃了~ :!:

    BobMaster4年前 (2020-10-09) Google Chrome 85.0.4183.121 Google Chrome 85.0.4183.121 GNU/Linux x64 GNU/Linux x64回复
    • 最近也没怎么玩了,太肝了。。

      LALA4年前 (2020-10-10) Google Chrome 80.0.3987.163 Google Chrome 80.0.3987.163 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    博主你好,我遇到一个问题,我搭建成功了,nginx也用了https,也登陆成功了,创建房间之后页面跳成空白了,chrome没有弹出来共享屏幕的提示,之后该怎么操作?在哪里然别人看到我共享的屏幕

    yanling4年前 (2020-10-13) Firefox 81.0 Firefox 81.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 按F12打开chrome开发者工具看看里面的console和network栏是不是有显示什么报错。

      LALA4年前 (2020-10-14) Google Chrome 85.0.4183.121 Google Chrome 85.0.4183.121 GNU/Linux x64 GNU/Linux x64回复
  6. #6

    我用的宝塔nginx做的反向代理,感觉像是宝塔的问题,不好整

    yanling4年前 (2020-10-13) Firefox 81.0 Firefox 81.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
  7. #7

    https://www.linuxprobe.com/screego-create-screen.html

    1233年前 (2020-11-08) Firefox 82.0 Firefox 82.0 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿