|
本帖最后由 host_sky 于 2020-5-12 09:40 编辑
https://console.heyterm.com/ 终端连接IPV6机
https://dash.cloudflare.com/ 解析IPV6加速
https://whatismyipaddress.com/查IP
https://intmainreturn0.com/v2ray-config-gen/ V2ray配置在线生成
https://www.1rmb.net/t/31.html 参考这个教程!~
先CF添加AAAA解析IPV6
连接IPV6机 然后如下命令 (debian9)
apt-get update
rm -rf /etc/localtime #时间校准
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
修改dns
echo -e "nameserver 2001:67c:2b0::4
\nnameserver 2001:67c:2b0::6" > /etc/resolv.conf
安装好 curl、wget
yum -y install wget ##ContOS Yum安装wget
apt-get install wget ##Debian Ubuntu安装 wget
apt-get update -y && apt-get install curl -y ##Ubuntu/Debian 系统安装 Curl 方法
yum update -y && yum install curl -y ##Centos 系统安装 Curl 方法
安装宝塔,修改宝塔面板端口(设置成CF开放的端口)
curl -sSO http://download.bt.cn/install/new_install.sh && bash new_install.sh
面板监听IPv6
echo "True" > /www/server/panel/data/ipv6.pl
登陆宝塔(比如baidu.com:8080/宝塔生成的目录名)
CF绑定IPV6的域名+端口+目录名
安装Nginx+PHP7.0(太慢了,一共4个小时)
宝塔新建一个网站 域名就写CF的那个域名
在网站目录新建个文件夹 名称要和配置文件的红色部分对应
配置文件--63行回车2行从65行开始粘贴下面的代码
--------------------------------------------------------------------------------------------------------------------------
location /v2 { #网站目录下新建一个V2文件夹 也可以改成自己的
proxy_redirect off;
proxy_pass http://127.0.0.1:61668;#WebSocket监听的端口
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
}
--------------------------------------------------------------------------------------------------------------------------
安装V2RAY
bash <(curl -L -s https://install.direct/go.sh)
宝塔文件编辑打开etc\v2ray目录下的config.json #vi /etc/v2ray/config.json
--------------------------------------------------------------------------------------------------------------------------
{
"inbounds": [
{
"port": 61668, //你可以自己定义,也可以用自动生成的。特别注意:这个端口一定要在宝塔面板-安全中放行
"listen":"127.0.0.1",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "生成个uuid", //命令行cat /proc/sys/kernel/random/uuid #生成uuid
"level": 1,
"alterId": 64 //这里也要用安装生成的alterId
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/v2" //这里是你自己定义的,要在你的网站根目录下建立这个文件夹
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
--------------------------------------------------------------------------------------------------------------------------
宝塔后台安全页面一定要添加V2放行的端口
systemctl start v2ray # 启动
systemctl enable v2ray # 设置开机自启
systemctl restart v2ray # 重启
systemctl status v2ray # 状态
网站根目录可以放个探针 所有设置完或者更改完一定要重启VPS
太卡了 大佬们为什么都是2W-5W
大佬们,为什么我安装V2-UI的时候总是出各种连不上的问题?
|
|