Table of Contents#
Overview#
LizardByte has the full documentation hosted on Read the Docs.
About#
Sunshine is a self-hosted game stream host for Moonlight. Offering low latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from the local server or any mobile device.
System Requirements#
Warning
This table is a work in progress. Do not purchase hardware based on this.
Minimum Requirements
GPU |
AMD: VCE 1.0 or higher, see obs-amd hardware support |
Intel: VAAPI-compatible, see: VAAPI hardware support |
|
Nvidia: NVENC enabled cards, see nvenc support matrix |
|
CPU |
AMD: Ryzen 3 or higher |
Intel: Core i3 or higher |
|
RAM |
4GB or more |
OS |
Windows: 10+ (Windows Server not supported) |
macOS: 11.7+ |
|
Linux/Debian: 11 (bullseye) |
|
Linux/Fedora: 36+ |
|
Linux/Ubuntu: 20.04+ (focal) |
|
Network |
Host: 5GHz, 802.11ac |
Client: 5GHz, 802.11ac |
4k Suggestions
GPU |
AMD: Video Coding Engine 3.1 or higher |
Intel: HD Graphics 510 or higher |
|
Nvidia: GeForce GTX 1080 or higher |
|
CPU |
AMD: Ryzen 5 or higher |
Intel: Core i5 or higher |
|
Network |
Host: CAT5e ethernet or better |
Client: CAT5e ethernet or better |
HDR Suggestions
GPU |
AMD: Video Coding Engine 3.4 or higher |
Intel: UHD Graphics 730 or higher |
|
Nvidia: Pascal-based GPU (GTX 10-series) or higher |
|
CPU |
AMD: todo |
Intel: todo |
|
Network |
Host: CAT5e ethernet or better |
Client: CAT5e ethernet or better |
Integrations#
Support#
Our support methods are listed in our LizardByte Docs.
Downloads#
Stats#
Installation#
The recommended method for running Sunshine is to use the binaries bundled with the latest release.
Attention
Additional setup is required after installation. See Setup.
Binaries#
Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows. Binaries can be found in the latest release.
Tip
Some third party packages also exist. See Third Party Packages.
Docker#
Docker images are available on Dockerhub.io and ghcr.io.
See Docker for additional information.
Linux#
Follow the instructions for your preferred package type below.
CUDA Compatibility
CUDA is used for NVFBC capture.
Tip
See CUDA GPUS to cross reference Compute Capability to your GPU.
Package |
CUDA Version |
Min Driver |
CUDA Compute Capabilities |
---|---|---|---|
PKGBUILD |
User dependent |
User dependent |
User dependent |
sunshine.AppImage |
11.8.0 |
450.80.02 |
50;52;60;61;62;70;75;80;86;90;35 |
sunshine.pkg.tar.zst |
11.8.0 |
450.80.02 |
50;52;60;61;62;70;75;80;86;90;35 |
sunshine_{arch}.flatpak |
12.0.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-debian-bullseye-{arch}.deb |
11.8.0 |
450.80.02 |
50;52;60;61;62;70;75;80;86;90;35 |
sunshine-fedora-36-{arch}.rpm |
12.0.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-fedora-37-{arch}.rpm |
12.0.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-ubuntu-20.04-{arch}.deb |
11.8.0 |
450.80.02 |
50;52;60;61;62;70;75;80;86;90;35 |
sunshine-ubuntu-22.04-{arch}.deb |
11.8.0 |
450.80.02 |
50;52;60;61;62;70;75;80;86;90;35 |
AppImage#
According to AppImageLint the supported distro matrix of the AppImage is below.
[✖] Debian oldstable (buster)
[✔] Debian stable (bullseye)
[✔] Debian testing (bookworm)
[✔] Debian unstable (sid)
[✔] Ubuntu kinetic
[✔] Ubuntu jammy
[✔] Ubuntu focal
[✖] Ubuntu bionic
[✖] Ubuntu xenial
[✖] Ubuntu trusty
[✖] CentOS 7
Download
sunshine.AppImage
to your home directory.Open terminal and run the following code.
./sunshine.AppImage --install
- Start:
./sunshine.AppImage --install && ./sunshine.AppImage
- Uninstall:
./sunshine.AppImage --remove
Archlinux PKGBUILD#
Open terminal and run the following code.
wget https://github.com/LizardByte/Sunshine/releases/latest/download/PKGBUILD makepkg -fi
- Uninstall:
pacman -R sunshine
Archlinux pkg#
Open terminal and run the following code.
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst pacman -U --noconfirm sunshine.pkg.tar.zst
- Uninstall:
pacman -R sunshine
Debian Package#
Download
sunshine-{ubuntu-version}.deb
and run the following code.sudo apt install -f ./sunshine-{ubuntu-version}.deb
Note
The {ubuntu-version}
is the version of ubuntu we built the package on. If you are not using Ubuntu and
have an issue with one package, you can try another.
Tip
You can double click the deb file to see details about the package and begin installation.
- Uninstall:
sudo apt remove sunshine
Flatpak Package#
Install Flatpak as required.
Download
sunshine_{arch}.flatpak
and run the following code.Note
Be sure to replace
{arch}
with the architecture for your operating system.- System level (recommended)
flatpak install --system ./sunshine_{arch}.flatpak
- User level
flatpak install --user ./sunshine_{arch}.flatpak
- Additional installation (required)
flatpak run --command=additional-install.sh dev.lizardbyte.sunshine
- Start:
- X11 and NVFBC capture (X11 Only)
flatpak run dev.lizardbyte.sunshine
- KMS capture (Wayland & X11)
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.sunshine
- Uninstall:
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine flatpak uninstall --delete-data dev.lizardbyte.sunshine
RPM Package#
Add rpmfusion repositories by running the following code.
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Download
sunshine.rpm
and run the following code.sudo dnf install ./sunshine.rpm
Tip
You can double click the rpm file to see details about the package and begin installation.
- Uninstall:
sudo dnf remove sunshine
macOS#
Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected.
pkg#
Warning
The pkg does not include runtime dependencies.
Download the
sunshine.pkg
file and install it as normal.
- Uninstall:
cd /etc/sunshine/assets uninstall_pkg.sh
Portfile#
Install MacPorts
Update the Macports sources.
sudo nano /opt/local/etc/macports/sources.conf
- Add this line, replacing your username, below the line that starts with
rsync
. file:///Users/<username>/ports
Ctrl+x
, thenY
to exit and save changes.- Add this line, replacing your username, below the line that starts with
Download the
Portfile
to~/Downloads
and run the following code.mkdir -p ~/ports/multimedia/sunshine mv ~/Downloads/Portfile ~/ports/multimedia/sunshine/ cd ~/ports portindex sudo port install sunshine
The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
- Uninstall:
sudo port uninstall sunshine
Windows#
Installer#
Download and install
sunshine-windows-installer.exe
Attention
You should carefully select or unselect the options you want to install. Do not blindly install or enable features.
To uninstall, find Sunshine in the list here and select “Uninstall” from the overflow menu. Different versions of Windows may provide slightly different steps for uninstall.
Standalone#
Download and extract
sunshine-windows-portable.zip
To uninstall, delete the extracted directory which contains the sunshine.exe
file.
Docker#
Important note#
Starting with v0.18.0, tag names have changed. You may no longer use latest
, master
, vX.X.X
.
Build your own containers#
This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not intended to use as a standalone container at this point, and should be considered experimental.
ARG SUNSHINE_VERSION=latest
ARG SUNSHINE_OS=ubuntu-22.04
FROM lizardbyte/sunshine:${SUNSHINE_VERSION}-${SUNSHINE_OS}
# install Steam, Wayland, etc.
ENTRYPOINT steam && sunshine
SUNSHINE_VERSION#
latest
,master
,vX.X.X
nightly
commit hash
SUNSHINE_OS#
Sunshine images are available with the following tag suffixes, based on their respective base images.
archlinux
debian-bullseye
fedora-36
fedora-37
ubuntu-20.04
ubuntu-22.04
Where used#
This is a list of docker projects using Sunshine. Something missing? Let us know about it!
Port and Volume mappings#
Examples are below of the required mappings. The configuration file will be saved to /config
in the container.
Using docker run#
Create and run the container (substitute your <values>
):
docker run -d \
--name=<image_name> \
--restart=unless-stopped
-e PUID=<uid> \
-e PGID=<gid> \
-e TZ=<timezone> \
-v <path to data>:/config \
-p 47984-47990:47984-47990/tcp \
-p 48010:48010 \
-p 47998-48000:47998-48000/udp \
<image>
Using docker-compose#
Create a docker-compose.yml
file with the following contents (substitute your <values>
):
version: '3'
services:
<image_name>:
image: <image>
container_name: sunshine
restart: unless-stopped
volumes:
- <path to data>:/config
environment:
- PUID=<uid>
- PGID=<gid>
- TZ=<timezone>
ports:
- "47984-47990:47984-47990/tcp"
- "48010:48010"
- "47998-48000:47998-48000/udp"
Parameters#
You must substitute the <values>
with your own settings.
Parameters are split into two halves separated by a colon. The left side represents the host and the right side the container.
Example: -p external:internal
- This shows the port mapping from internal to external of the container.
Therefore -p 47990:47990
would expose port 47990
from inside the container to be accessible from the host’s IP on
port 47990
(e.g. http://<host_ip>:47990
). The internal port must be 47990
, but the external port may be changed
(e.g. -p 8080:47990
). All the ports listed in the docker run
and docker-compose
examples are required.
Parameter |
Function |
Example Value |
Required |
---|---|---|---|
|
Web UI Port |
|
True |
|
Volume mapping |
|
True |
|
User ID |
|
False |
|
Group ID |
|
False |
|
Lookup TZ value |
|
False |
User / Group Identifiers:#
When using data volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this issue you can specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify.
In this instance PUID=1001
and PGID=1001
. To find yours use id user as below:
$ id dockeruser
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image.
Supported Architectures#
Specifying lizardbyte/sunshine:latest-<SUNSHINE_OS>
or ghcr.io/lizardbyte/sunshine:latest-<SUNSHINE_OS>
should
retrieve the correct image for your architecture.
The architectures supported by these images are shown in the table below.
tag suffix |
amd64/x86_64 |
arm64/aarch64 |
---|---|---|
archlinux |
✅ |
❌ |
debian-bullseye |
✅ |
✅ |
fedora-36 |
✅ |
✅ |
fedora-37 |
✅ |
✅ |
ubuntu-20.04 |
✅ |
✅ |
ubuntu-22.04 |
✅ |
✅ |
Third Party Packages#
Danger
These packages are not maintained by LizardByte. Use at your own risk.
AUR#
Chocolatey#
nixpkgs#
Scoop#
Solus#
Winget#
Legacy GitHub Repo#
Attention
This repo is not maintained. Thank you to Loki for bringing this amazing project to life!
Usage#
See the setup section for your specific OS.
If you did not install the service, then start sunshine with the following command, unless a start command is listed in the specified package installation instructions.
Note
A service is a process that runs in the background. Running multiple instances of Sunshine is not advised.
- Basic usage
sunshine
- Specify config file
sunshine <directory of conf file>/sunshine.conf
Note
You do not need to specify a config file. If no config file is entered the default location will be used.
Attention
The configuration file specified will be created if it doesn’t exist.
Configure Sunshine in the web ui
The web ui is available on https://localhost:47990 by default. You may replace localhost with your internal ip address.
Attention
Ignore any warning given by your browser about “insecure website”. This is due to the SSL certificate being self signed.
Caution
If running for the first time, make sure to note the username and password that you created.
- Add games and applications.
This can be configured in the web ui.
Note
Additionally, apps can be configured manually. src_assets/<os>/config/apps.json is an example of a list of applications that are started just before running a stream. This is the directory within the GitHub repo.
In Moonlight, you may need to add the PC manually.
When Moonlight request you insert the correct pin on sunshine:
Login to the web ui
Go to “PIN” in the Navbar
Type in your PIN and press Enter, you should get a Success Message
In Moonlight, select one of the Applications listed
Network#
The Sunshine user interface will be available on port 47990 by default.
Warning
Exposing ports to the internet can be dangerous. Do this at your own risk.
Arguments#
- To get a list of available arguments run the following:
sunshine --help
Setup#
Linux#
The deb, rpm, Flatpak and AppImage packages handle these steps automatically. Third party packages may not.
Sunshine needs access to uinput to create mouse and gamepad events.
- Add user to group input, if this is the first time installing.
sudo usermod -a -G input $USER
- Create udev rules.
echo 'KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"' | \ sudo tee /etc/udev/rules.d/85-sunshine-input.rules
Optionally, configure autostart service
filename:
~/.config/systemd/user/sunshine.service
- contents:
[Unit] Description=Sunshine self-hosted game stream host for Moonlight. StartLimitIntervalSec=500 StartLimitBurst=5 [Service] ExecStart=<see table> Restart=on-failure RestartSec=5s #Flatpak Only #ExecStop=flatpak kill dev.lizardbyte.sunshine [Install] WantedBy=graphical-session.target
package
ExecStart
Auto Configured
aur
/usr/bin/sunshine
✔
deb
/usr/bin/sunshine
✔
rpm
/usr/bin/sunshine
✔
AppImage
~/sunshine.AppImage
✔
Flatpak
flatpak run dev.lizardbyte.sunshine
✔
- Start once
systemctl --user start sunshine
- Start on boot
systemctl --user enable sunshine
- Additional Setup for KMS
Note
cap_sys_admin
may as well be root, except you don’t need to be root to run it. It is necessary to allow Sunshine to use KMS.- Enable
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
- Disable (for Xorg/X11)
sudo setcap -r $(readlink -f $(which sunshine))
- Reboot
sudo reboot now
macOS#
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use Soundflower or BlackHole.
Note
Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key.
Caution
Gamepads are not currently supported.
- Configure autostart service
- MacPorts
sudo port load Sunshine
Windows#
For gamepad support, install ViGEmBus
- Sunshine firewall
- Add rule
cd /d "C:\Program Files\Sunshine\scripts" add-firewall-rule.bat
- Remove rule
cd /d "C:\Program Files\Sunshine\scripts" remove-firewall-rule.bat
- Sunshine service
- Enable
cd /d "C:\Program Files\Sunshine\scripts" install-service.bat
- Disable
cd /d "C:\Program Files\Sunshine\scripts" uninstall-service.bat
Shortcuts#
All shortcuts start with CTRL + ALT + SHIFT
, just like Moonlight
CTRL + ALT + SHIFT + N
- Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight)CTRL + ALT + SHIFT + F1/F12
- Switch to different monitor for Streaming
Application List#
Applications should be configured via the web UI.
A basic understanding of working directories and commands is required.
You can use Environment variables in place of values
$(HOME)
will be replaced by the value of$HOME
$$
will be replaced by$
, e.g.$$(HOME)
will be become$(HOME)
env
- Adds or overwrites Environment variables for the commands/applications run by Sunshine"Variable name":"Variable value"
apps
- The list of applicationsAdvanced users may want to edit the application list manually. The format is
json
.- Example
json
application: { "cmd": "command to open app", "detached": [ "some-command", "another-command" ], "image-path": "/full-path/to/png-image", "name": "An App", "output": "/full-path/to/command-log-file", "prep-cmd": [ { "do": "some-command", "undo": "undo-that-command" } ], "working-dir": "/full-path/to/working-directory" }
cmd
- The main applicationdetached
- A list of commands to be run and forgotten aboutIf not specified, a process is started that sleeps indefinitely
image-path
- The full path to the cover art image to use.name
- The name of the application/gameoutput
- The file where the output of the command is storedprep-cmd
- A list of commands to be run before/after the applicationIf any of the prep-commands fail, starting the application is aborted
do
- Run before the applicationIf it fails, all
undo
commands of the previously succeededdo
commands are run
undo
- Run after the application has terminatedFailures of
undo
commands are ignored
working-dir
- The working directory to use. If not specified, Sunshine will use the application directory.
- Example
For more examples see app examples.
Considerations#
When an application is started, if there is an application already running, it will be terminated.
When the application has been shutdown, the stream shuts down as well.
For example, if you attempt to run
steam
as acmd
instead ofdetached
the stream will immediately fail. This is due to the method in which the steam process is executed. Other applications may behave similarly.
The “Desktop” app works the same as any other application except it has no commands. It does not start an application, instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with the name “Desktop” and “desktop.png” as the image path.
For the Linux flatpak you must prepend commands with
flatpak-spawn --host
.
HDR Support#
Streaming HDR content is supported for Windows hosts with NVIDIA, AMD, or Intel GPUs that support encoding HEVC Main 10. You must have an HDR-capable display or EDID emulator dongle connected to your host PC to activate HDR in Windows.
Ensure you enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR.
A good HDR experience relies on proper HDR display calibration both in Windows and in game. HDR calibration can differ significantly between client and host displays.
We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming.
You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client’s display.
Older games that use NVIDIA-specific NVAPI HDR rather than native Windows 10 OS HDR support may not display in HDR.
Some GPUs can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
Tutorials#
Tutorial videos are available here.
Community!
Tutorials are community generated. Want to contribute? Reach out to us on our discord server.
App Examples#
Since not all applications behave the same, we decided to create some examples to help you get started adding games and applications to Sunshine.
Attention
Throughout these examples, any fields not shown are left blank. You can enhance your experience by
adding an image or a log file (via the Output
field).
Common Examples#
Desktop#
Field |
Value |
Application Name |
|
Image |
|
Steam Big Picture#
Note
Steam is launched as a detached command because Steam starts with a process that self updates itself and the original process is killed. Since the original process ends it will not work as a regular command.
Field |
Linux |
macOS |
Windows |
Application Name |
|
||
Detached Commands |
|
|
|
Image |
|
Epic Game Store game#
Note
Using URI method will be the most consistent between various games, but does not allow a game to be launched using the “Command” and therefore the stream will not end when the game ends.
URI (Epic)#
Field |
Windows |
Application Name |
|
Detached Commands |
|
Binary (Epic w/ working directory)#
Field |
Windows |
Application Name |
|
Command |
|
Working Directory |
|
Binary (Epic w/o working directory)#
Field |
Windows |
Application Name |
|
Command |
|
Steam game#
Note
Using URI method will be the most consistent between various games, but does not allow a game to be launched using the “Command” and therefore the stream will not end when the game ends.
URI (Steam)#
Field |
Linux |
macOS |
Windows |
Application Name |
|
||
Detached Commands |
|
|
|
Binary (Steam w/ working directory)#
Field |
Linux |
macOS |
Windows |
Application Name |
|
||
Command |
|
|
|
Working Directory |
|
|
Binary (Steam w/o working directory)#
Field |
Linux |
macOS |
Windows |
Application Name |
|
||
Command |
|
|
Linux#
Changing Resolution and Refresh Rate (Linux - X11)#
Field |
Value |
Command Preparations |
Do: |
Undo: |
Changing Resolution and Refresh Rate (Linux - Wayland)#
Field |
Value |
Command Preparations |
Do: |
Undo: |
Flatpak#
Attention
Because Flatpak packages run in a sandboxed environment and do not normally have access to the host,
the Flatpak of Sunshine requires commands to be prefixed with flatpak-spawn --host
.
macOS#
Changing Resolution and Refresh Rate (macOS)#
Note
This example uses the displayplacer tool to change the resolution. This tool can be installed following instructions in their GitHub repository.
Field |
Value |
Command Preparations |
Do: |
Undo: |
Windows#
Changing Resolution and Refresh Rate (Windows)#
Note
This example uses the QRes tool to change the resolution and refresh rate. This tool can be downloaded from their SourceForge repository.
Field |
Value |
Command Preparations |
Do: |
Undo: |
Tip
You can change your host resolution to match the client resolution automatically using the Nonary/ResolutionAutomation project.
Advanced Usage#
Sunshine will work with the default settings for most users. In some cases you may want to configure Sunshine further.
Performance Tips#
AMD#
In Windows, enabling Enhanced Sync in AMD’s settings may help reduce the latency by an additional frame. This applies to amfenc and libx264.
Nvidia#
Enabling Fast Sync in Nvidia settings may help reduce latency.
Configuration#
The default location for the configuration file is listed below. You can use another location if you choose, by passing in the full configuration file path as the first argument when you start Sunshine.
The default location of the apps.json
is the same as the configuration file. You can use a custom
location by modifying the configuration file.
Default File Location
Value |
Description |
---|---|
Docker |
/config/ |
Linux |
~/.config/sunshine/ |
macOS |
~/.config/sunshine/ |
Windows |
%ProgramFiles%\Sunshine\config |
- Example
sunshine ~/sunshine_config.conf
To manually configure sunshine you may edit the conf file in a text editor. Use the examples as reference.
Hint
Some settings are not available within the web ui.
General#
sunshine_name#
- Description
The name displayed by Moonlight
- Default
PC hostname
- Example
sunshine_name = Sunshine
min_log_level#
- Description
The minimum log level printed to standard out.
Choices
Value |
Description |
---|---|
verbose |
verbose logging |
debug |
debug logging |
info |
info logging |
warning |
warning logging |
error |
error logging |
fatal |
fatal logging |
none |
no logging |
- Default
info
- Example
min_log_level = info
log_path#
- Description
The path where the sunshine log is stored.
- Default
sunshine.log
- Example
log_path = sunshine.log
global_prep_cmd#
- Description
A list of commands to be run before/after all applications. If any of the prep-commands fail, starting the application is aborted.
- Default
[]
- Example
global_prep_cmd = [{"do":"nircmd.exe setdisplay 1280 720 32 144","undo":"nircmd.exe setdisplay 2560 1440 32 144"}]
Controls#
gamepad#
- Description
The type of gamepad to emulate on the host.
Caution
Applies to Windows only.
Choices
Value |
Description |
---|---|
x360 |
xbox 360 controller |
ds4 |
dualshock controller (PS4) |
- Default
x360
- Example
gamepad = x360
key_repeat_delay#
- Description
The initial delay, in milliseconds, before repeating keys. Controls how fast keys will repeat themselves.
- Default
500
- Example
key_repeat_delay = 500
key_repeat_frequency#
- Description
How often keys repeat every second.
Tip
This configurable option supports decimals.
- Default
24.9
- Example
key_repeat_frequency = 24.9
keybindings#
- Description
Sometimes it may be useful to map keybindings. Wayland won’t allow clients to capture the Win Key for example.
Tip
Hint
keybindings needs to have a multiple of two elements.
- Default
0x10, 0xA0, 0x11, 0xA2, 0x12, 0xA4
- Example
keybindings = [ 0x10, 0xA0, 0x11, 0xA2, 0x12, 0xA4, 0x4A, 0x4B ]
key_rightalt_to_key_win#
- Description
It may be possible that you cannot send the Windows Key from Moonlight directly. In those cases it may be useful to make Sunshine think the Right Alt key is the Windows key.
- Default
disabled
- Example
key_rightalt_to_key_win = enabled
Display#
adapter_name#
- Description
Select the video card you want to stream.
Tip
To find the name of the appropriate values follow these instructions.
- Linux + VA-API
Unlike with amdvce and nvenc, it doesn’t matter if video encoding is done on a different GPU.
ls /dev/dri/renderD* # to find all devices capable of VAAPI # replace ``renderD129`` with the device from above to lists the name and capabilities of the device vainfo --display drm --device /dev/dri/renderD129 | \ grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
To be supported by Sunshine, it needs to have at the very minimum:
VAProfileH264High : VAEntrypointEncSlice
Todo
macOS
- Windows
tools\dxgi-info.exe
- Default
Sunshine will select the default video card.
- Examples
- Linux
adapter_name = /dev/dri/renderD128
Todo
macOS
- Windows
adapter_name = Radeon RX 580 Series
output_name#
- Description
Select the display number you want to stream.
Tip
To find the name of the appropriate values follow these instructions.
- Linux
During Sunshine startup, you should see the list of detected monitors:
Info: Detecting connected monitors Info: Detected monitor 0: DVI-D-0, connected: false Info: Detected monitor 1: HDMI-0, connected: true Info: Detected monitor 2: DP-0, connected: true Info: Detected monitor 3: DP-1, connected: false Info: Detected monitor 4: DVI-D-1, connected: false
You need to use the value before the colon in the output, e.g.
1
.
Todo
macOS
- Windows
tools\dxgi-info.exe
- Default
Sunshine will select the default display.
- Examples
- Linux
output_name = 0
Todo
macOS
- Windows
output_name = \\.\DISPLAY1
fps#
- Description
The fps modes advertised by Sunshine.
Note
Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested fps is supported.
- Default
[10, 30, 60, 90, 120]
- Example
fps = [10, 30, 60, 90, 120]
resolutions#
- Description
The resolutions advertised by Sunshine.
Note
Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested resolution is supported.
- Default
[ 352x240, 480x360, 858x480, 1280x720, 1920x1080, 2560x1080, 3440x1440, 1920x1200, 3860x2160, 3840x1600, ]
- Example
resolutions = [ 352x240, 480x360, 858x480, 1280x720, 1920x1080, 2560x1080, 3440x1440, 1920x1200, 3860x2160, 3840x1600, ]
dwmflush#
- Description
Invoke DwmFlush() to sync screen capture to the Windows presentation interval.
Caution
Applies to Windows only. Alleviates visual stuttering during mouse movement. If enabled, this feature will automatically deactivate if the client framerate exceeds the host monitor’s current refresh rate.
Note
If you disable this option, you may see video stuttering during mouse movement in certain scenarios. It is recommended to leave enabled when possible.
- Default
enabled
- Example
dwmflush = enabled
Audio#
audio_sink#
- Description
The name of the audio sink used for audio loopback.
Tip
To find the name of the audio sink follow these instructions.
- Linux + pulseaudio
pacmd list-sinks | grep "name:"
- Linux + pipewire
pactl info | grep Source # in some causes you'd need to use the `Sink` device, if `Source` doesn't work, so try: pactl info | grep Sink
- macOS
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use Soundflower or BlackHole.
- Windows
tools\audio-info.exe
Tip
If you want to mute the host speakers, use virtual_sink instead.
- Default
Sunshine will select the default audio device.
- Examples
- Linux
audio_sink = alsa_output.pci-0000_09_00.3.analog-stereo
- macOS
audio_sink = BlackHole 2ch
- Windows
audio_sink = {0.0.0.00000000}.{FD47D9CC-4218-4135-9CE2-0C195C87405B}
virtual_sink#
- Description
The audio device that’s virtual, like Steam Streaming Speakers. This allows Sunshine to stream audio, while muting the speakers.
Tip
See audio_sink!
Tip
These are some options for virtual sound devices.
Stream Streaming Speakers (Linux, macOS, Windows)
To use this option, you must have Steam installed and have used Stream remote play at least once.
Virtual Audio Cable (macOS, Windows)
- Example
virtual_sink = {0.0.0.00000000}.{8edba70c-1125-467c-b89c-15da389bc1d4}
Network#
external_ip#
- Description
If no external IP address is given, Sunshine will attempt to automatically detect external ip-address.
- Default
Automatic
- Example
external_ip = 123.456.789.12
port#
- Description
Set the family of ports used by Sunshine. Changing this value will offset other ports per the table below.
Port Description |
Default Port |
Difference from config port |
---|---|---|
HTTPS |
47984 TCP |
-5 |
HTTP |
47989 TCP |
0 |
Web |
47990 TCP |
+1 |
RTSP |
48010 TCP |
+21 |
Video |
47998 UDP |
+9 |
Control |
47999 UDP |
+10 |
Audio |
48000 UDP |
+11 |
Mic (unused) |
48002 UDP |
+13 |
Attention
Custom ports may not be supported by all Moonlight clients.
- Default
47989
- Example
port = 47989
pkey#
- Description
The private key. This must be 2048 bits.
- Default
credentials/cakey.pem
- Example
pkey = /dir/pkey.pem
cert#
- Description
The certificate. Must be signed with a 2048 bit key.
- Default
credentials/cacert.pem
- Example
cert = /dir/cert.pem
origin_pin_allowed#
- Description
The origin of the remote endpoint address that is not denied for HTTP method /pin.
Choices
Value |
Description |
---|---|
pc |
Only localhost may access /pin |
lan |
Only LAN devices may access /pin |
wan |
Anyone may access /pin |
- Default
pc
- Example
origin_pin_allowed = pc
origin_web_ui_allowed#
- Description
The origin of the remote endpoint address that is not denied for HTTPS Web UI.
Choices
Value |
Description |
---|---|
pc |
Only localhost may access the web ui |
lan |
Only LAN devices may access the web ui |
wan |
Anyone may access the web ui |
- Default
lan
- Example
origin_web_ui_allowed = lan
upnp#
- Description
Sunshine will attempt to open ports for streaming over the internet.
Choices
Value |
Description |
---|---|
on |
enable UPnP |
off |
disable UPnP |
- Default
disabled
- Example
upnp = on
ping_timeout#
- Description
How long to wait, in milliseconds, for data from Moonlight before shutting down the stream.
- Default
10000
- Example
ping_timeout = 10000
Encoding#
channels#
- Description
This will generate distinct video streams, unlike simply broadcasting to multiple Clients.
When multicasting, it could be useful to have different configurations for each connected Client.
For instance:
Clients connected through WAN and LAN have different bitrate constraints.
Decoders may require different settings for color.
Warning
CPU usage increases for each distinct video stream generated.
- Default
1
- Example
channels = 1
fec_percentage#
- Description
Percentage of error correcting packets per data packet in each video frame.
Warning
Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage.
- Default
20
- Range
1-255
- Example
fec_percentage = 20
qp#
- Description
Quantization Parameter. Some devices don’t support Constant Bit Rate. For those devices, QP is used instead.
Warning
Higher value means more compression, but less quality.
- Default
28
- Example
qp = 28
min_threads#
- Description
Minimum number of threads used for software encoding.
Note
Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest value that can reliably encode at your desired streaming settings on your hardware.
- Default
1
- Example
min_threads = 1
hevc_mode#
- Description
Allows the client to request HEVC Main or HEVC Main10 video streams.
Warning
HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding.
Choices
Value |
Description |
---|---|
0 |
advertise support for HEVC based on encoder |
1 |
do not advertise support for HEVC |
2 |
advertise support for HEVC Main profile |
3 |
advertise support for HEVC Main and Main10 (HDR) profiles |
- Default
0
- Example
hevc_mode = 2
capture#
- Description
Force specific screen capture method.
Caution
Applies to Linux only.
Choices
Value |
Description |
---|---|
nvfbc |
Use NVIDIA Frame Buffer Capture to capture direct to GPU memory. This is usually the fastest method for NVIDIA cards. For GeForce cards it will only work with drivers patched with nvidia-patch or nvlax. |
wlr |
Capture for wlroots based Wayland compositors via DMA-BUF. |
kms |
DRM/KMS screen capture from the kernel. This requires that sunshine has cap_sys_admin capability. See Linux Setup. |
x11 |
Uses XCB. This is the slowest and most CPU intensive so should be avoided if possible. |
- Default
Automatic. Sunshine will use the first capture method available in the order of the table above.
- Example
capture = kms
encoder#
- Description
Force a specific encoder.
Choices
Value |
Description |
---|---|
nvenc |
For NVIDIA graphics cards |
quicksync |
For Intel graphics cards |
amdvce |
For AMD graphics cards |
software |
Encoding occurs on the CPU |
- Default
Sunshine will use the first encoder that is available.
- Example
encoder = nvenc
sw_preset#
- Description
The encoder preset to use.
Note
This option only applies when using software encoder.
Note
From FFmpeg.
A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.
Use the slowest preset that you have patience for.
Choices
Value |
Description |
---|---|
ultrafast |
fastest |
superfast |
|
veryfast |
|
faster |
|
fast |
|
medium |
|
slow |
|
slower |
|
veryslow |
slowest |
- Default
superfast
- Example
sw_preset = superfast
sw_tune#
- Description
The tuning preset to use.
Note
This option only applies when using software encoder.
Note
From FFmpeg.
You can optionally use -tune to change settings based upon the specifics of your input.
Choices
Value |
Description |
---|---|
film |
use for high quality movie content; lowers deblocking |
animation |
good for cartoons; uses higher deblocking and more reference frames |
grain |
preserves the grain structure in old, grainy film material |
stillimage |
good for slideshow-like content |
fastdecode |
allows faster decoding by disabling certain filters |
zerolatency |
good for fast encoding and low-latency streaming |
- Default
zerolatency
- Example
sw_tune = zerolatency
nv_preset#
- Description
The encoder preset to use.
Note
This option only applies when using nvenc encoder. For more information on the presets, see nvenc preset migration guide.
Choices
Value |
Description |
---|---|
p1 |
fastest (lowest quality) |
p2 |
faster (lower quality) |
p3 |
fast (low quality) |
p4 |
medium (default) |
p5 |
slow (good quality) |
p6 |
slower (better quality) |
p7 |
slowest (best quality) |
- Default
p4
- Example
nv_preset = p4
nv_tune#
- Description
The encoder tuning profile.
Note
This option only applies when using nvenc encoder.
Choices
Value |
Description |
---|---|
hq |
high quality |
ll |
low latency |
ull |
ultra low latency |
lossless |
lossless |
- Default
ull
- Example
nv_tune = ull
nv_rc#
- Description
The encoder rate control.
Note
This option only applies when using nvenc encoder.
Choices
Value |
Description |
---|---|
constqp |
constant QP mode |
vbr |
variable bitrate |
cbr |
constant bitrate |
- Default
cbr
- Example
nv_rc = cbr
nv_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using H264 with nvenc encoder.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
context adaptive binary arithmetic coding - higher quality |
cavlc |
context adaptive variable-length coding - faster decode |
- Default
auto
- Example
nv_coder = auto
qsv_preset#
- Description
The encoder preset to use.
Note
This option only applies when using quicksync encoder.
Choices
Value |
Description |
---|---|
veryfast |
fastest (lowest quality) |
faster |
faster (lower quality) |
fast |
fast (low quality) |
medium |
medium (default) |
slow |
slow (good quality) |
slower |
slower (better quality) |
veryslow |
slowest (best quality) |
- Default
medium
- Example
qsv_preset = medium
qsv_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using H264 with quicksync encoder.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
context adaptive binary arithmetic coding - higher quality |
cavlc |
context adaptive variable-length coding - faster decode |
- Default
auto
- Example
qsv_coder = auto
amd_quality#
- Description
The encoder preset to use.
Note
This option only applies when using amdvce encoder.
Choices
Value |
Description |
---|---|
speed |
prefer speed |
balanced |
balanced |
quality |
prefer quality |
- Default
balanced
- Example
amd_quality = balanced
amd_rc#
- Description
The encoder rate control.
Note
This option only applies when using amdvce encoder.
Choices
Value |
Description |
---|---|
cqp |
constant qp mode |
cbr |
constant bitrate |
vbr_latency |
variable bitrate, latency constrained |
vbr_peak |
variable bitrate, peak constrained |
- Default
vbr_latency
- Example
amd_rc = vbr_latency
amd_usage#
- Description
The encoder usage profile, used to balance latency with encoding quality.
Note
This option only applies when using amdvce encoder.
Choices
Value |
Description |
---|---|
transcoding |
transcoding (slowest) |
webcam |
webcam (slow) |
lowlatency |
low latency (fast) |
ultralowlatency |
ultra low latency (fastest) |
- Default
ultralowlatency
- Example
amd_usage = ultralowlatency
amd_preanalysis#
- Description
Preanalysis can increase encoding quality at the cost of latency.
Note
This option only applies when using amdvce encoder.
- Default
disabled
- Example
amd_preanalysis = disabled
amd_vbaq#
- Description
Variance Based Adaptive Quantization (VBAQ) can increase subjective visual quality.
Note
This option only applies when using amdvce encoder.
- Default
enabled
- Example
amd_vbaq = enabled
amd_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using H264 with amdvce encoder.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
context adaptive variable-length coding - higher quality |
cavlc |
context adaptive binary arithmetic coding - faster decode |
- Default
auto
- Example
amd_coder = auto
vt_software#
- Description
Force Video Toolbox to use software encoding.
Note
This option only applies when using macOS.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
disabled |
disable software encoding |
allowed |
allow software encoding |
forced |
force software encoding |
- Default
auto
- Example
vt_software = auto
vt_realtime#
- Description
Realtime encoding.
Note
This option only applies when using macOS.
Warning
Disabling realtime encoding might result in a delayed frame encoding or frame drop.
- Default
enabled
- Example
vt_realtime = enabled
vt_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using macOS.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
|
cavlc |
- Default
auto
- Example
vt_coder = auto
Advanced#
file_apps#
- Description
The application configuration file path. The file contains a json formatted list of applications that can be started by Moonlight.
- Default
OS and package dependent
- Example
file_apps = apps.json
file_state#
- Description
The file where current state of Sunshine is stored.
- Default
sunshine_state.json
- Example
file_state = sunshine_state.json
credentials_file#
- Description
The file where user credentials for the UI are stored.
- Default
sunshine_state.json
- Example
credentials_file = sunshine_state.json
Changelog#
0.19.0 - 2023-03-29#
Breaking
(Linux/Flatpak) Moved Flatpak to org.freedesktop.Platform 22.08 and Cuda 12.0.0 This will drop support for Nvidia GPUs with compute capability 3.5
Added
(Input) Added option to suppress input from gamepads, keyboards, or mice
(Input/Linux) Added unicode support for remote pasting (may not work on all DEs)
(Input/Linux) Added XTest input fallback
(UI) Added version notifications to web UI
(Linux/Windows) Add system tray icon
(Windows) Added ability to safely elevate commands that fail due to insufficient permissions when running as a service
(Config) Added global prep commands, and ability to exclude an app from using global prep commands
(Installer/Windows) Automatically install ViGEmBus if selected
Changed
(Logging) Changed client verified messages to debug to prevent spamming the log
(Config) Only save non default config values
(Service/Linux) Use xdg-desktop-autostart for systemd service
(Linux) Added config option to force capture method
(Windows) Execute prep command in context of current user
(Linux) Allow disconnected X11 outputs
Fixed
(Input/Windows) Fix issue where internation keys were not translated correct, and modifier keys appeared stuck
(Linux) Fixed startup when /dev/dri didn’t exist
(UI) Changes software encoding settings to select menu instead of text input
(Initialization) Do not terminate upon failure, allowing access to the web UI
Dependencies
Bump third-party/moonlight-common-c from 07beb0f to c9426a6
Bump babel from 2.11.0 to 2.12.1
Bump @fortawesome/fontawesome-free from 6.2.1 to 6.4.0
Bump third-party/ViGEmClient from 9e842ba to 726404e
Bump ffmpeg
Bump third-party/miniupnp from 014c9df to e439318
Bump furo from 2022.12.7 to 2023.3.27
Bump third-party/nanors from 395e5ad to e9e242e
Misc
(GitHub) Shared feature request board with Moonlight
(Docs) Improved application examples
(Docs) Added WIP documentation for source code using Doxygen and Breathe
(Build) Fix linux clang build errors
(Build/Archlinux) Skip irrelevant submodules
(Build/Archlinux) Disable download timeout
(Build/macOS) Support compiling for earlier releases of macOS
(Docs) Add favicon
(Docs) Add missing config default values
(Build) Fix compiler warnings due to depreciated elements in C++17
(Build) Fix libcurl link errors
(Clang) Adjusted formatting rules
0.18.4 - 2023-02-20#
Fixed
(Linux/AUR) Drop support of AUR package
(Docker) General enhancements to docker images
0.18.3 - 2023-02-13#
Added
(Linux) Added PKGBUILD for Archlinux based distros to releases
(Linux) Added precompiled package for Archlinux based distros to releases
(Docker) Added archlinux docker image (x86_64 only)
0.18.2 - 2023-02-13#
Fixed
(Video/KMV/Linux) Fixed wayland capture on Nvidia for KMS
(Video/Linux) Implement vaSyncBuffer stuf for libva <2.9.0
(UI) Fix issue where mime type was not being set for node_modules when using a reverse proxy
(UI/macOS) Added missing audio sink config options
(Linux) Specify correct Boost dependency versions
(Video/AMF) Add missing encoder tunables
0.18.1 - 2023-01-31#
Fixed
(Linux) Fixed missing dependencies for deb and rpm packages
(Linux) Use dynamic boost
0.18.0 - 2023-01-29#
Attention, this release contains critical security fixes. Please update as soon as possible. Additionally, we are encouraging users to change your Sunshine password, especially if you expose the web UI (i.e. port 47790 by default) to the internet, or have ever uploaded your logs with verbose output to a public resource.
Added
(Windows) Add support for Intel QuickSync
(Linux) Added aarch64 deb and rpm packages
(Windows) Add support for hybrid graphics systems, such as laptops with both integrated and discrete GPUs
(Linux) Add support for streaming from Steam Deck Gaming Mode
(Windows) Add HDR support, see https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#hdr-support
Fixed
(Network) Refactor code for UPnP port forwarding
(Video) Enforce 10 FPS encoding frame rate minimum to improve static image quality
(Linux) deb and rpm packages are now specific to destination distro and version
(Docs) Add nvidia/nvenc preset migration guide
(Network) Performance optimizations
(Video/Windows) Fix streaming to multiple clients from hardware encoder
(Linux) Fix child process spawning
(Security) Fix security vulnerability in implementation of SimpleWebServer
(Misc) Rename “Steam BigPicture” to “Steam Big Picture” in default apps.json
(Security) Scrub basic authorization header from logs
(Linux) The systemd service will now restart in the event of a crash
(Video/KMS/Linux) Fixed error:
couldn't import RGB Image: 00003002 and 00003004
(Video/Windows) Fix stream freezing triggered by the resolution changed
(Installer/Windows) Fixes silent installation and other miscellaneous improvements
(CPU) Significantly improved CPU usage
0.17.0 - 2023-01-08#
If you are running Sunshine as a service on Windows, we are strongly urging you to update to v0.17.0 as soon as possible. Older Windows versions of Sunshine had a security flaw in which the binary was located in a user-writable location which is problematic when running as a service or on a multi-user system. Additionally, when running Sunshine as a service, games and applications were launched as SYSTEM. This could lead to issues with save files and other game settings. In v0.17.0, games now run under your user account without elevated privileges.
Breaking
(Apps) Removed automatic desktop entry (Re-add by adding an empty application named “Desktop” with no commands, “desktop.png” can be added as the image.)
(Windows) Improved user upgrade experience (Suggest to manually uninstall existing Sunshine version before this upgrade. Do NOT select to remove everything, if prompted. Make a backup of config files before uninstall.)
(Windows) Move config files to specific directory (files will be migrated automatically if using Windows installer)
(Dependencies) Fix npm path (breaking change for package maintainers)
Added
(macOS) Added initial support for arm64 on macOS through Macports portfile
(Input) Added support for foreign keyboard input
(Misc) Logs inside the WebUI and log to file
(UI/Windows) Added an Apply button to configuration page when running as a service
(Input/Windows) Enable Mouse Keys while streaming for systems with no physical mouse
Fixed
(Video) Improved capture performance
(Audio) Improved audio bitrate and quality handling
(Apps/Windows) Fixed PATH environment variable handling
(Apps/Windows) Use the proper environment variable for the Program Files (x86) folder
(Service/Windows) Fix SunshineSvc hanging if an error occurs during startup
(Service/Windows) Spawn Sunshine.exe in a job object, so it is terminated if SunshineSvc.exe dies
(Video) windows/vram: fix fringing in NV12 colour conversion
(Apps/Windows) Launch games under the correct user account
(Video) nvenc, amdvce: rework all user presets/options
(Network) Generate certificates with unique serial numbers
(Service/Windows) Graceful termination on shutdown, logoff, and service stop
(Apps/Windows) Fix launching apps when Sunshine is running as admin
(Misc) Remove/fix calls to std::abort()
(Misc) Remove prompt to press enter after Sunshine exits
(Misc) Make log priority consistent for execution messages
(Apps) Applications in Moonlight clients are now updated automatically after editing
(Video/Linux) Fix wayland capture on nvidia
(Audio) Fix 7.1 surround channel mapping
(Video) Fix NVENC profile values not applying
(Network) Fix origin_web_ui_allowed binding
(Service/Windows) Self terminate/restart service if process hangs for 10 seconds
(Input/Windows) Fix Windows masked cursor blending with GPU encoders
(Video) Color conversion fixes and BT.2020 support
Dependencies
Bump ffmpeg from 4.4 to 5.1
ffmpeg_patches: add amfenc delay/buffering fix
CBS moved to ffmpeg submodules
Migrate to upstream Simple-Web-Server submodule
Bump third-party/TPCircularBuffer from
bce9170
to8833b3a
Bump third-party/moonlight-common-c from
8169a31
toef9ad52
Bump third-party/miniupnp from
6f848ae
to207cf44
Bump third-party/ViGEmClient from
f719a1d
to9e842ba
Bump bootstrap from 5.0.0 to 5.2.3
Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1
0.16.0 - 2022-12-13#
Added
Add cover finder
(Docker) Add arm64 docker image
(Flatpak) Add installation helper scripts
(Windows) Add support for Unicode input messages
Fixed
(Linux) Reintroduce Ubuntu 20.04 and 22.04 specific deb packages
(Linux) Fixed udev and systemd file locations
Dependencies
Bump babel from 2.10.3 to 2.11.0
Bump sphinx-copybutton from 0.5.0 to 0.5.1
Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
Use npm for web dependencies (breaking change for third-party package maintainers)
Update moonlight-common-c
Use pre-built ffmpeg from LizardByte/build-deps for all sunshine builds (breaking change for third-party package maintainers)
Bump furo from 2022.9.29 to 2022.12.7
Misc
Misc org level workflow updates
Fix misc typos in docs
Fix winget release
0.15.0 - 2022-10-30#
Added
(Windows) Add firewall rules scripts
(Windows) Automatically add and remove firewall rules at install/uninstall
(Windows) Automatically add and remove service at install/uninstall
(Docker) Official image added
(Linux) Add aarch64 flatpak package
Changed
(Windows/Linux/MacOS) - Move default config and apps file to assets directory
(MacOS) Bump boost to 1.80 for macport builds
(Linux) Remove backup and restore of config files
Fixed
(Linux) - Create sunshine config directory if it doesn’t exist
(Linux) Remove portable home and config directories for AppImage
(Windows) Include service install and uninstall scripts again
(Windows) Automatically delete start menu entry upon uninstall
(Windows) Automatically delete program install directory upon uninstall, with user prompt
(Linux) Handle the case of no default audio sink
(Windows/Linux/MacOS) Fix default image paths
(Linux) Fix CUDA RGBA to NV12 conversion
0.14.1 - 2022-08-09#
Added
(Linux) Flatpak package added
(Linux) AUR package automated updates
(Windows) Winget package automated updates
Changed
(General) Moved repo to @LizardByte GitHub org
(WebUI) Fixed button spacing on home page
(WebUI) Added Discord WidgetBot Crate
Fixed
(Linux/Mac) Default config and app files now copied to user home directory
(Windows) Default config and app files now copied to working directory
0.14.0 - 2022-06-15#
Added
(Documentation) Added Sphinx documentation available at https://sunshinestream.readthedocs.io/en/latest/
(Development) Initial support for Localization
(Linux) Add rpm package as release asset
(macOS) Add Portfile as release asset
(Windows) Add DwmFlush() call to improve capture
(Windows) Add Windows installer
Fixed
(AMD) Fixed hwdevice being destroyed before context
(Linux) Added missing dependencies to AppImage
(Linux) Fixed rumble events causing game to freeze
(Linux) Improved Pulse/Pipewire compatibility
(Linux) Moved to single deb package
(macOS) Fixed missing TPCircularBuffer submodule
(Stream) Properly catch exceptions in stream broadcast handlers
(Stream/Video) AVPacket fix
0.13.0 - 2022-02-27#
Added
(macOS) Initial support for macOS (#40)
0.12.0 - 2022-02-13#
Added
New command line argument
--version
Custom png poster support
Changed
Correct software bitrate calculation
Increase vbv-bufsize to 1/10 of requested bitrate
Improvements to Web UI
0.11.1 - 2021-10-04#
Changed
(Linux) Fix search path for config file and assets
0.11.0 - 2021-10-04#
Added
(Linux) Added support for wlroots based compositors on Wayland.
(Windows) Added an icon for the executable
Changed
Fixed a bug causing segfault when connecting multiple controllers.
(Linux) Improved NVENC, it now offloads converting images from RGB to NV12
(Linux) Fixed a bug causes stuttering
0.10.1 - 2021-08-21#
Changed
(Linux) Re-enabled KMS
0.10.0 - 2021-08-20#
Added
Added support for Rumble with gamepads.
Added support for keyboard shortcuts <— See the README for details.
(Windows) A very basic script has been added in Sunshine-Windowstools <– This will start Sunshine at boot with the highest privileges which is needed to display the login prompt.
Changed
Some cosmetic changes to the WebUI.
The first time the WebUI is opened, it will request the creation of a username/password pair from the user.
Fixed audio crackling introduced in version 0.8.0
(Linux) VAAPI hardware encoding now works on Intel i7-6700 at least. <– For the best experience, using ffmpeg version 4.3 or higher is recommended.
(Windows) Installing from debian package shouldn’t overwrite your configuration files anymore. <– It’s recommended that you back up
/etc/sunshine/
before testing this.
0.9.0 - 2021-07-11#
Added
Added audio encryption
(Linux) Added basic NVENC support on Linux
(Windows) The Windows version can now capture the lock screen and the UAC prompt as long as it’s run through
PsExec.exe
https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
Changed
Sunshine will now accept expired or not-yet-valid certificates, as long as they are signed properly.
Fixed compatibility with iOS version of Moonlight
Drastically reduced chance of being forced to skip error correction due to video frame size
(Linux) sunshine.service will be installed automatically.
0.8.0 - 2021-06-30#
Added
Added mDNS support: Moonlight will automatically find Sunshine.
Added UPnP support. It’s off by default.
0.7.7 - 2021-06-24#
Added
(Linux) Added installation package for Debian
Changed
Fixed incorrect scaling for absolute mouse coordinates when using multiple monitors.
Fixed incorrect colors when scaling for software encoder
0.7.1 - 2021-06-18#
Changed
(Linux) Fixed an issue where it was impossible to start sunshine on ubuntu 20.04
0.7.0 - 2021-06-16#
Added
Added a Web Manager. Accessible through: https://localhost:47990 or https://
:47990 (Linux) Added hardware encoding support for AMD on Linux
Changed
(Linux) Moved certificates and saved pairings generated during runtime to .config/sunshine on Linux
0.6.0 - 2021-05-26#
Added
Added support for surround audio
Changed
Maintain aspect ratio when scaling video
Fix issue where Sunshine is forced to drop frames when they are too large
0.5.0 - 2021-05-13#
Added
Added support for absolute mouse coordinates
(Linux) Added support for streaming specific monitor on Linux
(Windows) Added support for AMF on Windows
0.4.0 - 2020-05-03#
Changed
prep-cmd is now optional in apps.json
Fixed bug causing video artifacts
Fixed bug preventing Moonlight from closing app on exit
Fixed bug causing preventing keyboard keys from repeating on latest version of Moonlight
Fixed bug causing segfault when another session of sunshine was already running
Fixed bug causing crash when monitor has resolution 1366x768
0.3.1 - 2020-04-24#
Changed
Fix a memory leak.
0.3.0 - 2020-04-23#
Changed
Hardware acceleration on NVidia GPU’s for Video encoding on Windows
0.2.0 - 2020-03-21#
Changed
Multicasting is now supported: You can set the maximum simultaneous connections with the configurable option: channels
Configuration variables can be overwritten on the command line: “name=value” –> it can be useful to set min_log_level=debug without modifying the configuration file
Switches to make testing the pairing mechanism more convenient has been added, see “sunshine –help” for details
0.1.1 - 2020-01-30#
Added
(Linux) Added deb package and service for Linux
0.1.0 - 2020-01-27#
Added
The first official release for Sunshine!
GameStream#
Nvidia announced that their GameStream service for Nvidia Games clients will be discontinued in February 2023. Luckily, Sunshine performance is now on par with Nvidia GameStream. Many users have even reported that Sunshine outperforms GameStream, so rest assured that Sunshine will be equally performant moving forward.
Migration#
We have developed a simple migration tool to help you migrate your GameStream games and apps to Sunshine automatically.
Please check out our GSMS project if you’re interested in an automated
migration option. At the time of writing this GSMS offers the ability to migrate your custom games and apps. The
working directory, command, and image are all set in Sunshine’s apps.json
file. The box-art image is also copied
to a specified directory.
Limitations#
Sunshine does have some limitations, as compared to Nvidia GameStream.
Automatic game/application list.
Changing game settings automatically, to optimize streaming.
General#
Forgotten Credentials#
- If you forgot your credentials to the web UI, try this.
sunshine --creds <new username> <new password>
Web UI Access#
- Can’t access the web UI?
Check firewall rules.
Nvidia issues#
- NvFBC, NvENC, or general issues with Nvidia graphics card.
Consumer grade Nvidia cards are software limited to a specific number of encodes. See Video Encode and Decode GPU Support Matrix for more info.
You can usually bypass the restriction with a driver patch. See Keylase’s Linux or Windows patches for more guidance.
Linux#
KMS Streaming fails#
- If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
sudo setcap -r $(readlink -f $(which sunshine))
macOS#
Dynamic session lookup failed#
- If you get this error:
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
- Try this.
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Windows#
No gamepad detected#
Verify that you’ve installed ViGEmBus.
Build#
Sunshine binaries are built using CMake. Cross compilation is not supported. That means the binaries must be built on the target operating system and architecture.
Building Locally#
Clone#
- Ensure git is installed and run the following:
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules cd sunshine && mkdir build && cd build
Compile#
See the section specific to your OS.
Remote Build#
It may be beneficial to build remotely in some cases. This will enable easier building on different operating systems.
Fork the project
Activate workflows
Trigger the CI workflow manually
Download the artifacts/binaries from the workflow run summary
Linux#
Requirements#
Debian Bullseye#
End of Life: TBD
- Install Requirements
sudo apt update && sudo apt install \ build-essential \ cmake \ libavdevice-dev \ libboost-filesystem-dev \ libboost-locale-dev \ libboost-log-dev \ libboost-program-options-dev \ libboost-thread-dev \ libcap-dev \ # KMS libcurl4-openssl-dev \ libdrm-dev \ # KMS libevdev-dev \ libmfx-dev \ # x86_64 only libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libva-dev \ libvdpau-dev \ libwayland-dev \ # Wayland libx11-dev \ # X11 libxcb-shm0-dev \ # X11 libxcb-xfixes0-dev \ # X11 libxcb1-dev \ # X11 libxfixes-dev \ # X11 libxrandr-dev \ # X11 libxtst-dev \ # X11 nodejs \ npm \ nvidia-cuda-dev \ # Cuda, NvFBC nvidia-cuda-toolkit # Cuda, NvFBC
Fedora 36, 37#
End of Life: TBD
- Install Requirements
sudo dnf update && \ sudo dnf group install "Development Tools" && \ sudo dnf install \ boost-devel \ cmake \ gcc \ gcc-c++ \ intel-mediasdk-devel \ # x86_64 only libappindicator-gtk3-devel \ libcap-devel \ libcurl-devel \ libdrm-devel \ libevdev-devel \ libva-devel \ libvdpau-devel \ libX11-devel \ # X11 libxcb-devel \ # X11 libXcursor-devel \ # X11 libXfixes-devel \ # X11 libXi-devel \ # X11 libXinerama-devel \ # X11 libXrandr-devel \ # X11 libXtst-devel \ # X11 mesa-libGL-devel \ npm \ numactl-devel \ openssl-devel \ opus-devel \ pulseaudio-libs-devel \ rpm-build \ # if you want to build an RPM binary package wget \ # necessary for cuda install with `run` file which # necessary for cuda install with `run` file
Ubuntu 20.04#
End of Life: April 2030
- Install Requirements
sudo apt update && sudo apt install \ build-essential \ cmake \ g++-10 \ libappindicator3-dev \ libavdevice-dev \ libboost-filesystem-dev \ libboost-locale-dev \ libboost-log-dev \ libboost-thread-dev \ libboost-program-options-dev \ libcap-dev \ # KMS libdrm-dev \ # KMS libevdev-dev \ libmfx-dev \ # x86_64 only libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libva-dev \ libvdpau-dev \ libwayland-dev \ # Wayland libx11-dev \ # X11 libxcb-shm0-dev \ # X11 libxcb-xfixes0-dev \ # X11 libxcb1-dev \ # X11 libxfixes-dev \ # X11 libxrandr-dev \ # X11 libxtst-dev \ # X11 nodejs \ npm \ wget # necessary for cuda install with `run` file
- Update gcc alias
update-alternatives --install \ /usr/bin/gcc gcc /usr/bin/gcc-10 100 \ --slave /usr/bin/g++ g++ /usr/bin/g++-10 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-10 \ --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \ --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
Ubuntu 22.04#
End of Life: April 2027
- Install Requirements
sudo apt update && sudo apt install \ build-essential \ cmake \ libappindicator3-dev \ libavdevice-dev \ libboost-filesystem-dev \ libboost-locale-dev \ libboost-log-dev \ libboost-thread-dev \ libboost-program-options-dev \ libcap-dev \ # KMS libdrm-dev \ # KMS libevdev-dev \ libmfx-dev \ # x86_64 only libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libwayland-dev \ # Wayland libx11-dev \ # X11 libxcb-shm0-dev \ # X11 libxcb-xfixes0-dev \ # X11 libxcb1-dev \ # X11 libxfixes-dev \ # X11 libxrandr-dev \ # X11 libxtst-dev \ # X11 nodejs \ npm \ nvidia-cuda-dev \ # CUDA, NvFBC nvidia-cuda-toolkit # CUDA, NvFBC
CUDA#
If the version of CUDA available from your distro is not adequate, manually install CUDA.
Tip
The version of CUDA you use will determine compatibility with various GPU generations. See CUDA compatibility for more info.
Select the appropriate run file based on your desired CUDA version and architecture according to CUDA Toolkit Archive.
wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run \
--progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
npm dependencies#
- Install npm dependencies.
npm install
Build#
Attention
Ensure you are in the build directory created during the clone step earlier before continuing.
cmake ..
make -j ${nproc}
cpack -G DEB # optionally, create a deb package
cpack -G RPM # optionally, create a rpm package
macOS#
Requirements#
macOS Big Sur and Xcode 12.5+
Use either MacPorts or Homebrew
MacPorts#
- Install Requirements
sudo port install avahi boost180 cmake curl libopus npm9 pkgconfig
Homebrew#
- Install Requirements
brew install boost cmake node opus # if there are issues with an SSL header that is not found: cd /usr/local/include ln -s ../opt/openssl/include/openssl .
npm dependencies#
- Install npm dependencies.
npm install
Build#
Attention
Ensure you are in the build directory created during the clone step earlier before continuing.
cmake ..
make -j ${nproc}
cpack -G DragNDrop # optionally, create a macOS dmg package
- If cmake fails complaining to find Boost, try to set the path explicitly.
cmake -DBOOST_ROOT=[boost path] ..
, e.g.,cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.80 ..
Windows#
Requirements#
First you need to install MSYS2, then startup “MSYS2 MinGW 64-bit” and execute the following codes.
- Update all packages:
pacman -Suy
- Install dependencies:
pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \ mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \ mingw-w64-x86_64-libmfx mingw-w64-x86_64-openssl mingw-w64-x86_64-opus \ mingw-w64-x86_64-toolchain
npm dependencies#
Install nodejs and npm. Downloads available here.
- Install npm dependencies.
npm install
Build#
Attention
Ensure you are in the build directory created during the clone step earlier before continuing.
cmake -G "MinGW Makefiles" ..
mingw32-make -j$(nproc)
cpack -G NSIS # optionally, create a windows installer
cpack -G ZIP # optionally, create a windows standalone package
Contributing#
Read our contribution guide in our organization level docs.
Localization#
Sunshine is being localized into various languages. The default language is en (English) and is highlighted green.
- Graph
CrowdIn#
The translations occur on CrowdIn. Feel free to contribute to localization there. Only elements of the API are planned to be translated.
Attention
The rest API has not yet been implemented.
- Translations Basics
The brand names LizardByte and Sunshine should never be translated.
Other brand names should never be translated. Examples:
AMD
Nvidia
- CrowdIn Integration
How does it work?
When a change is made to sunshine source code, a workflow generates new translation templates that get pushed to CrowdIn automatically.
When translations are updated on CrowdIn, a push gets made to the l10n_nightly branch and a PR is made against the nightly branch. Once PR is merged, all updated translations are part of the project and will be included in the next release.
Extraction#
There should be minimal cases where strings need to be extracted from source code; however it may be necessary in some situations. For example if a system tray icon is added it should be localized as it is user interfacing.
- Wrap the string to be extracted in a function as shown.
#include <boost/locale.hpp> boost::locale::translate("Hello world!")
Tip
More examples can be found in the documentation for boost locale.
Warning
This is for information only. Contributors should never include manually updated template files, or manually compiled language files in Pull Requests.
Strings are automatically extracted from the code to the locale/sunshine.po template file. The generated file is used by CrowdIn to generate language specific template files. The file is generated using the .github/workflows/localize.yml workflow and is run on any push event into the nightly branch. Jobs are only run if any of the following paths are modified.
- 'src/**'
When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is required for this, along with the python dependencies in the ./scripts/requirements.txt file. Additionally, xgettext must be installed.
- Extract, initialize, and update
python ./scripts/_locale.py --extract --init --update
- Compile
python ./scripts/_locale.py --compile
Testing#
Clang Format#
Source code is tested against the .clang-format file for linting errors. The workflow file responsible for clang format testing is .github/workflows/cpp-clang-format-lint.yml.
- Test clang-format locally.
find ./ -iname *.cpp -o -iname *.h -iname *.m -iname *.mm | xargs clang-format -i
Sphinx#
Sunshine uses Sphinx for documentation building. Sphinx, along with other required python dependencies are included in the ./docs/requirements.txt file. Python is required to build sphinx docs. Installation and setup of python will not be covered here.
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from Doxygen downloads. Ensure that the doxygen executable is in your path.
The config file for Sphinx is docs/source/conf.py. This is already included in the repo and should not be modified.
The config file for Doxygen is docs/Doxyfile. This is already included in the repo and should not be modified.
- Test with Sphinx
cd docs make html
Alternatively
cd docs sphinx-build -b html source build
Unit Testing#
Todo
Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact with us, or make a PR with suggested changes.
Legal#
Attention
This documentation is for informational purposes only and is not intended as legal advice. If you have any legal questions or concerns about using Sunshine, we recommend consulting with a lawyer.
Sunshine is licensed under the GPL-3.0 license, which allows for free use and modification of the software. The full text of the license can be reviewed here.
Commercial Use#
Sunshine can be used in commercial applications without any limitations. This means that businesses and organizations can use Sunshine to create and sell products or services without needing to seek permission or pay a fee.
However, it is important to note that the GPL-3.0 license does not grant any rights to distribute or sell the encoders contained within Sunshine. If you plan to sell access to Sunshine as part of their distribution, you are responsible for obtaining the necessary licenses to do so. This may include obtaining a license from the Motion Picture Experts Group (MPEG-LA) and/or any other necessary licensing requirements.
In summary, while Sunshine is free to use, it is the user’s responsibility to ensure compliance with all applicable licensing requirements when redistributing the software as part of a commercial offering. If you have any questions or concerns about using Sunshine in a commercial setting, we recommend consulting with a lawyer.
src#
We are in process of improving the source code documentation. Code should be documented using Doxygen syntax. Some examples exist in main.h and main.cpp. In order for documentation within the code to appear in the rendered docs, the definition of the object must be in a header file, although the documentation itself can (and should) be in the source file.
Example Documentation Blocks#
file.h
// functions
int main(int argc, char *argv[]);
file.cpp (with markdown)
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
*
* EXAMPLES:
* ```cpp
* main(1, const char* args[] = {"hello", "markdown", nullptr});
* ```
*/
int main(int argc, char *argv[]) {
// do stuff
}
file.cpp (with ReStructuredText)
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
* @rst
* EXAMPLES:
*
* .. code-block:: cpp
* main(1, const char* args[] = {"hello", "rst", nullptr});
* @endrst
*/
int main(int argc, char *argv[]) {
// do stuff
}
Code#
main#
Defines
-
MAIL(x)#
Functions
-
void log_flush()#
Flush the log.
EXAMPLES:
log_flush();
-
int main(int argc, char *argv[])#
Main application entry point.
EXAMPLES:
main(1, const char* args[] = {"sunshine", nullptr});
- Parameters:
argc – The number of arguments.
argv – The arguments.
-
std::uint16_t map_port(int port)#
Map a specified port based on the base port.
EXAMPLES:
std::uint16_t mapped_port = map_port(1);
- Parameters:
port – The port to map as a difference from the base port.
- Returns:
std:uint16_t
: The mapped port number.
-
void open_url(const std::string &url)#
-
void print_help(const char *name)#
Print help to stdout.
EXAMPLES:
print_help("sunshine");
- Parameters:
name – The name of the program.
-
std::string read_file(const char *path)#
Read a file to string.
EXAMPLES:
std::string contents = read_file("path/to/file");
- Parameters:
path – The path of the file.
- Returns:
std::string
: The contents of the file.
-
int write_file(const char *path, const std::string_view &contents)#
Writes a file.
EXAMPLES:
int write_status = write_file("path/to/file", "file contents");
- Parameters:
path – The path of the file.
contents – The contents to write.
- Returns:
int
:0
on success,-1
on failure.
Variables
-
boost::log::sources::severity_logger<int> debug#
-
bool display_cursor#
-
boost::log::sources::severity_logger<int> error#
-
boost::log::sources::severity_logger<int> fatal#
-
boost::log::sources::severity_logger<int> info#
-
thread_pool_util::ThreadPool task_pool#
-
boost::log::sources::severity_logger<int> verbose#
-
boost::log::sources::severity_logger<int> warning#
audio#
cbs#
config#
-
namespace config#
-
struct audio_t#
-
struct input_t#
-
struct nvhttp_t#
-
struct prep_cmd_t#
-
struct stream_t#
-
struct sunshine_t#
Public Members
-
struct config::sunshine_t::cmd_t cmd#
-
std::string config_file#
-
std::string credentials_file#
-
std::string log_file#
-
int min_log_level#
-
std::string password#
-
std::uint16_t port#
-
std::vector<prep_cmd_t> prep_cmds#
-
std::string salt#
-
std::string username#
-
struct cmd_t#
-
struct config::sunshine_t::cmd_t cmd#
-
struct video_t#
Public Members
-
std::string adapter_name#
-
int amd_coder#
-
std::optional<int> amd_preanalysis#
-
std::optional<int> amd_quality_h264#
-
std::optional<int> amd_quality_hevc#
-
std::optional<int> amd_rc_h264#
-
std::optional<int> amd_rc_hevc#
-
std::optional<int> amd_usage_h264#
-
std::optional<int> amd_usage_hevc#
-
std::optional<int> amd_vbaq#
-
std::string capture#
-
bool dwmflush#
-
std::string encoder#
-
int hevc_mode#
-
int min_threads#
-
int nv_coder#
-
std::optional<int> nv_preset#
-
std::optional<int> nv_rc#
-
std::optional<int> nv_tune#
-
std::string output_name#
-
int qp#
-
std::optional<int> qsv_cavlc#
-
std::optional<int> qsv_preset#
-
std::string sw_preset#
-
std::string sw_tune#
-
int vt_allow_sw#
-
int vt_coder#
-
int vt_realtime#
-
int vt_require_sw#
-
std::string adapter_name#
-
namespace flag#
-
struct audio_t#
confighttp#
Defines
-
WEB_DIR#
Variables
-
const std::map<std::string, std::string> mime_types = {{"css", "text/css"}, {"gif", "image/gif"}, {"htm", "text/html"}, {"html", "text/html"}, {"ico", "image/x-icon"}, {"jpeg", "image/jpeg"}, {"jpg", "image/jpeg"}, {"js", "application/javascript"}, {"json", "application/json"}, {"png", "image/png"}, {"svg", "image/svg+xml"}, {"ttf", "font/ttf"}, {"txt", "text/plain"}, {"woff2", "font/woff2"}, {"xml", "text/xml"},}#
crypto#
-
namespace crypto#
Typedefs
-
using aes_t = std::array<std::uint8_t, 16>#
-
using bignum_t = util::safe_ptr<BIGNUM, BN_free>#
-
using bio_t = util::safe_ptr<BIO, BIO_free_all>#
-
using cipher_ctx_t = util::safe_ptr<EVP_CIPHER_CTX, EVP_CIPHER_CTX_free>#
-
using md_ctx_t = util::safe_ptr<EVP_MD_CTX, md_ctx_destroy>#
-
using pkey_ctx_t = util::safe_ptr<EVP_PKEY_CTX, EVP_PKEY_CTX_free>#
-
using pkey_t = util::safe_ptr<EVP_PKEY, EVP_PKEY_free>#
-
using sha256_t = std::array<std::uint8_t, SHA256_DIGEST_LENGTH>#
-
using x509_store_ctx_t = util::safe_ptr<X509_STORE_CTX, X509_STORE_CTX_free>#
-
using x509_store_t = util::safe_ptr<X509_STORE, X509_STORE_free>#
-
using x509_t = util::safe_ptr<X509, X509_free>#
Variables
-
constexpr std::size_t digest_size = 256#
-
class cert_chain_t#
-
struct creds_t#
-
namespace cipher#
Functions
-
constexpr std::size_t round_to_pkcs7_padded(std::size_t size)#
Variables
-
constexpr std::size_t tag_size = 16#
-
class cipher_t#
Subclassed by crypto::cipher::cbc_t, crypto::cipher::ecb_t, crypto::cipher::gcm_t
-
constexpr std::size_t round_to_pkcs7_padded(std::size_t size)#
-
using aes_t = std::array<std::uint8_t, 16>#
httpcommon#
-
namespace http#
input#
move_by_copy#
-
namespace move_by_copy_util#
Functions
-
template<class T>
MoveByCopy<T> cmove(T &movable)#
-
template<class T>
MoveByCopy<T> const_cmove(const T &movable)#
-
template<class T>
class MoveByCopy# -
Public Functions
-
inline MoveByCopy(const MoveByCopy &other)#
-
MoveByCopy(MoveByCopy &&other) = default#
-
inline MoveByCopy &operator=(const MoveByCopy &other)#
-
MoveByCopy &operator=(MoveByCopy &&other) = default#
-
inline MoveByCopy(const MoveByCopy &other)#
-
template<class T>
network#
nvhttp#
-
namespace nvhttp#
This namespace contains all the functions and variables related to the nvhttp (GameStream) server.
Variables
-
constexpr auto GFE_VERSION = "3.23.0.74"#
The GFE version we are replicating.
-
constexpr auto PORT_HTTP = 0#
The HTTP port, as a difference from the config port.
-
constexpr auto PORT_HTTPS = -5#
The HTTPS port, as a difference from the config port.
-
constexpr auto VERSION = "7.1.431.-1"#
The protocol version.
-
constexpr auto GFE_VERSION = "3.23.0.74"#
process#
Defines
-
__kernel_entry#
-
namespace proc#
-
-
struct ctx_t#
Public Members
-
std::string cmd#
-
std::vector<std::string> detached#
Some applications, such as Steam, either exit quickly, or keep running indefinitely. Steam.exe is one such application. That is why some applications need be run and forgotten about
-
std::string id#
-
std::string image_path#
-
std::string name#
-
std::string output#
-
std::string working_dir#
-
std::string cmd#
-
struct ctx_t#
round_robin#
rtsp#
stream#
sync#
system_tray#
tasl_pool#
-
namespace task_pool_util#
-
template<class Function>
class _Impl : public task_pool_util::_ImplBase#
-
class _ImplBase#
Subclassed by task_pool_util::_Impl< Function >
-
class TaskPool#
Subclassed by thread_pool_util::ThreadPool
Public Types
-
typedef std::chrono::steady_clock::time_point __time_point#
Public Functions
-
template<class X, class Y>
inline void delay(task_id_t task_id, std::chrono::duration<X, Y> duration)# - Parameters:
duration – The delay before executing the task
-
inline std::optional<__time_point> next()#
-
inline std::optional<std::pair<__time_point, __task>> pop(task_id_t task_id)#
-
template<class Function, class X, class Y, class ...Args>
inline auto pushDelayed(Function &&newTask, std::chrono::duration<X, Y> duration, Args&&... args)# - Returns:
an id to potentially delay the task
-
inline void pushDelayed(std::pair<__time_point, __task> &&task)#
-
inline bool ready()#
-
TaskPool() = default#
Protected Attributes
-
std::mutex _task_mutex#
-
std::vector<std::pair<__time_point, __task>> _timer_tasks#
Private Functions
-
template<class R>
class timer_task_t#
-
typedef std::chrono::steady_clock::time_point __time_point#
-
template<class Function>
thread_pool#
-
namespace thread_pool_util#
-
class ThreadPool : public task_pool_util::TaskPool#
Public Types
-
typedef TaskPool::__task __task#
Public Functions
-
inline void _main()#
-
inline void join()#
-
template<class Function, class X, class Y, class ...Args>
inline auto pushDelayed(Function &&newTask, std::chrono::duration<X, Y> duration, Args&&... args)#
-
inline void start(int threads)#
-
inline void stop()#
-
inline ThreadPool()#
-
inline explicit ThreadPool(int threads)#
-
inline ~ThreadPool() noexcept#
-
typedef TaskPool::__task __task#
-
class ThreadPool : public task_pool_util::TaskPool#
thread_safe#
-
namespace safe#
Typedefs
-
template<class T>
using alarm_t = std::shared_ptr<alarm_raw_t<T>>#
-
using mail_t = std::shared_ptr<mail_raw_t>#
Functions
-
inline void cleanup(mail_raw_t*)#
-
template<class T>
inline auto lock(const std::weak_ptr<void> &wp)#
-
template<class T>
class alarm_raw_t# -
Public Functions
-
inline alarm_raw_t()#
-
inline void reset()#
-
inline auto wait()#
-
template<class Rep, class Period>
inline auto wait_for(const std::chrono::duration<Rep, Period> &rel_time)#
-
template<class Rep, class Period, class Pred>
inline auto wait_for(const std::chrono::duration<Rep, Period> &rel_time, Pred &&pred)#
-
inline alarm_raw_t()#
-
template<class T>
class event_t#
-
class mail_raw_t : public std::enable_shared_from_this<mail_raw_t>#
Public Types
Public Functions
-
inline void cleanup()#
-
inline void cleanup()#
-
template<class T>
class queue_t#
Public Types
Public Functions
Private Members
Public Functions
Public Members
-
template<class T>
upnp#
-
namespace upnp#
utility#
Todo
Add utility.h