Initial commit: FunConnect project with server, relay, client and admin panel
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
39
deploy/funmc-relay.service
Normal file
39
deploy/funmc-relay.service
Normal file
@@ -0,0 +1,39 @@
|
||||
[Unit]
|
||||
Description=FunMC Relay Server - QUIC Relay for Minecraft Traffic
|
||||
Documentation=https://github.com/mofangfang/funmc
|
||||
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
|
||||
Reference in New Issue
Block a user