V2
|
1 2 3 4 5 6 7 8 9 10 11 |
同步时间后安装 rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) BBR加速 uname -r //服务器内核版本号 echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf //安装 echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf sysctl -p //保存生效 lsmod | grep bbr //有tcp_bbr字样就成功了 |
|
1 2 3 4 5 |
v2基本命令 systemctl start v2ray systemctl restart v2ray systemctl enable v2ray 设置开机自启 删除:systemctl stop v2ray systemctl disable v2ray bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --remove |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
编辑/usr/local/etc/v2ray/config.json { "log": { "loglevel": "info", "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log" }, "inbounds": [ { "port": 10000, "listen":"127.0.0.1", "protocol": "vmess", "settings": { "clients": [ { "id": "000fe881-XXXX-4212-b804-b00f9970XXXX", "alterId": 64 } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/fan" } } } ], "outbounds": [ { "protocol": "freedom", "settings": {} } ] } |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
新建网站;申请Let's Encrypt免费SSL证书,修改配置文件,保存后重启Nginx: # 最开头处--定义变量 map $http_upgrade $connection_upgrade { default upgrade; '' close; } # 在一键申请SSL段后面添加--v2配置 location /fan { proxy_pass http://127.0.0.1:10000; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; } |
参考首页:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<html> <head> <meta charset='utf-8'> <title>欢迎访问XXX.xyz</title> </head> <body> <div align="center"> <br /><br /><br /><br /> <p><b>欢迎访问!XXX.xyz</b></p> <p><h1>网站建设中。。。</h1></p> <p>    <a href='http://beian.miit.gov.cn/' target="_new">工信部备案管理系统</a></p> </div> </body> </html> |
