linux 下开源代理路由工具

服务器搭建,参考 https://gfw.press/blog/?p=21

运行环境 openjdk1.8,linux

 

1.首先,获取工具地址

git clone https://github.com/lemos1235/gclient-for-linux.git /usr/share/gfwpress
cd /usr/share/gfwpress

  

2.配置解压后目录下的 client.json文件 (填写 gfw.press官网上的提供的用户信息)

vim client.json

 

3.配置脚本的可执行权限

chmod +x ./gclient

 

4.添加开机自启

编写脚本

vim /usr/lib/systemd/system/gfwpress.service

 内容:

[Unit]
Description=gfwpress

[Service]
ExecStart=/usr/share/gfwpress/gclient
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

 

启动服务

systemctl enable gfwpress

systemctl start gfwpress

systemctl status gfwpress -l

 

如果服务开启成功,则输出

  

除了使用这个脚本,也可以使用官网提供的脚本。

git clone https://github.com/chinashiyu/gfw.press.git

然后赋予执行权限,运行

chmod +x client.sh

./client.sh

弹出一个窗口,然后填入配置信息... 

posted on 2017-03-16 17:36  Lemo_wd  阅读(500)  评论(0编辑  收藏  举报

导航