在linux vps上,先安装jdk环境。然后,
wget https://github.com/arloor/socks5/releases/download/latest/server-3.0-jar-with-dependencies.jar -O
socks5_arloor-server-3.0-jar-with-dependencies.jar
nano socks5_arloor-server.json
内容如下:
{ "ServerPort": 7060, "RedirctAddr": "www.grove.co.uk:80", "Users": [ { "UserName": "a", "Password": "b" } ], "Dev":true }
然后运行:
java -jar socks5_arloor-server-3.0-jar-with-dependencies.jar -c socks5_arloor-server.json
不过此命令是运行在前台的,容易退出,我们可以利用systemd让它运行在后台:
nano /etc/systemd/system/socks5_arloor-server.service
内容如下:
nano socks5_arloor-client.json
内容如下:
wget https://github.com/arloor/socks5/releases/download/latest/server-3.0-jar-with-dependencies.jar -O
socks5_arloor-server-3.0-jar-with-dependencies.jar
nano socks5_arloor-server.json
内容如下:
{ "ServerPort": 7060, "RedirctAddr": "www.grove.co.uk:80", "Users": [ { "UserName": "a", "Password": "b" } ], "Dev":true }
然后运行:
java -jar socks5_arloor-server-3.0-jar-with-dependencies.jar -c socks5_arloor-server.json
不过此命令是运行在前台的,容易退出,我们可以利用systemd让它运行在后台:
nano /etc/systemd/system/socks5_arloor-server.service
内容如下:
[Unit]
After=network.target
[Service]
ExecStart=/usr/bin/java -jar /root/socks5_arloor-server-3.0-jar-with-dependencies.jar -c /root/socks5_arloor-server.json
Restart=always
[Install]
WantedBy=multi-user.target
然后运行:
systemctl start socks5_arloor-server
systemctl enable socks5_arloor-server
服务器端搭建完成。
在本地机器mac上。先安装jdk环境。然后,
wget https://github.com/arloor/socks5/releases/download/latest/client-3.0-jar-with-dependencies.jar
-O socks5_arloor-client-3.0-jar-with-dependencies.jar
nano socks5_arloor-client.json
内容如下:
{
"ClientPort": 6666,
"SpeedLimitKB": 0,
"Use": 0,
"Servers": [
{
"ProxyAddr": "your-vps-ip",
"ProxyPort": 7060,
"UserName": "a",
"Password": "b"
}
],
"User": "this",
"Pass": "socks5",
"Auth":false
}
然后,运行:
java -jar socks5_arloor-client-3.0-jar-with-dependencies.jar -c socks5_arloor-client.json
不要关闭此terminal.
设置chrome浏览器的socks5代理服务器地址为127.0.0.1 ,端口为6666 ,chrome浏览器即可翻墙。
项目地址:https://github.com/arloor/socks5
相关帖子:https://briteming.blogspot.com/2019/07/httpproxy-by-arloor.html
相关帖子:https://briteming.blogspot.com/2019/07/httpproxy-by-arloor.html
No comments:
Post a Comment