Realm

转发部署教程

第一步,下载realm到 /app/realm 目录下

直接复制命令执行即可不用改动

shell

mkdir -p /app/realm && wget -P /app/realm/ -O /app/realm/realm.tar.gz https://github.com/zhboner/realm/releases/download/v2.6.0/realm-x86_64-unknown-linux-gnu.tar.gz && tar -xvf /app/realm/realm.tar.gz -C /app/realm && chmod +x /app/realm/realm
Shell

第二步,创建配置文件

这个命令内容需要你手动改一下
  1. 第一个endpoints是ipv4的 第一行ip不用改,端口改为你中转机转发的端口。第二行改ip为你落地鸡的ip,端口改为你节点端口(建议落地使用reality)
  1. 第二个endpoints是v6写法,不用可以删掉,最后的EOF不能删。

shell

cat << EOF > /app/realm/config.toml [network] no_tcp = false use_udp = true [[endpoints]] listen = "0.0.0.0:8080" remote = "8.8.8.8:8080" [[endpoints]] listen = "[::]:9090" remote = "[::]:9090" EOF
Shell

第三步,创建系统服务

shell

cat << EOF | sudo tee /etc/systemd/system/realm.service > /dev/null [Unit] Description=realm After=network-online.target Wants=network-online.target systemd-networkd-wait-online.service [Service] Type=simple User=root Restart=on-failure RestartSec=5s DynamicUser=true WorkingDirectory=/app/realm ExecStart=/app/realm/realm -c /app/realm/config.toml [Install] WantedBy=multi-user.target EOF
Shell

第四步,加载系统服务

shell

systemctl daemon-reload
Shell

第五步,配置开机自启

shell

systemctl enable realm
Shell

服务操作命令:

shell

systemctl restart realm #启动服务 systemctl status realm #检查服务状态 systemctl stop realm # 停止服务
Shell
最后将你节点原本的ip地址改为中转机ip,端口改为中转机端口即可

一键脚本

shell

wget -N --no-check-certificate https://git.io/realm.sh && chmod +x realm.sh && ./realm.sh
Shell
哪吒移动版1.5正式版上线了Caddy新一代轻量web服务器
Loading...
hexo