From d7154d62778159e57003cf6b9f45c21b87d6de81 Mon Sep 17 00:00:00 2001 From: SivanLaai Date: Wed, 29 Nov 2023 15:38:13 +0800 Subject: [PATCH] update passages --- content/posts/technology/stream_document.md | 67 +++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 content/posts/technology/stream_document.md diff --git a/content/posts/technology/stream_document.md b/content/posts/technology/stream_document.md new file mode 100644 index 0000000..64421ea --- /dev/null +++ b/content/posts/technology/stream_document.md @@ -0,0 +1,67 @@ +--- +title: 流式教程 +date: 2023-11-29T15:23:38+08:00 +draft: true +categories: + - 教程 +tags: +--- +# Sunshine + +## 下载和安装sunshine + +``` +wget https://github.com/LizardByte/Sunshine/releases/download/v0.21.0/sunshine-ubuntu-20.04-amd64.deb +sudo apt install -f ./sunshine-ubuntu-20.04-amd64.deb +``` +## sunshine服务化 + +``` +mkdir -p ~/.config/systemd/user +vim ~/.config/systemd/user/sunshine.service +``` + + - 添加如下内容: +```bash + [Unit] +Description=Sunshine self-hosted game stream host for Moonlight. +StartLimitIntervalSec=500 +StartLimitBurst=5 + +[Service] +ExecStart= +Restart=on-failure +RestartSec=5s +#Flatpak Only +#ExecStop=flatpak kill dev.lizardbyte.sunshine + +[Install] +WantedBy=graphical-session.target +``` +- 开机自启 +``` +systemctl --user start sunshine +systemctl --user enable sunshine +``` + +## 配置sunshine支持外网 + +``` +vim ~/.config/sunshine.conf +``` + - 添加如下内容: +```bash +origin_web_ui_allowed = wan +``` + +# Zoretier(p2p) +## 安装 +``` +curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \ if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi +``` +## 添加组网 +``` +zerotier-cli join network_id +``` + +然后在服务器上授权 \ No newline at end of file