跳转至

Adding a Proxy Server

An additional proxy server is usually needed in companies with a complex network infrastructure to improve the quality and speed of connections.

System Requirements

A virtual or physical server with the following minimum resources is required for deployment:

  • Operating system: Debian/Ubuntu - Ubuntu 22.04/Debian 11 recommended
  • RAM: 2 Gb
  • CPU: 2 cores
  • Drive: 16 Gb
  • Public IP address with at least 100 Mbps of bandwidth

Installation

Deployment consists of several steps. They are numbered for ease of verification. Perform all steps one by one.

1. Preparing the environment

1.1 Install docker and docker-compose:

sudo apt -y update && apt install docker.io docker-compose unzip

1.2 Authorize in the docker registry:

sudo docker login updater.getscreen.me:5000

1.3 Open the following ports in the Firewall:

Port Protocol Destination
3478 TCP и UDP to connect via WebRTC protocol
40000-60000 UDP for WebRTC connection (media data)
sudo ufw allow 3478
sudo ufw allow 40000:60000/udp

2. Preparing configs

2.1 Create a directory /opt/getscreen/proxy:

sudo mkdir -p /opt/getscreen
sudo chown $USER /opt/getscreen

2.2 Copy the /opt/getscreen/proxy/config.json file from the main server into it.

2.3 Create a file /opt/getscreen/docker-compose.yml with the following contents:

version: '3.6'

services:

proxy:
    image: updater.getscreen.me:5000/proxy:latest
    restart: always
    container_name: getscreen-proxy
    network_mode: host
    volumes:
    - ./proxy/log/:/opt/proxy/log:rw
    - ./proxy/config.json:/opt/proxy/config.json:rw

3. Running a container

3.1 Start the server with the following commands:

cd /opt/getscreen
sudo docker-compose up -d

Connecting to a main server

Now you need to connect the added server to the infrastructure of the main server.

To do this, in the /opt/getscreen/server/config.json file on the master server, add entries with the IP address of the added Proxy server to the turn and stun sections.

After changing the config, you must reboot the main server:

cd /opt/getscreen
sudo docker-compose restart

Last update: November 27th, 2024