登陆linux vps.先安装cmake环境。
git clone https://github.com/avplayer/socks_server socks_server-by-avplayer
cd socks_server-by-avplayer
root@umh:~/socks_server-by-avplayer# ls
CMakeLists.txt README.md cmake do_auth.js rfc src
root@umh:~/socks_server-by-avplayer# mkdir build && cd build && cmake ..
root@umh:~/socks_server-by-avplayer/build# ls
CMakeCache.txt Makefile
CMakeFiles cmake_install.cmake
root@umh:~/socks_server-by-avplayer/build# make
root@umh:~/socks_server-by-avplayer/build# ls
CMakeCache.txt Makefile socks_client
CMakeFiles cmake_install.cmake socks_server
(生成了可执行文件socks_server)
root@umh:~/socks_server-by-avplayer/build# ./socks_server --address 0.0.0.0 --port 45679 &
不过 ./socks_server --address 0.0.0.0 --port 45679 &容易退出运行,我们可以利用systemd来把该命令运行为service:
nano /etc/systemd/system/socks_server-by-avplayer.service
内容为:
[Unit]
After=network.target
[Service]
WorkingDirectory=/root/socks_server-by-avplayer/build/
ExecStart=/root/socks_server-by-avplayer/build/socks_server --address 0.0.0.0 --port 45679
Restart=always
[Install]
WantedBy=multi-user.target
然后运行:
systemctl start socks_server-by-avplayer
systemctl enable socks_server-by-avplayer
服务器端就搭建好了。
在本地机器上。以firefox为例。
设置ff的socks5代理服务器地址为vps-ip:35289 ,还要设置ff的dns解析为远程dns解析。
这样,ff即可翻墙。
注:当然也可利用chrome+switchyomega来翻墙。
chrome+switchyomega其实比ff更好用,更能抗‘dns污染’。所以强烈建议在chrome+switchyomega里使用。
项目地址: https://github.com/avplayer/socks_server或者
https://github.com/Jackarain/socks_server
git clone https://github.com/avplayer/socks_server socks_server-by-avplayer
cd socks_server-by-avplayer
root@umh:~/socks_server-by-avplayer# ls
CMakeLists.txt README.md cmake do_auth.js rfc src
root@umh:~/socks_server-by-avplayer# mkdir build && cd build && cmake ..
root@umh:~/socks_server-by-avplayer/build# ls
CMakeCache.txt Makefile
CMakeFiles cmake_install.cmake
root@umh:~/socks_server-by-avplayer/build# make
root@umh:~/socks_server-by-avplayer/build# ls
CMakeCache.txt Makefile socks_client
CMakeFiles cmake_install.cmake socks_server
(生成了可执行文件socks_server)
root@umh:~/socks_server-by-avplayer/build# ./socks_server --address 0.0.0.0 --port 45679 &
不过 ./socks_server --address 0.0.0.0 --port 45679 &容易退出运行,我们可以利用systemd来把该命令运行为service:
nano /etc/systemd/system/socks_server-by-avplayer.service
内容为:
[Unit]
After=network.target
[Service]
WorkingDirectory=/root/socks_server-by-avplayer/build/
ExecStart=/root/socks_server-by-avplayer/build/socks_server --address 0.0.0.0 --port 45679
Restart=always
[Install]
WantedBy=multi-user.target
然后运行:
systemctl start socks_server-by-avplayer
systemctl enable socks_server-by-avplayer
服务器端就搭建好了。
在本地机器上。以firefox为例。
设置ff的socks5代理服务器地址为vps-ip:35289 ,还要设置ff的dns解析为远程dns解析。
这样,ff即可翻墙。
注:当然也可利用chrome+switchyomega来翻墙。
chrome+switchyomega其实比ff更好用,更能抗‘dns污染’。所以强烈建议在chrome+switchyomega里使用。
项目地址: https://github.com/avplayer/socks_server或者
https://github.com/Jackarain/socks_server
No comments:
Post a Comment