关于ss的搭建

版权声明:如需转载,请注明作者及出处 https://blog.csdn.net/qq_33317586/article/details/85042776

之前经理国外出差,说让搭建一台ss,想看国内视频,一直没弄,今天干脆本地模拟一下:


参考:https://www.polarxiong.com/archives/Ubuntu-16-04下Shadowsocks服务器端安装及优化.html


测试机:ubuntu18.04

虚拟机IP:192.168.183.128


第一步、安装python3

root@uscwificn:~# apt install python3.7
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libpython3.7-minimal libpython3.7-stdlib python3.7-minimal
Suggested packages:
  python3.7-venv python3.7-doc binutils binfmt-support
The following NEW packages will be installed:
  libpython3.7-minimal libpython3.7-stdlib python3.7 python3.7-minimal
0 upgraded, 4 newly installed, 0 to remove and 6 not upgraded.
Need to get 4,234 kB of archives.
After this operation, 22.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

第二步、安装pip3管理器

root@uscwificn:~# apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7
  gcc-7-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libbinutils libc-dev-bin
  libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-7-dev libgomp1 libisl19
  libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev
  make manpages-dev python-pip-whl python3-crypto python3-dev python3-distutils python3-keyring python3-keyrings.alt python3-lib2to3
  python3-secretstorage python3-setuptools python3-wheel python3-xdg python3.6-dev
Suggested packages:
  binutils-doc cpp-doc gcc-7-locales debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib autoconf
  automake libtool flex bison gdb gcc-doc gcc-7-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg
  liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc bzr libstdc++-7-doc make-doc
  python-crypto-doc gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7
  gcc-7-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libbinutils libc-dev-bin
  libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-7-dev libgomp1 libisl19
  libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev
  make manpages-dev python-pip-whl python3-crypto python3-dev python3-distutils python3-keyring python3-keyrings.alt python3-lib2to3
  python3-pip python3-secretstorage python3-setuptools python3-wheel python3-xdg python3.6-dev
0 upgraded, 57 newly installed, 0 to remove and 6 not upgraded.
Need to get 85.2 MB of archives.
After this operation, 247 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y

第三步、安装shadowsocks

如文中所说啊,github作者确实这个不再维护了

root@uscwificn:~# pip3 install https://github.com/shadowsocks/shadowsocks/archive/master.zip
Collecting https://github.com/shadowsocks/shadowsocks/archive/master.zip
  Downloading https://github.com/shadowsocks/shadowsocks/archive/master.zip (114kB)
    100% |████████████████████████████████| 122kB 299kB/s 
Installing collected packages: shadowsocks
  Running setup.py install for shadowsocks ... done
Successfully installed shadowsocks-3.0.0
root@uscwificn:~# ssserver --version
Shadowsocks 3.0.0

第四步、创建配置文件

root@uscwificn:~# mkdir /etc/shadowsocks
root@uscwificn:~# vim /etc/shadowsocks/config.json
root@uscwificn:~# cat /etc/shadowsocks/config.json 
{
	"server":"::",
	"server_port":8888,
	"local_address": "127.0.0.1",
	"local_port":1080,
	"password":"CK7R5MMxEwCm1Q",
	"timeout":300,
	"method":"aes-256-cfb",
	"fast_open": false
}

第五步、测试(我看就免了吧虚拟机测个屁)

启动命令:

root@uscwificn:~# ssserver -c /etc/shadowsocks/config.json
INFO: loading config from /etc/shadowsocks/config.json
2018-12-16 16:45:17 INFO     loading libcrypto from libcrypto.so.1.1
2018-12-16 16:45:17 INFO     starting server at :::8888

猜你喜欢

转载自blog.csdn.net/qq_33317586/article/details/85042776
ss