mirror of
https://github.com/screego/server.git
synced 2026-04-22 23:47:03 +08:00
Add docs
This commit is contained in:
@@ -0,0 +1 @@
|
||||
screego.net
|
||||
@@ -0,0 +1,21 @@
|
||||
# screego/server
|
||||
|
||||
Screego was created because of a displeasure against cooperate chatting solutions.
|
||||
For developers, screen sharing shouldn't be optimized for low bandwidth or presenting some slides.
|
||||
It should be high definition, that you still can read the tiny font of your colleague.
|
||||
No more, "wait a minute, the stream isn't updating".
|
||||
|
||||
Screego is an addition to existing software and only helps to share your screen. Nothing else (:.
|
||||
|
||||
## Features
|
||||
|
||||
* Multi User Screenshare
|
||||
* Secure transfer via WebRTC
|
||||
* Low latency / High resolution
|
||||
* Simple Install via [Docker](https://hub.docker.com/r/screego/server) / single binary
|
||||
* Integrated [TURN](nat-traversal.md) Server see [NAT Traversal](nat-traversal.md)
|
||||
|
||||
|
||||
---
|
||||
|
||||
[Installation](install.md) ᛫ [Configuration](config.md)
|
||||
@@ -0,0 +1,6 @@
|
||||
* [Home](/)
|
||||
* [Installation](install.md)
|
||||
* [Config](config.md)
|
||||
* [NAT Traversal](nat-traversal.md)
|
||||
* [Reverse Proxy](proxy.md)
|
||||
* [GitHub](https://github.com/screego/server)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,72 @@
|
||||
# Config
|
||||
|
||||
!> TLS is required for Screego to work. Either enable TLS inside Screego or
|
||||
use a reverse proxy to serve Screego via TLS.
|
||||
|
||||
Screego tries to obtain config values from different locations in sequence.
|
||||
Properties will never be overridden. Thus, the first occurrence of a setting will be used.
|
||||
|
||||
#### Order
|
||||
|
||||
* 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`
|
||||
|
||||
#### Config Example
|
||||
|
||||
```ini
|
||||
# The external ip of the server
|
||||
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.
|
||||
SCREEGO_SERVER_ADDRESS=0.0.0.0:5050
|
||||
|
||||
# The address the TURN server will listen on.
|
||||
SCREEGO_TURN_ADDRESS=0.0.0.0:3478
|
||||
|
||||
# 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)
|
||||
# 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=
|
||||
|
||||
# The loglevel (one of: debug, info, warn, error)
|
||||
SCREEGO_LOG_LEVEL=info
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Screego</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="description" content="Screego - open source screen sharing for developers">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<style>
|
||||
.markdown-section h1 {
|
||||
border-width: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
const ghVersion = fetch('https://api.github.com/repos/screego/server/tags').then(resp => resp.json()).then(data => data[0].name.slice(1))
|
||||
window.$docsify = {
|
||||
name: 'screego',
|
||||
repo: 'screego/server',
|
||||
logo: '/logo.png',
|
||||
loadSidebar: true,
|
||||
autoHeader: true,
|
||||
maxLevel: 4,
|
||||
subMaxLevel: 2,
|
||||
plugins: [
|
||||
function (hook) {
|
||||
hook.afterEach(function (html, next) {
|
||||
ghVersion.then((version) => next(html.replaceAll('GITHUB_VERSION', version)))
|
||||
})
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-yaml.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-ini.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-bash.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-nginx.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,79 @@
|
||||
# Installation
|
||||
|
||||
Latest Version: **GITHUB_VERSION**
|
||||
|
||||
?> Before starting Screego you may read [Configuration](config.md).
|
||||
|
||||
## Docker
|
||||
|
||||
Setting up Screego with docker is pretty easy, you basically just have to start the docker container, and you are ready to go:
|
||||
|
||||
The [screego/server](https://hub.docker.com/r/screego/server) docker images are multi-arch docker images.
|
||||
This means the image will work for `amd64`, `i386`, `ppc64le` (power pc), `arm64`, `arm v7` (Raspberry PI).
|
||||
|
||||
```bash
|
||||
$ docker run -p 8080:5050 -e SCREEGO_EXTERNAL_IP=0.0.0.0 screego/server:GITHUB_VERSION
|
||||
```
|
||||
|
||||
By default, Screego runs on port 5050.
|
||||
|
||||
### docker-compose.yml
|
||||
|
||||
```yaml
|
||||
version: "3.7"
|
||||
services:
|
||||
screego:
|
||||
image: screego/server:GITHUB_VERSION
|
||||
ports:
|
||||
- 8080:5050
|
||||
environment:
|
||||
SCREEGO_EXTERNAL_IP: "0.0.0.0"
|
||||
```
|
||||
|
||||
## Binary
|
||||
|
||||
### Supported Platforms:
|
||||
|
||||
* linux_amd64 (64bit)
|
||||
* linux_i386 (32bit)
|
||||
* armv7 (32bit used for Raspberry Pi)
|
||||
* armv6
|
||||
* arm64 (ARMv8)
|
||||
* ppc64
|
||||
* ppc64le
|
||||
* windows_i386.exe (32bit)
|
||||
* windows_amd64.exe (64bit)
|
||||
|
||||
Download the zip with the binary for your platform from [screego/server Releases](https://github.com/screego/server/releases).
|
||||
|
||||
```bash
|
||||
$ wget https://github.com/screego/server/releases/download/vGITHUB_VERSION/screego_GITHUB_VERSION_{PLATFORM}.tar.gz
|
||||
```
|
||||
|
||||
Unzip the archive.
|
||||
|
||||
```bash
|
||||
$ tar xvf screego_GITHUB_VERSION_{PLATFORM}.tar.gz
|
||||
```
|
||||
|
||||
Make the binary executable (linux only).
|
||||
|
||||
```bash
|
||||
$ chmod +x screego
|
||||
```
|
||||
|
||||
Execute screego:
|
||||
|
||||
```bash
|
||||
$ ./screego
|
||||
# on windows
|
||||
$ screego.exe
|
||||
```
|
||||
|
||||
## Arch-Linux(aur)
|
||||
|
||||
TODO
|
||||
|
||||
## Source
|
||||
|
||||
TODO
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
+3130
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 227 KiB |
@@ -0,0 +1,30 @@
|
||||
# NAT Traversal
|
||||
|
||||
In most cases peers cannot directly communicate with each other because of firewalls or other restrictions like NAT.
|
||||
To work around this issue, WebRTC uses
|
||||
[Interactive Connectivity Establishment (ICE)](http://en.wikipedia.org/wiki/Interactive_Connectivity_Establishment).
|
||||
This is a framework for helping to connect peers.
|
||||
|
||||
ICE uses STUN and/or TURN servers to accomplish this.
|
||||
|
||||
?> Screego exposes a STUN and TURN server. You don't have to configure this separately.
|
||||
By default, user authentication is required for using TURN.
|
||||
|
||||
## STUN
|
||||
|
||||
[Session Traversal Utilities for NAT (STUN)](http://en.wikipedia.org/wiki/STUN) is used to find
|
||||
the public / external ip of a peer. This IP is later sent to others to create a direct connection.
|
||||
|
||||
When STUN is used, only the connection enstablishment will be done through Screego. The actual video stream will be
|
||||
directly sent to the other peer and doesn't go through Screego.
|
||||
|
||||
While STUN should work for most cases, there are stricter NATs f.ex.
|
||||
[Symmetric NATs](https://en.wikipedia.org/wiki/Network_address_translation)
|
||||
where it doesn't, then, TURN will be used.
|
||||
|
||||
## TURN
|
||||
|
||||
[Traversal Using Relays around NAT (TURN)](http://en.wikipedia.org/wiki/TURN) is used to work around Symmetric NATs.
|
||||
It does it by relaying all data through a TURN server. As relaying will create traffic on the server,
|
||||
Screego will require user authentication to use the TURN server. This can be configured see [Configuration](config.md).
|
||||
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
# Proxy
|
||||
|
||||
!> When using a proxy enable `SCREEGO_TRUST_PROXY_HEADERS`. See [Configuration](config.md).
|
||||
|
||||
## nginx
|
||||
|
||||
### At root path
|
||||
|
||||
```nginx
|
||||
upstream screego {
|
||||
# Set this to the address configured in
|
||||
# SCREEGO_SERVER_ADDRESS. Default 5050
|
||||
server 127.0.0.1:5050;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
# Here goes your domain / subdomain
|
||||
server_name screego.example.com;
|
||||
|
||||
location / {
|
||||
# Proxy to screego
|
||||
proxy_pass http://screego;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# Set headers for proxying WebSocket
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_redirect http:// $scheme://;
|
||||
|
||||
# Set proxy headers
|
||||
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;
|
||||
|
||||
# The proxy must preserve the host because screego verifies it with the origin
|
||||
# for WebSocket connections
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### At a sub path
|
||||
|
||||
```nginx
|
||||
upstream screego {
|
||||
# Set this to the address configured in
|
||||
# SCREEGO_SERVER_ADDRESS. Default 5050
|
||||
server 127.0.0.1:5050;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
# Here goes your domain / subdomain
|
||||
server_name screego.example.com;
|
||||
|
||||
location /screego/ {
|
||||
rewrite ^/screego(/.*) $1 break;
|
||||
|
||||
# Proxy to screego
|
||||
proxy_pass http://screego;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# Set headers for proxying WebSocket
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_redirect http:// $scheme://;
|
||||
|
||||
# Set proxy headers
|
||||
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;
|
||||
|
||||
# The proxy must preserve the host because screego verifies it with the origin
|
||||
# for WebSocket connections
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Apache (httpd)
|
||||
|
||||
The following modules are required:
|
||||
|
||||
* mod_proxy
|
||||
* mod_proxy_wstunnel
|
||||
* mod_proxy_http
|
||||
|
||||
### At root path
|
||||
|
||||
```apache
|
||||
<VirtualHost *:80>
|
||||
ServerName sceego.example.com
|
||||
Keepalive On
|
||||
|
||||
# The proxy must preserve the host because screego verifies it with the origin
|
||||
# for WebSocket connections
|
||||
ProxyPreserveHost On
|
||||
|
||||
# Replace 5050 with the port defined in SCREEGO_SERVER_ADDRESS.
|
||||
# Default 5050
|
||||
|
||||
# Proxy web socket requests to /stream
|
||||
ProxyPass "/stream" ws://127.0.0.1:5050/stream retry=0 timeout=5
|
||||
|
||||
# Proxy all other requests to /
|
||||
ProxyPass "/" http://127.0.0.1:5050/ retry=0 timeout=5
|
||||
|
||||
ProxyPassReverse / http://127.0.0.1:5050/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
### At a sub path
|
||||
|
||||
```apache
|
||||
<VirtualHost *:80>
|
||||
ServerName screego.example.com
|
||||
Keepalive On
|
||||
|
||||
Redirect 301 "/screego" "/screego/"
|
||||
|
||||
# The proxy must preserve the host because screego verifies it with the origin
|
||||
# for WebSocket connections
|
||||
ProxyPreserveHost On
|
||||
|
||||
# Proxy web socket requests to /stream
|
||||
ProxyPass "/screego/stream" ws://127.0.0.1:5050/stream retry=0 timeout=5
|
||||
|
||||
# Proxy all other requests to /
|
||||
ProxyPass "/screego/" http://127.0.0.1:5050/ retry=0 timeout=5
|
||||
# ^- !!trailing slash is required!!
|
||||
|
||||
ProxyPassReverse /screego/ http://127.0.0.1:5050/
|
||||
</VirtualHost>
|
||||
```
|
||||
Reference in New Issue
Block a user