3

shadowsocks, shadowsocks-r服务器架设 - idealclover

 2 years ago
source link: https://idealclover.top/archives/543/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

shadowsocks, shadowsocks-r 服务器架设

2019.03.14 | 零零碎碎 | 4074 浏览 | 6 赞 | 0 条评论


请注意,本文编写于 984 天前,最后修改于 984 天前,其中某些信息可能已经过时。

这本来应该是很早的一篇博客 XD 但是嘤嘤嘤咕咕咕了很久~

为什么自建 shadowsocks

对于傻翠来说,既然反正也要用服务器来搭建自己的网站,不如顺便翻个墙也不错 ww

另外自建服务还有什么其他的好处呢~

首先就是稳定性的提高啦,有一个自己的服务器,怎么折腾也都不怕。就算有一天 shadowsocks 有一天被 ban 了(2019.03.03 更新:一语成谶...)也可以通过其他的手段连接到服务器并通向墙外,总归是有办法的啦 ww 对于傻翠这种需要 24 小时挂在墙外,,没有谷歌活不了的傻孩子来讲就更重要啦 ww

其次就是流量是足够的,由于走的是服务器的流量,所以完全不用担心流量的问题~

注册购买 VPS

首先需要租用国外的服务器,话不多说,推荐两个

Bandwagon 这里 镜像 1 镜像 2

Vultr 这里

值得一提的是,Bandwagon 内置直接进行 shadowsocks 和 shadowsocks-r 的搭建,还是比较方便的。

shadowsocks 和 shadowsocks-r 有什么不同

简单来说,shadowsocks-r 是从 shadowsocks 上衍生出的一个项目。shadowsocks 的本愿是加密,也即与服务器间的加密通信。然而对于天朝来讲在管控严格的时候,可能会对加密过的通信实施无差别的封禁,导致 shadowsocks 失效;而 shadowsocks-r 也应运而生,其在 ss 上增加了混淆的功能,可以将与服务器的通信伪装成正常的 IP 请求,逃避 GFW 的检查。

对于 shadowsocks,其官网在 [这里](),官方仓库在 [这里](),当然,由于政治原因该 repo 在墙内无法看到,需要翻墙查看。

另外一点需要注意的是,对于 ssr 世面上的版本比较混乱,其原版 repo 地址在这里,然而其由于其作者被喝茶已经停止维护。现在我们所说的 ssr 大体是指由 Akkariiin 所维护的 ssrr,repo 在这里

在这里做一个区分是因为自己当时为了捋清他们三个的关系还是做了一点功课的,在此做一下笔记。

shadowsocks/shadowsocksr 搭建

以下内容转自 Shadowsocks 一键安装脚本(四合一)

使用 root 用户登录,运行以下命令:

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh chmod +x shadowsocks-all.sh ./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log
nginx

之后会出现设置

  • 服务器端口:自己设定(如不设定,默认从 9000-19999 之间随机生成) 推荐自己设定
  • 密码:自己设定(如不设定,默认为 teddysun.com) 推荐使用一个强一些的密码
  • 加密方式:自己设定(如不设定,Python 和 libev 版默认为 aes-256-gcm,R 和 Go 版默认为 aes-256-cfb) 由于破解等原因,建议使用 chacha20
  • 协议(protocol):自己设定(如不设定,默认为 origin)(仅限 ShadowsocksR 版) 建议使用 auth_aes128_md5
  • 混淆(obfs):自己设定(如不设定,默认为 plain)(仅限 ShadowsocksR 版) 建议使用 http_simple

安装完成后,脚本提示如下

Congratulations, your_shadowsocks_version install completed! Your Server IP :your_server_ip Your Server Port :your_server_port Your Password :your_password Your Encryption Method:your_encryption_method Your QR Code: (For Shadowsocks Windows, OSX, Android and iOS clients) ss://your_encryption_method:your_password@your_server_ip:your_server_port Your QR Code has been saved as a PNG file path: your_path.png Welcome to visit:https://teddysun.com/486.html Enjoy it!
properties

然后就可以使用 shadowsocks/shadowsocksr 了

Shadowsocks-Python 版:
/etc/init.d/shadowsocks-python start | stop | restart | status

ShadowsocksR 版:
/etc/init.d/shadowsocks-r start | stop | restart | status

Shadowsocks-Go 版:
/etc/init.d/shadowsocks-go start | stop | restart | status

Shadowsocks-libev 版:
/etc/init.d/shadowsocks-libev start | stop | restart | status

本文链接:https://idealclover.top/archives/543/

本作品由 idealclover 采用 知识共享署名 - 非商业性使用 - 相同方式共享 4.0 国际许可协议 进行许可,转载请注明出处。

标签: 博客 , 服务器 , install, shadowsocks, path


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK