40 lines
776 B
Desktop File
40 lines
776 B
Desktop File
[Unit]
|
|
Description=FunMC Relay Server - QUIC Relay for Minecraft Traffic
|
|
Documentation=https://gt.funmc.cn/xiaobai/FunConnect
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=funmc
|
|
Group=funmc
|
|
WorkingDirectory=/opt/funmc
|
|
ExecStart=/opt/funmc/relay-server
|
|
Restart=always
|
|
RestartSec=5
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=funmc-relay
|
|
|
|
# 环境变量
|
|
Environment=RUST_LOG=funmc_relay_server=info
|
|
Environment=RELAY_LISTEN_ADDR=0.0.0.0:7900
|
|
EnvironmentFile=/opt/funmc/.env
|
|
|
|
# 安全限制
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
|
|
# 网络优先 - 中继服务器需要低延迟
|
|
Nice=-5
|
|
IOSchedulingClass=realtime
|
|
IOSchedulingPriority=0
|
|
|
|
# 资源限制
|
|
LimitNOFILE=65536
|
|
LimitNPROC=4096
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|