宝塔BT+55+v2Ray插件nginx分流伪装

普度币 2019-11-26 4938

绑定一个域名,可以是二级域名,这个域名不用来建站
因为本人比较懒,站没建得多好,索性不建,如果你也是,那就继续看

宝塔内申请SSL 开启强制 然后ssh里安装脚本,
思路就是安装55再安装v2插件,但是v2插件安装我没试过,懒!不试了,索性用大佬的v2集成包

这里说下,这个脚本不需要安装BT都可以用,为什么我还要宝塔呢?
就该上一集一样,我要宝塔建站+55 理论上caddy和nginx 或者阿帕奇都冲突,你装脚本caddy,你宝塔就不能装环境,所以我的办法是共存!用宝塔的nginx还分流,岂不美哉!(不扯了,继续看教程)

wget -N --no-check-certificate -c -t3 -T60 -O ss-plugins.sh https://git.io/fjlbl
chmod +x ss-plugins.sh
./ss-plugins.sh
先安装v2ray_plugin插件 选http模式 然后配置
/etc/shadowsocks/config.json
=================================
{
"server":"0.0.0.0",
"server_port":端口不是80和443,
"password":"密码",
"timeout":300,
"user":"nobody",
"method":"rc4-md5",   #加密方式你可以写aes或者chacha20
"fast_open":true,
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",    #重点来了,外挂v2插件一枚
"plugin_opts":"server;path=/伪装路径;loglevel=none"
}
================================================
然后在宝塔nginx最后一个}前加入 :
=========================================================
#shadowsocks-v2ray-plugins配置
        location /伪装路径 {
        proxy_redirect off;
        proxy_pass http://127.0.0.1:端口;#和上面55配置文件要相同,这里是监听端口
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        }
        location / {
        sub_filter 伪装域名 你的域名;                 # 镜像站点(不含https://)     你的域名
        sub_filter_once off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Referer https://伪装站点;       # 伪装站点(含https://) 
        proxy_set_header Host 伪装站点;                  # 伪装站点(不含https://) 
        proxy_pass https://伪装站点;                     # 伪装站点(含https://)
        proxy_set_header Accept-Encoding "";
    }
        

=========================================================


正确编辑上述2个文件之后,重启nginx和55,

./ss-plugins.sh restart    #重启55


然后访问你的域名是否已经成功伪装并正常打开


客户端配置:

================================================
以安卓为例,首先安装55(有的请无视)然后v2插件
https://github.com/shadowsocks/v2ray-plugin-android/releases
插件安装后,不用找图片,(没有)
然后就可以编辑你的55客户端了

服务器:你的域名
端口:443
密码:字面意思
加密方式:根据你上面配置的加密方式选
插件:选择V2Ray
加密协议:websocket-tls
hostname:你的域名
path:你的伪装路径
================================================



参考资料:

以上教程全部是自己摸索,咨询脚本作者,获取的帮助
并且发帖分享, 有需要的拿去用,爬内容的自重

https://github.com/loyess/Shell/issues/19
https://github.com/loyess/Shell

最新回复 (0)
    • 普度社会大学
      2
          
返回
######
免责声明:本站内容资源源于网络,如有侵权请发邮件告知我们,我们将会在24小时内处理。