ubantu 20.06 ss服务 两步走
1 docker pull mritd/shadowsocks
如果提示 docker
没有, 那么安装一下
1 docker run -dt --name ss -p 16443:16443 mritd/shadowsocks -s "-s 0.0.0.0 -p 16443 -m aes-256-cfb -k test1231. --fast-open"
test1231. -> password
————————————–华丽丽的分割线————————————————-
==服务器为centos 6== 一、搭建ss 1、用xshell或者putty等工具远程登录服务器,要用root账户登录,运行以下命令(按顺序执行):
1 2 3 4 (1)yum install -y wget (2) wget –no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh (3) chmod +x shadowsocks.sh (4) ./shadowsocks.sh 2>&1 | tee shadowsocks.log
安装完成后,会提示你设置密码,端口,加密方式;
会有如下提示
Congratulations, Shadowsocks-python server install completed! Your Server IP :your_server_ip Your Server Port :your_server_port Your Password :your_password Your Encryption Method:your_encryption_method Welcome to visit:https://teddysun.com/342.html Enjoy it!
安装完成之后的查看配置信息 :vi /etc/shadowsocks.json 展示如下:
1 2 3 4 5 6 7 8 9 10 { “server”:”0.0 .0 .0 ″, “server_port”:8989 , “local_address”:”127.0 .0 .1 ″, “local_port”:1080 , “password”:”yourpassword”, “timeout”:300 , “method”:”camellia-256 -cfb”, “fast_open”:false }
常用命令:
卸载:./shadowsocks.sh uninstall 启动:/etc/init.d/shadowsocks start 停止:/etc/init.d/shadowsocks stop 重启:/etc/init.d/shadowsocks restart 状态:/etc/init.d/shadowsocks status
电脑上安装对应的shadowsocks客户端 (1)我的是win10系统,照例还是给个链接 windows版本:https://github.com/shadowsocks/shadowsocks-windows/releases mac版本:https://github.com/shadowsocks/shadowsocks-iOS/releases android版本:https://github.com/shadowsocks/shadowsocks-android (我用的是shadowsocks-arm64-v8a-4.6.1.apk这个版本,其他几个不行,不知道为什么) (2)下载好后打开运行,电脑任务栏会有一个小飞机,双击,填写配置参数(vi /etc/shadowsocks.json 这个命令打印出来的信息);
2、开放多端口,配置ss多用户 之前的ss配置文件内如大概如下:
1 2 3 4 5 6 7 8 9 10 { "server" : "0.0.0.0" , "server_port" : 8989 , "password" : "password1" , "method" : "camellia-256-cfb" , "local_address" :"127.0.0.1" , "local_port" :1080 , "timeout" :300 , "fast_open" :false }
我们修改ss配置文件 vi /etc/shadowsocks.json
IV ,IVM编辑 退出方法 :WQ 保存退出 :X :Q 不保存退出 U撤销,ctrl+R 恢复。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 { "server" : "0.0.0.0" , "port_password" : { "8989" :"password1" , "8888" :"password2" , "9999" :"password3" }, "timeout" : 300 , "method" : "camellia-256-cfb" , "local_address" :"127.0.0.1" , "local_port" :1080 , "timeout" :300 , "fast_open" :false }
将此文件先备份到本地(以便ss客户端使用) 然后重新启动ss服务: (1) 备份
1 /etc/init.d/shadowsocks restart
这时增加的端口还不能使用,因为防火墙未开放新增的端口 开放端口的方法: 1)打开防火墙配置文件:
1 vi /etc/sysconfig/iptables
2)加入以下两句
1 2 -A INPUT -p udp -m state --state NEW -m udp --dport 8888 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 8888 -j ACCEPT
3)重启防火墙使配置生效
1 service iptables restart
现在可以尝试在客户端设置不同的端口,看看能不能fan墙了~
二、使用锐速提速 虽然现在可以访问google,看到墙外的世界了,但是,速度是有点慢。。 1、更换内核 一键更换内核脚本(vultr 需先执行此脚本)
1 wget –N —no–check–certificate https://freed.ga/kernel/ruisu.sh && bash ruisu.sh
注意:脚本执行过程中,请勿进行任何操作。不要觉得它怎么就卡住了,这个过程可能有点长,待服务器重启后,本次连接将终端,重新ssh连接服务器安装锐速即可。
2、执行锐速一键安装脚本:
1 wget –N —no–check–certificate https://github.com/91yun/serverspeeder/raw/master/serverspeeder.sh && bash serverspeeder.sh
若提示:The name of network interface is not eth0, please retry after changing the name. 请使用备用脚本: wget –N —no–check–certificate https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash serverspeeder-all.sh 若执行成功,将看到类似以下: 下面是锐速常用的一些命令:
启动:/serverspeeder/bin/serverSpeeder.sh start 停止:/serverspeeder/bin/serverSpeeder.sh stop 状态:service serverSpeeder status
==Centos7的搭建教程== 一、搭建ss服务 1) 下载安装
1 wget --no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
2) 修改目录权限 赋可执行权限
3)运行程序,记录日志
1 ./shadowsocks.sh 2>&1 | tee shadowsocks.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 ############################################################# # One click Install Shadowsocks-Python server # # Intro: https://teddysun.com/342.html # # Author: Teddysun <i@teddysun.com> # # Github: https://github.com/shadowsocks/shadowsocks # ############################################################# Please enter password for shadowsocks-python (Default password: teddysun.com):xxx --------------------------- password = xxx --------------------------- Please enter a port for shadowsocks-python [1 -65535 ] (Default port: xxx): --------------------------- port = xxx --------------------------- Please select stream cipher for shadowsocks-python: 1 ) aes-256 -gcm2 ) aes-192 -gcm3 ) aes-128 -gcm4 ) aes-256 -ctr5 ) aes-192 -ctr6 ) aes-128 -ctr7 ) aes-256 -cfb8 ) aes-192 -cfb9 ) aes-128 -cfb10 ) camellia-128 -cfb11 ) camellia-192 -cfb12 ) camellia-256 -cfb13 ) chacha20-ietf-poly130514 ) chacha20-ietf15 ) chacha2016 ) rc4-md5Which cipher you'd select(Default: aes-256-gcm):7 --------------------------- cipher = aes-256-cfb --------------------------- Press any key to start...or Press Ctrl+C to cancel Ign http://http.us.debian.org jessie InRelease Hit http://http.us.debian.org jessie-updates InRelease Hit http://http.us.debian.org jessie Release.gpg Hit http://http.us.debian.org jessie-updates/main Sources Get:1 http://http.us.debian.org jessie-updates/main amd64 Packages/DiffIndex [10.9 kB] Get:2 http://http.us.debian.org jessie-updates/main Translation-en/DiffIndex [3688 B] Hit http://http.us.debian.org jessie Release Hit http://http.us.debian.org jessie/main Sources Hit http://http.us.debian.org jessie/main amd64 Packages Hit http://http.us.debian.org jessie/main Translation-en Hit http://security.debian.org jessie/updates InRelease Hit http://security.debian.org jessie/updates/main Sources Hit http://security.debian.org jessie/updates/main amd64 Packages Hit http://security.debian.org jessie/updates/main Translation-en Fetched 14.5 kB in 4s (3370 B/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... autoconf is already the newest version. automake is already the newest version. gcc is already the newest version. libtool is already the newest version. make is already the newest version. python is already the newest version. python-dev is already the newest version. python-setuptools is already the newest version. unzip is already the newest version. wget is already the newest version. curl is already the newest version. libssl-dev is already the newest version. openssl is already the newest version. openssl set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. converted ' https:--2018 -03 -30 08 :00 :14 -- https: Resolving github.com (github.com)... 13.250 .177 .223 , 13.229 .188 .59 , 52.74 .223 .119 Connecting to github.com (github.com)|13.250 .177 .223 |:443 ... connected. HTTP request sent, awaiting response... 302 Found Location: https: converted 'https://github-production-release-asset-2e65be.s3.amazonaws.com/7710647/83a2fc2c-e01e-11e7-93d1-34e5a92f4011?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180330%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180330T080014Z&X-Amz-Expires=300&X-Amz-Signature=b1c25d7f46c71228586cd8d85265ba26f7f5d894b4bcf733fda382362a95fb4b&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlibsodium-1.0.16.tar.gz&response-content-type=application%2Foctet-stream' (ANSI_X3.4 -1968 ) -> 'https://github-production-release-asset-2e65be.s3.amazonaws.com/7710647/83a2fc2c-e01e-11e7-93d1-34e5a92f4011?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A/20180330/us-east-1/s3/aws4_request&X-Amz-Date=20180330T080014Z&X-Amz-Expires=300&X-Amz-Signature=b1c25d7f46c71228586cd8d85265ba26f7f5d894b4bcf733fda382362a95fb4b&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment; filename=libsodium-1.0.16.tar.gz&response-content-type=application/octet-stream' (UTF-8 ) --2018 -03 -30 08 :00 :15 -- https: Resolving github-production-release-asset-2e65 be.s3.amazonaws.com (github-production-release-asset-2e65 be.s3.amazonaws.com)... 52.216 .227 .8 Connecting to github-production-release-asset-2e65 be.s3.amazonaws.com (github-production-release-asset-2e65 be.s3.amazonaws.com)|52.216 .227 .8 |:443 ... connected. HTTP request sent, awaiting response... 200 OK Length: 1910835 (1.8 M) [application/octet-stream] Saving to: 'libsodium-1.0.16.tar.gz' 0 K .......... .......... .......... .......... .......... 2 % 41.2 K 44 s 50 K .......... .......... .......... .......... .......... 5 % 44.0 K 42 s 100 K .......... .......... .......... .......... .......... 8 % 70.9 K 35 s 150 K .......... .......... .......... .......... .......... 10 % 67.3 K 32 s 200 K .......... .......... .......... .......... .......... 13 % 70.9 K 29 s 250 K .......... .......... .......... .......... .......... 16 % 75.0 K 27 s 300 K .......... .......... .......... .......... .......... 18 % 70.9 K 25 s 350 K .......... .......... .......... .......... .......... 21 % 106 K 23 s 400 K .......... .......... .......... .......... .......... 24 % 106 K 21 s 450 K .......... .......... .......... .......... .......... 26 % 212 K 19 s 500 K .......... .......... .......... .......... .......... 29 % 184 K 18 s 550 K .......... .......... .......... .......... .......... 32 % 213 K 16 s 600 K .......... .......... .......... .......... .......... 34 % 213 K 15 s 650 K .......... .......... .......... .......... .......... 37 % 253 K 13 s 700 K .......... .......... .......... .......... .......... 40 % 214 K 12 s 750 K .......... .......... .......... .......... .......... 42 % 645 K 11 s 800 K .......... .......... .......... .......... .......... 45 % 313 K 10 s 850 K .......... .......... .......... .......... .......... 48 % 433 K 9 s 900 K .......... .......... .......... .......... .......... 50 % 419 K 8 s 950 K .......... .......... .......... .......... .......... 53 % 214 K 8 s 1000 K .......... .......... .......... .......... .......... 56 % 15.8 M 7 s 1050 K .......... .......... .......... .......... .......... 58 % 216 K 6 s 1100 K .......... .......... .......... .......... .......... 61 % 24.2 M 6 s 1150 K .......... .......... .......... .......... .......... 64 % 663 K 5 s 1200 K .......... .......... .......... .......... .......... 66 % 314 K 5 s 1250 K .......... .......... .......... .......... .......... 69 % 1.32 M 4 s 1300 K .......... .......... .......... .......... .......... 72 % 255 K 4 s 1350 K .......... .......... .......... .......... .......... 75 % 23.2 M 3 s 1400 K .......... .......... .......... .......... .......... 77 % 1.33 M 3 s 1450 K .......... .......... .......... .......... .......... 80 % 253 K 2 s 1500 K .......... .......... .......... .......... .......... 83 % 19.8 M 2 s 1550 K .......... .......... .......... .......... .......... 85 % 1.36 M 2 s 1600 K .......... .......... .......... .......... .......... 88 % 255 K 1 s 1650 K .......... .......... .......... .......... .......... 91 % 27.8 M 1 s 1700 K .......... .......... .......... .......... .......... 93 % 1.36 M 1 s 1750 K .......... .......... .......... .......... .......... 96 % 1.24 M 0 s 1800 K .......... .......... .......... .......... .......... 99 % 316 K 0 s 1850 K .......... ...... 100 % 19.3 M=10 s 2018 -03 -30 08 :00 :26 (180 KB/s) - 'libsodium-1.0.16.tar.gz' saved [1910835 /1910835 ]converted 'https://github.com/shadowsocks/shadowsocks/archive/master.zip' (ANSI_X3.4 -1968 ) -> 'https://github.com/shadowsocks/shadowsocks/archive/master.zip' (UTF-8 ) --2018 -03 -30 08 :00 :26 -- https: Resolving github.com (github.com)... 13.229 .188 .59 , 52.74 .223 .119 , 13.250 .177 .223 Connecting to github.com (github.com)|13.229 .188 .59 |:443 ... connected. HTTP request sent, awaiting response... 302 Found Location: https: converted 'https://codeload.github.com/shadowsocks/shadowsocks/zip/master' (ANSI_X3.4 -1968 ) -> 'https://codeload.github.com/shadowsocks/shadowsocks/zip/master' (UTF-8 ) --2018 -03 -30 08 :00 :26 -- https: Resolving codeload.github.com (codeload.github.com)... 13.250 .162 .133 , 13.229 .189 .0 , 54.251 .140 .56 Connecting to codeload.github.com (codeload.github.com)|13.250 .162 .133 |:443 ... connected. HTTP request sent, awaiting response... 200 OK Length: 114904 (112 K) [application/zip] Saving to: 'shadowsocks-master.zip' 0 K .......... .......... .......... .......... .......... 44 % 7.12 M 0 s 50 K .......... .......... .......... .......... .......... 89 % 217 K 0 s 100 K .......... .. 100 % 17.6 M=0.2 s 2018 -03 -30 08 :00 :27 (472 KB/s) - 'shadowsocks-master.zip' saved [114904 /114904 ]converted 'https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-debian' (ANSI_X3.4 -1968 ) -> 'https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-debian' (UTF-8 ) --2018 -03 -30 08 :00 :27 -- https: Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101 .8 .133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101 .8 .133 |:443 ... connected. HTTP request sent, awaiting response... 200 OK Length: 1938 (1.9 K) [text/plain] Saving to: '/etc/init.d/shadowsocks' 0 K . 100 % 9.74 M=0 s 2018 -03 -30 08 :00 :27 (9.74 MB/s) - '/etc/init.d/shadowsocks' saved [1938 /1938 ]running install running bdist_egg running egg_info creating shadowsocks.egg-info writing shadowsocks.egg-info/PKG-INFO writing top-level names to shadowsocks.egg-info/top_level.txt writing dependency_links to shadowsocks.egg-info/dependency_links.txt writing entry points to shadowsocks.egg-info/entry_points.txt writing manifest file 'shadowsocks.egg-info/SOURCES.txt' reading manifest file 'shadowsocks.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'shadowsocks.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/lru_cache.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/udprelay.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/eventloop.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/common.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/shell.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/local.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/server.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/asyncdns.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/cryptor.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/manager.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/__init__.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/tcprelay.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/tunnel.py -> build/lib.linux-x86_64-2.7 /shadowsocks copying shadowsocks/daemon.py -> build/lib.linux-x86_64-2.7 /shadowsocks creating build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/openssl.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/aead.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/hkdf.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/__init__.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/rc4_md5.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/sodium.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/util.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/mbedtls.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto copying shadowsocks/crypto/table.py -> build/lib.linux-x86_64-2.7 /shadowsocks/crypto creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/lru_cache.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/udprelay.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/eventloop.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/common.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/shell.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/local.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/server.py -> build/bdist.linux-x86_64/egg/shadowsocks creating build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/openssl.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/aead.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/hkdf.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/__init__.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/rc4_md5.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/sodium.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/util.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/mbedtls.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/crypto/table.py -> build/bdist.linux-x86_64/egg/shadowsocks/crypto copying build/lib.linux-x86_64-2.7 /shadowsocks/asyncdns.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/cryptor.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/manager.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/__init__.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/tcprelay.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/tunnel.py -> build/bdist.linux-x86_64/egg/shadowsocks copying build/lib.linux-x86_64-2.7 /shadowsocks/daemon.py -> build/bdist.linux-x86_64/egg/shadowsocks byte -compiling build/bdist.linux-x86_64/egg/shadowsocks/lru_cache.py to lru_cache.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/udprelay.py to udprelay.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/eventloop.py to eventloop.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/common.py to common.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/shell.py to shell.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/local.py to local.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/server.py to server.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/openssl.py to openssl.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/aead.py to aead.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/hkdf.py to hkdf.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/__init__.py to __init__.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/rc4_md5.py to rc4_md5.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/sodium.py to sodium.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/util.py to util.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/mbedtls.py to mbedtls.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/crypto/table.py to table.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/asyncdns.py to asyncdns.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/cryptor.py to cryptor.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/manager.py to manager.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/__init__.py to __init__.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/tcprelay.py to tcprelay.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/tunnel.py to tunnel.pycbyte -compiling build/bdist.linux-x86_64/egg/shadowsocks/daemon.py to daemon.pyccreating build/bdist.linux-x86_64/egg/EGG-INFO copying shadowsocks.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying shadowsocks.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying shadowsocks.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying shadowsocks.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying shadowsocks.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... shadowsocks.tunnel: module references __file__ shadowsocks.shell: module references __file__ shadowsocks.server: module references __file__ shadowsocks.local: module references __file__ creating dist creating 'dist/shadowsocks-3.0.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing shadowsocks-3.0 .0 -py2.7 .egg removing '/usr/local/lib/python2.7/dist-packages/shadowsocks-3.0.0-py2.7.egg' (and everything under it) creating /usr/local/lib/python2.7 /dist-packages/shadowsocks-3.0 .0 -py2.7 .egg Extracting shadowsocks-3.0 .0 -py2.7 .egg to /usr/local/lib/python2.7 /dist-packages shadowsocks 3.0 .0 is already the active version in easy-install.pth Installing sslocal script to /usr/local/bin Installing ssserver script to /usr/local/bin Installed /usr/local/lib/python2.7 /dist-packages/shadowsocks-3.0 .0 -py2.7 .egg Processing dependencies for shadowsocks==3.0 .0 Finished processing dependencies for shadowsocks==3.0 .0 writing list of installed files to '/usr/local/shadowsocks_install.log' INFO: loading config from /etc/shadowsocks.json 2018 -03 -30 08 :00 :27 INFO loading libcrypto from libcrypto.so.1 .0 .0 Starting Shadowsocks success Congratulations, Shadowsocks-python server install completed! Your Server IP : xxx.xxx.xxx.xxx Your Server Port : xxx Your Password : xxx Your Encryption Method: aes-256 -cfb Welcome to visit:https: Enjoy it!
2、启动ss
1 ssserver -c /etc/shadowsocks.json -d start
停止ss服务:
1 ssserver -c /etc/shadowsocks.json -d stop
3、配置多用户,增加端口
4、开放防火墙端口 新增加的端口防火墙是没有开放的,需要手动开放
1 vi /etc/firewalld/zones/public.xml
将端口8888的两行配置复制一下到下面,将其修改为9999。以开放9999端口的TCP和UDP访问功能。 配置完成后需要重启SS和刷新防火墙配置,执行:
1 2 /etc/init.d/shadowsocks restart firewall-cmd --reload
最后本机ss客户端填写配置信息,然后尝试访问谷歌,测试一下每个端口是否都可用,如果都可用,说明配置正确。
二、搭建锐速 1、对于centos7,内核更换为: 3.10.0-229.1.2.el7.x86_64
1 rpm -ivh http://soft.91yun.org/ISO/Linux/CentOS/kernel/kernel-3.10.0-229.1.2.el7.x86_64.rpm --force
2、更换内核后重启服务器
3、安装锐速,这里我们仍然使用一键脚本
1 wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash serverspeeder-all.sh
4、启动锐速
1 service serverSpeeder start
至此就搭建完啦,试着打开youtube看看1080p的视频吧,速度是不是挺给力?如果是,那么恭喜你,搭建成功了!