鸣谢在先:感谢unnamed大佬全程详细指导,令我这个小白获益匪浅。
以下是安装步骤:
- 下载最新版迷雾通ARMv7
- 用winscp将其上传至树莓派系统,我是放在home/pi这个目录下
-
cd
命令到 home/pi - 更改文件访问权限
chmod u+x geph4-client-linux-armv7
(刚刚下载好的那个迷雾通软件的全名) - 运行该程序
./geph4-client-linux-armv7 connect --username xxx --password xxx --socks5-listen 0.0.0.0:9909
(username后面的xxx改成你的用户名,password后面的xxx改成你的密码)
稍等片刻迷雾通就连上了。
进阶设定:
- 更改出口节点:
先获取节点地址./geph4-client-linux-armv7 sync --password xxx --username xxx
在结果中寻找节点地址,节点地址的形式:xx-xx-xx.exits.geph.io,头一个xx是国家代码。
结束目前的迷雾通进程,用如下的命令重新运行一次:./geph4-client-linux-armv7 connect --password xxx --username xxx --socks5-listen 0.0.0.0:9909 --exit-server "节点地址"
如何结束迷雾通进程:输入pgrep geph 获取geph进程的ID,输入kill ID 结束geph
2.设定开机自启动:
在/etc/systemd/system
目录下用vi新建geph.service文件,写入如下内容:
[Unit]
Description=Geph Service
After=network-online.target
[Service]
Type=simple
Restart=on-failure
ExecStart=/home/pi/geph4-client-linux-armv7 connect --username xxx --password xxx --socks5-listen 0.0.0.0:9909 --exclude-prc --use-bridges --exit-server "节点地址"
[Install]
WantedBy=multi-user.target
注意:ExecStart那一段的内容要根据你的具体情况改一下,包括路径,用户名,密码,监听地址和端口,网桥,出口节点。
输入:wq
保存退出。
输入sudo -i
进入root
目录
输入ls -Al
列出root
下的内容,查看一下有没有.config这个目录,没有的话就输入mkdir .config新建一个
输入sudo systemctl daemon-reload
输入sudo systemctl enable --now geph.service
输入sudo systemctl restart geph
或者reboot
重启系统
输入systemctl status geph
看看是不是已经生效了。