<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/ DTD/wml_1.1.xml">

<wml>
<head>
<meta http-equiv="cache-control" content="max-age=180,private" />
</head>
<card title="ShadowsocksR一键安装脚本">
<p>
作者:<a href="index.php?action=showuser&amp;userid=1&amp;hash=">admin</a><br />时间:2016-08-31 07:53<br />分类:<a href="index.php?action=list&amp;cid=3&amp;hash=">电脑技术</a><br />内容:
ShadowsocksR一键安装脚本

本脚本适用环境：
系统支持：CentOS，Debian，Ubuntu
内存要求：&ge;128M
日期：2016 年 08 月 13 日

关于本脚本：
一键安装 ShadowsocksR 服务端。
请下载与之配套的客户端程序来连接。
（以下客户端只有 Windows 客户端和 Python 版客户端可以使用 SSR 新特性，其他原版客户端只能以兼容的方式连接 SSR 服务器）

默认配置：
服务器端口：自己设定（如不设定，默认为 8989）
客户端端口：1080
密码：自己设定（如不设定，默认为teddysun.com）

客户端下载：
Windows / OS X
Linux
Android / iOS
OpenWRT

使用方法：
使用root用户登录，运行以下命令：

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh chmod +x shadowsocksR.sh ./shadowsocksR.sh 2&gt;&amp;1 | tee shadowsocksR.log 
安装完成后，脚本提示如下：


Congratulations, ShadowsocksR install completed!
Server IP:your_server_ip
Server Port:your_server_port
Password:your_password
Local IP:127.0.0.1
Local Port:1080
Protocol:origin
obfs:plain
Encryption Method:aes-256-cfb

Welcome to visit:https://shadowsocks.be/9.html
If you want to change protocol &amp; obfs, reference URL:
https://github.com/breakwa11/shadowsocks-rss/wiki/Server-Setup
Enjoy it!



卸载方法：
使用 root 用户登录，运行以下命令：

./shadowsocksR.sh uninstall 
安装完成后即已后台启动 ShadowsocksR ，运行：

/etc/init.d/shadowsocks status 
可以查看 ShadowsocksR 进程是否已经启动。
本脚本安装完成后，已将 ShadowsocksR 自动加入开机自启动。

使用命令：
启动：/etc/init.d/shadowsocks start
停止：/etc/init.d/shadowsocks stop
重启：/etc/init.d/shadowsocks restart
状态：/etc/init.d/shadowsocks status

配置文件路径：/etc/shadowsocks.json
日志文件路径：/var/log/shadowsocks.log
代码安装目录：/usr/local/shadowsocks

多用户配置 sample：

{ &quot;server&quot;:&quot;0.0.0.0&quot;, &quot;server_ipv6&quot;: &quot;[::]&quot;, &quot;local_address&quot;:&quot;127.0.0.1&quot;, &quot;local_port&quot;:1080, &quot;port_password&quot;:{     &quot;8989&quot;:&quot;password1&quot;,     &quot;8990&quot;:&quot;password2&quot;，     &quot;8991&quot;:&quot;password3&quot; }, &quot;timeout&quot;:300, &quot;method&quot;:&quot;aes-256-cfb&quot;, &quot;protocol&quot;: &quot;origin&quot;, &quot;protocol_param&quot;: &quot;&quot;, &quot;obfs&quot;: &quot;plain&quot;, &quot;obfs_param&quot;: &quot;&quot;, &quot;redirect&quot;: &quot;&quot;, &quot;dns_ipv6&quot;: false, &quot;fast_open&quot;: false, &quot;workers&quot;: 1 } 
如果你想修改配置文件，请参考：
https://github.com/breakwa11/shadowsocks-rss/wiki/Server-Setup

更新日志：
2016 年 08 月 13 日：
1、新增多用户配置 sample。注意：如果你新增了端口，也要将该端口从防火墙（iptables 或 firewalld）中打开。

2016 年 05 月 12 日：
1、新增在 CentOS 下的防火墙规则设置。

参考链接：
https://github.com/breakwa11/shadowsocks-rss

 

感谢《Shadowsocks-R 一键安装脚本》的原作者&mdash;&mdash; teddysun，感谢他带给大家的便利，让我们能更加轻松的看到外面的世界。脚本系统支持：CentOS，Debian，Ubuntu ；内存要求：&ge;128M。

修改内容如下：

    默认加密方式：rc4-md5

    默认协议为：auth_sha1_compatible

    默认混淆为：http_post_compatible（兼容http_simple,客户端可以直接用http_simple）

    使用git的方式安装，以方便以后使用git来升级

    增加了修改时区的操作。把时区设置成了北京-上海时间。


以上修改的内容均以本人的使用习惯而修改，当然也欢迎大家修改为你自己喜欢的方式。

安装方法：
wget -N --no-check-certificate https://raw.githubusercontent.com/hugoyuice/shadowsocks_all/master/shadowsocksR.sh &amp;&amp; bash shadowsocksR.sh

注意：此脚本默认自启用。

常见问题：
若出现CC混淆插件安装失败情况发生，多半因为服务器时间未能同步当前时间造成的。

建议在安装SSR脚本前执行下列操作：

rm -rf /etc/localtime

ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

yum install -y ntpdate

service ntpdate start

ntpdate time.windows.com

卸载方法：
./shadowsocksR.sh uninstall

用过shadowsocks-go版本的朋友不难发现，Shadowsocks-R卸载方法是相同的。

升级方法：
cd /usr/local/shadowsocks/shadowsocks

git pull

维护命令：
启动：/etc/init.d/shadowsocks start

停止：/etc/init.d/shadowsocks stop

重启：/etc/init.d/shadowsocks restart

状态：/etc/init.d/shadowsocks status

配置文件路径：/etc/shadowsocks.json

日志文件路径：/var/log/shadowsocks.log

安装路径：/usr/local/shadowsocks/shadowsoks

 
</p><p>
<a href="index.php?action=login&amp;hash=">立即登陆发表评论</a><br />
</p>
<p><a href="index.php?action=list&amp;hash=">返回日志列表</a><br /><a href="index.php?action=index&amp;hash=">返回主页</a></p>
</card>
</wml>
