安装shadowsocks的v2ray插件
服务端部署 部署环境:CentOS 7.6 x64 安装Shadowsocks-libev 这个之前博文说过,就不重复了。 安装v2ray-plugin 我懒得编译,直接下载已经编译好的了,解压到/usr/local/bin/下。 获取SSL证书 我使用的是Let’s Encrypt的免费证书(这里建议使用CloudFlare的免费证书),执行命令之前记得先将域名的A记录解析到服务器IP上,并且开放80和443端口。 wget https://dl.eff.org/certbot-auto chmod a+x certbot-auto ./certbot-auto certonly 成功之后会有/etc/letsencrypt/live/域名/fullchain.pem和/etc/letsencrypt/live/域名/privkey.pem两个文件。 修改配置文件 默认配置文件在/etc/shadowsocks-libev/config.json,如下文所示,在最后加上plugin和plugin_opts,把域名换成自己的就行。这里采用的是Shadowsocks over websocket (HTTPS),其它的可以自己参考GitHub上的介绍。 { "server":"0.0.0.0", "server_port":443, "local_port":1080, "password":"password", "timeout":300, "method":"aes-256-gcm", "plugin":"v2ray-plugin", "plugin_opts":"server;tls;cert=/etc/letsencrypt/live/域名/fullchain.pem;key=/etc/letsencrypt/live/域名/privkey.pem;host=域名;loglevel=none" } 最后执行ss-server -c /etc/shadowsocks-libev/config.json -f /run/shadowsocks.pid即可。 客户端设置 先安装对应平台的Shadowsocks客户端。 Windows 直接下载已经编译好的v2ray-plugin的windows版,解压后命名为v2ray-plugin.exe和Shadowsocks.exe放在同一文件夹下。 在Shadowsocks的服务器设置中,插件程序填v2ray-plugin,插件选项填tls;host=域名。域名要和服务端设置的一致。 Android 安装v2ray-plugin-android,打开Shadowsocks编辑服务器,在最下面的插件中选择v2ray,配置Transport mode为websocket-tls,Hostname为服务端设置的域名即可。 Ubuntu 直接下载已经编译好的v2ray-plugin,解压到/usr/local/bin/下。 编辑配置文件/etc/shadowsocks-libev/config.json,如下文所示,在最后加上plugin和plugin_opts,域名要和服务端设置的一致。 { "server":"域名", "server_port":443, "local_port":1080, "password":"password", "timeout":300, "method":"aes-256-gcm", "plugin":"v2ray-plugin", "plugin_opts":"tls;host=域名;loglevel=none" } 最后执行ss-local -c /etc/shadowsocks-libev/config.json即可。 优势 你甚至可以把SS服务器放在CDN后面,免费的CDN有Cloudflare。 然后,最重要的,让你的服务器屏蔽所有除了CloudFlare和你自己的IP之外的所有IP。 基本上很长一段时间内,G#F#W就拿你没办法了。 原文: https://blog.m3chd09.com/2019/02/01/v2ray-plugin-for-shadowsocks.html