Centos/Ubuntu安装Shadowsocks-PHP教程

Standard

Shadowsocks-PHP,基于workerman框架开发

SS-PHP

  • 安装PHP(可选,若已安装PHP请跳过这一步)

Centos使用:yum install php

Ubuntu使用:apt-get install php5

 

  • 安装依赖

Centos使用:yum install php-cli php-process git gcc php-devel php-pear libevent-devel

Ubuntu使用:apt-get install php5-cli git gcc php-pear php5-dev libevent-dev

 

  • 下载SS-PHP

wget https://github.com/walkor/shadowsocks-php/archive/master.zip -O ~/shadowsocks-php.zip

  • 解压

unzip shadowsocks-php.zip

  • 修改配置

vi ~/shadowsocks-php-master/Applications/Shadowsocks/config.php

按字母 i 进入编辑模式更改设置

<?php
// 加密算法
$METHOD = ‘aes-256-cfb’;
// 密码
$PASSWORD = ‘password’;
// 运行后监听哪个端口
$PORT = 4431;
// 启动多少进程
$PROCESS_COUNT = 12;

截至2015-07-16,支持以下加密算法

aes-128-cfb
aes-192-cfb
aes-256-cfb
bf-cfb
camellia-128-cfb
camellia-192-cfb
camellia-256-cfb
cast5-cfb
des-cfb
idea-cfb
rc2-cfb
rc4
rc4-md5
seed-cfb

:wq 保存设置

 

  • 运行

php ~/shadowsocks-php-master/start.php start -d

  • 停止

php ~/shadowsocks-php-master/start.php stop

  • 查看状态

php ~/shadowsocks-php-master/start.php status

 

 

  • 参考资料:

https://github.com/walkor/shadowsocks-php

http://doc3.workerman.net/install/install.html

留下一个回复

发表评论成功

通知
avatar
wpDiscuz