前言
本人有一台移动直连线路的香港VPS,由于本人网络环境没有移动网络,因此想使用WAP的广西移动IPv6 VPS作为中转节点,来与香港VPS进行连接。
安装Realm
由于IPv6网络无法直接连接到Github,故下载到本地,再通过SFTP上传到VPS。
下载
配置Realm
假设Realm已上传到VPS并且在/root目录下
赋予 /root 目录下的 realm 可执行755权限
1chmod +x realm
创建realm配置文件
1nano /root/realm.toml
1[network]
2no_tcp = false
3use_udp = true
4
5[[endpoints]]
6listen = "0.0.0.0:监听端口"
7remote = "香港VPS IPv6地址:目标端口"
创建自启动服务项
1nano /etc/systemd/system/realm.service
1[Unit]
2Description=realm
3After=network-online.target
4Wants=network-online.target systemd-networkd-wait-online.service
5
6[Service]
7Type=simple
8User=root
9Restart=on-failure
10RestartSec=5s
11DynamicUser=true
12ExecStart=/root/realm -c /root/realm.toml #realm及其配置的目录
13[Install]
14WantedBy=multi-user.target
启动Realm
1systemctl daemon-reload
2systemctl enable realm && systemctl start realm
这样IPv6 VPS上的Realm中转服务就配置好了。