Chinaunix首页 | 论坛 | 认证专区 | 博客 登录 | 注册
  • 博客访问: 480082
  • 博文数量: 112
  • 博客积分: 660
  • 博客等级: 上士
  • 技术积分: 1806
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-08 11:39
文章分类

全部博文(112)

文章存档

2017年(50)

2016年(7)

2015年(3)

2014年(3)

2013年(31)

2012年(2)

2011年(1)

2006年(1)

2005年(13)

微信关注

IT168企业级官微



微信号:IT168qiye



系统架构师大会



微信号:SACC2013

订阅
热词专题
如何建立ss server端 2017-08-29 14:53:04

分类: 网络与安全

如何建立ssserver端

环境

centos7.3

安装步骤

软件安装

安装python工具

yum install python-setuptools && easy_install pip
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
epel                                                                                                                                                                    | 4.3 kB  00:00:00
extras                                                                                                                                                                  | 3.4 kB  00:00:00
os                                                                                                                                                                      | 3.6 kB  00:00:00
updates                                                                                                                                                                 | 3.4 kB  00:00:00
zabbix                                                                                                                                                                  |  951 B  00:00:00
zabbix-non-supported                                                                                                                                                    |  951 B  00:00:00
(1/3): epel/7/x86_64/group_gz                                                                                                                                           | 170 kB  00:00:00
(2/3): epel/7/x86_64/updateinfo                                                                                                                                         | 816 kB  00:00:00
(3/3): epel/7/x86_64/primary_db                                                                                                                                         | 4.8 MB  00:00:00
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package python-setuptools.noarch 0:0.9.8-4.el7 will be installed
--> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-4.el7.noarch
--> Running transaction check
---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7 will be installed
--> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch
--> Running transaction check
---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                                            Arch                                  Version                                      Repository                         Size
===============================================================================================================================================================================================
Installing:
 python-setuptools                                                  noarch                                0.9.8-4.el7                                  os                                396 k
Installing for dependencies:
 python-backports                                                   x86_64                                1.0-8.el7                                    os                                5.8 k
 python-backports-ssl_match_hostname                                noarch                                3.4.0.2-4.el7                                os                                 12 k

Transaction Summary
===============================================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 414 k
Installed size: 2.0 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): python-backports-1.0-8.el7.x86_64.rpm                                                                                                                            | 5.8 kB  00:00:00
(2/3): python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch.rpm                                                                                                     |  12 kB  00:00:00
(3/3): python-setuptools-0.9.8-4.el7.noarch.rpm                                                                                                                         | 396 kB  00:00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                          4.1 MB/s | 414 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-backports-1.0-8.el7.x86_64                                                                                                                                           1/3
  Installing : python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch                                                                                                                    2/3
  Installing : python-setuptools-0.9.8-4.el7.noarch                                                                                                                                        3/3
  Verifying  : python-setuptools-0.9.8-4.el7.noarch                                                                                                                                        1/3
  Verifying  : python-backports-1.0-8.el7.x86_64                                                                                                                                           2/3
  Verifying  : python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch                                                                                                                    3/3

Installed:
  python-setuptools.noarch 0:0.9.8-4.el7

Dependency Installed:
  python-backports.x86_64 0:1.0-8.el7                                                python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7

Complete!

安装ss

pip install shadowsocks
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 9.0.1
Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
Processing pip-9.0.1.tar.gz
Writing /tmp/easy_install-Z0QGGZ/pip-9.0.1/setup.cfg
Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Z0QGGZ/pip-9.0.1/egg-dist-tmp-vT1TA6
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.landscape.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching '.github'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'

编辑生成配置文件

vi /etc/shadowsocks.json
{
    "server":"your server ip",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": true
}

打开fast tcp 的系统开关

echo 3 > /proc/sys/net/ipv4/tcp_fastopen

运行测试

ssserver -c /etc/shadowsocks.json

作为后台服务启动

ssserver -c /etc/shadowsocks.json -d start

关闭命令

ssserver -c /etc/shadowsocks.json -d stop

服务日志

/var/log/shadowsocks.log

参考

ss说明

阅读(151) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册