CentOS搭建V/P/N实践

对于搞研发的来讲,搜索各种技术资料,尤其是英文的,那是家常便饭,但鉴于网络环境不稳定,所以还是想能自己搭一个服务使用更好一些,以下是shadowsocks+serverspeeder的搭建方案,难度不高,流程简单,根据各方口碑来看也比较推荐

一,安装,参考官方Shadowsocks使用说明

pip3 install shadowsocks

二,配置,参考Configuration via Config File

#修改配置文件/etc/shadowsocks.json
vi /etc/shadowsocks.json
#单端口单账号
{  
    "server":"0.0.0.0",  
    "server_port":8388,  
    "local_address": "127.0.0.1",  
    "local_port":1080,  
    "password":"mypassword",  
    "timeout":300,  
    "method":"aes-256-cfb",  
    "fast_open": false  
}
#多端口多账号
{  
    "server":"0.0.0.0",  
    "port_password":{  
     "8381":"xxxxxxx",  
     "8382":"xxxxxxx",  
     "8383":"xxxxxxx",  
     "8384":"xxxxxxx"  
     },  
    "timeout":300,  
    "method":"aes-256-cfb",  
    "fast_open": false  
}

三,启动服务

#前台启动
ssserver -c /etc/shadowsocks.json

#后台启动与停止
ssserver -c /etc/shadowsocks.json -d start  
ssserver -c /etc/shadowsocks.json -d stop

#如需开机启动,在/etc/rc.local中加入以下内容
ssserver -c /etc/shadowsocks.json -d start

四,客户端下载安装

#Windows   
https://github.com/shadowsocks/shadowsocks-windows/releases   
  
#Mac OS X   
https://github.com/shadowsocks/ShadowsocksX-NG/releases 

#Linux   
https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation   
https://github.com/shadowsocks/shadowsocks-qt5/releases  

#IOS   
https://itunes.apple.com/app/apple-store/id1070901416?pt=2305194&ct=shadowsocks.org&mt=8   
https://github.com/shadowsocks/shadowsocks-iOS/releases

#Android   
https://play.google.com/store/apps/details?id=com.github.shadowsocks   
https://github.com/shadowsocks/shadowsocks-android/releases

五,serverspeeder加速安装(可选),参考serverspeeder锐速一键破解安装版

#安装脚本
wget -N --no-check-certificate https://github.com/91yun/serverspeeder/raw/master/serverspeeder.sh && bash serverspeeder.sh

#卸载脚本
chattr -i /serverspeeder/etc/apx* && /serverspeeder/bin/serverSpeeder.sh uninstall -f

如果报内核不支持,可以更换系统内核(我遇到了,但没更换内核,请自行尝试)

#下载内核安装包  
wget http://ftp.scientificlinux.org/linux/scientific/6.6/x86_64/updates/security/kernel-2.6.32-504.3.3.el6.x86_64.rpm  
  
#更换内核  
rpm -ivh kernel-2.6.32-504.3.3.el6.x86_64.rpm --force  
  
#重启  
reboot  
  
#查看内核版本是否替换成功  
cat /proc/version

六,附:支持订阅链接的客户端

最终放弃了自己搭建 ,一是速度不稳定,二是维护起来不太方便,所以使用了三方付费服务,然后使用订阅链接,这个软件Clash Verge Rev Alpha是真的棒👍

Leave a Comment

Your email address will not be published.

*

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据