安装系统依赖
1 | yum install -y openssl-devel gcc swig python-devel autoconf libtool |
安装谷歌BBR
网络拥塞算法, 该脚本会自动升级内核1
2
3wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh
系统优化
1 | vi /etc/sysctl.conf |
内容如下:
1 | # Kernel sysctl configuration file for Red Hat Linux |
保存生效1
sysctl -p
打开防火墙端口1
2
3service iptables status
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
ptables -I INPUT -p udp --dport 443 -j ACCEPT
脚本一键安装
https://teddysun.com/486.html1
2
3wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh
chmod +x shadowsocksR.sh
./shadowsocksR.sh 2>&1 | tee shadowsocksR.log
配置
1 | vi /etc/shadowsocks.json |
文件内容1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
"server":"0.0.0.0",
"server_ipv6":"[::]",
"server_port":443,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"密码",
"timeout":120,
"method":"aes-256-cfb", # 加密方法
"obfs":"http_simple", # 混淆算法
"protocol":"auth_chain_a", # 协议
"obfs_param":"",
"redirect":"",
"dns_ipv6":false,
"fast_open":true,
"workers":1
}
管理
1 | # 重启 |