多端口转发
# 说明
通过toml配置文件,配置多个转发端口
# 配置
编辑
/etc/realm/realm.toml
[log]
level = "warn"
output = "/var/log/realm.log"
[network]
no_tcp = false
use_udp = true
fast_open = true
[[endpoints]]
listen = "<IP>:<PORT>"
remote = "<IP>:<PORT>"
[[endpoints]]
listen = "<IP>:<PORT>"
remote = "<IP>:<PORT>"
# 启动服务
编辑
/etc/systemd/system/realm.service
[Unit]
Description=realm
After=network.target
Wants=network.target
[Service]
Type=simple
User=root
LimitAS=infinity
LimitCORE=infinity
LimitNOFILE=102400
LimitNPROC=102400
ExecStart=/etc/realm/realm -c /etc/realm/realm.toml
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill $MAINPID
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
上次更新: 2025/03/22, 03:52:10