2019年12月11日星期三

SSRPanel V2Ray 后端对接 /ColetteContreras

#SSRPanel V2Ray 后端对接手把手教程。


v4.21最后一版免费不限用户 下载地址

超简单速成:
233boy脚本 ws-tls - stop v2ray - 替换v2ray核心文件 - 改config.json-运作



#准备好域名,ip指向你的vps
#ssrpanel建立v2ray节点,参考下图(点击放大)
#红框都要自己理解并填好。其余无需改动。
这里节点数字排序用5,ws path用/fun,对应本教程。


#debian vps 安装v2ray;

sudo -i
#装curl sudo
apt update && apt install curl sudo -y

#233boy 一键脚本套娃
bash <(curl -s -L https://git.io/v2ray.sh)

选择4-ws tls
端口34177,
然后输入你的域名,,
分流路径fun,
去广告,和shadowsocks选择N。

伪装域名,随便填一个大型网。


之后安装好,输入v2ray url获得vmess,测试是否连接正常。

正常的话;

#停掉v2ray
service v2ray stop

cd /usr/bin/v2ray/
rm -rf v2ray v2ctl
#把最后一版V2Ray 两个文件覆盖进去
chmod +x v2ray v2ctl


#编辑config.json
nano /etc/v2ray/config.json
按住ctrl+k删除全部。

shift+insert粘贴例程进去;
-------------------------------------------------------------------------------------

{
    "log": {
        "access": "/var/log/v2ray/access.log",
        "error": "/var/log/v2ray/error.log",
        "loglevel": "warning"
    },
    "api": {
        "tag": "api",
        "services": [
            "HandlerService",
            "LoggerService",
            "StatsService"
        ]
    },
    "stats": {
        
    },
    "inboundDetour": [
        {
            "port": 34177,
            "protocol": "vmess",
            "streamSettings": {
                "network": "ws",
                "wsSettings": {
                    
                }
            },
            "tag": "proxy"
        },
        {
            "listen": "127.0.0.1",
            "port": 10085,
            "protocol": "dokodemo-door",
            "settings": {
                "address": "127.0.0.1"
            },
            "tag": "api"
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom"
        }
    ],
    "dns": {
        "server": [
            "1.1.1.1",
            "1.0.0.1",
            "8.8.8.8",
            "8.8.4.4",
            "localhost"
        ]
    },
    "routing": {
        "rules": [
            {
                "type": "field",
                "inboundTag": [
                    "api"
                ],
                "outboundTag": "api"
            },
            {
                "type": "field",
                "ip": [
                    "0.0.0.0/8",
                    "10.0.0.0/8",
                    "100.64.0.0/10",
                    "127.0.0.0/8",
                    "169.254.0.0/16",
                    "172.16.0.0/12",
                    "192.0.0.0/24",
                    "192.0.2.0/24",
                    "192.168.0.0/16",
                    "198.18.0.0/15",
                    "198.51.100.0/24",
                    "203.0.113.0/24",
                    "::1/128",
                    "fc00::/7",
                    "fe80::/10"
                ],
                "outboundTag": "blocked"
            },
            {
                "type": "field",
                "protocol": [
                    "bittorrent"
                ],
                "outboundTag": "blocked"
            }
        ],
        "strategy": "rules"
    },
    "policy": {
        "levels": {
            "0": {
                "statsUserUplink": true,
                "statsUserDownlink": true
            }
        },
        "system": {
            "statsInboundUplink": true,
            "statsInboundDownlink": true
        }
    },
    "ssrpanel": {
        "nodeId": 5,
        "checkRate": 60,
        "user": {
            "inboundTag": "proxy",
            "level": 0,
            "alterId": 64,
            "security": "none"
        },
        "mysql": {
            "host": "你的数据库域名或ip地址",
            "port": 数据库端口号,
            "user": "用户",
            "password": "密码",
            "dbname": "库名"
        }
    },
    "sockopt": {
        "tcpFastOpen": true
    }
}

--------------上面全部红字都要改成你的信息,注意是全部-------------------

ctrl+o保存ctrl+c退出。

#重启v2ray
service v2ray restart

service v2ray status看数据库握手情况



uuid改为ssrpanel用户uuid;
打开网页测试下吧!

------------------------------------------



-------------------------纯TCP对接-------------------------------------------------------
inbounds改成下面。



  "inboundDetour": [
        {
            "port": 34177,
            "protocol": "vmess",
            "streamSettings": {
"network": "tcp"
},
            "sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
            "tag": "proxy"
        },
        {
            "listen": "127.0.0.1",
            "port": 10085,
            "protocol": "dokodemo-door",
            "settings": {
                "address": "127.0.0.1"
            },
            "tag": "api"
        }
    ],
--------------------------------------------
进阶:
TCP+TLS模式的v2后端(理论效能比WS-TLS好)
依旧替换核心文件即可

脚本还可同时搭trojan-go
卸载掉trojan-go,跑trojan后端。



Thanks:
#v2ray ssrpanel后端一键脚本
https://sobaigu.com/ssrpanel-v2ray-go.html

#ssrpanel v2ray 对接 go改版
https://github.com/ColetteContreras/v2ray-ssrpanel-plugin

没有评论:

发表评论

设置debian/ubuntu 2分钟后 定时重启

 #使用以下命令,安装at并安排系统在两分钟后执行重启: apt-get install at -y && echo "shutdown -r now" | sudo at now + 2 minutes