diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..2c0cb59 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +screego.net diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..2d18670 --- /dev/null +++ b/docs/README.md @@ -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) diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 0000000..7a994f3 --- /dev/null +++ b/docs/_sidebar.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) diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png new file mode 100644 index 0000000..eca9e3f Binary files /dev/null and b/docs/apple-touch-icon.png differ diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 0000000..d45d396 --- /dev/null +++ b/docs/config.md @@ -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 +``` \ No newline at end of file diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png new file mode 100644 index 0000000..2cd313d Binary files /dev/null and b/docs/favicon-16x16.png differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png new file mode 100644 index 0000000..3b20f79 Binary files /dev/null and b/docs/favicon-32x32.png differ diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000..58cc7ee Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..e624ac9 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,51 @@ + + + + + Screego + + + + + + + + + + + +
+ + + + + + + + + + + diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000..e35de93 --- /dev/null +++ b/docs/install.md @@ -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 diff --git a/docs/logo.png b/docs/logo.png new file mode 100644 index 0000000..18d0cab Binary files /dev/null and b/docs/logo.png differ diff --git a/docs/logo.svg b/docs/logo.svg new file mode 100644 index 0000000..dccd081 --- /dev/null +++ b/docs/logo.svg @@ -0,0 +1,3130 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/nat-traversal.md b/docs/nat-traversal.md new file mode 100644 index 0000000..25f1420 --- /dev/null +++ b/docs/nat-traversal.md @@ -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). + diff --git a/docs/proxy.md b/docs/proxy.md new file mode 100644 index 0000000..958dba6 --- /dev/null +++ b/docs/proxy.md @@ -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 + + 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/ + +``` + +### At a sub path + +```apache + + 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/ + +```