白亮吖雅黑丫の小站 - v2ray
type: channel
link: https://www.520315.xyz/tag/v2ray/
items: 云服务器安装v2

云服务器安装v2
type: item
date: 2023-05-09T12:48:19+08:00
description: 某云服1、手动安装v21⃣️一键安装v2脚本bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)2⃣️编辑config.json文件config.json文件位置/usr/local/etc/v2ray/config.jsonvi /usr/local/etc/v2ray/config.json修改为以下内容{ "log": { "access": "", "error": "", "loglevel": "warning" }, "inbounds": [ { "port": 60502, "protocol": "vmess", "settings": { "udp": false, "clients": [ { "id": "3eb73338-1118-4ba9-8542-9ef6c63045dd", "alterId": 0 } ], "allowTransparent": false }, "streamSettings": { "network": "tcp" } } ], "outbounds": [ { "protocol": "freedom" }, { "tag": "block", "protocol": "blackhole", "settings": {} } ], "routing": { "domainStrategy": "IPIfNonMatch", "rules": [] } }3⃣️启动脚本systemctl start v2ray4⃣️相关报错修复原因为客户端和服务端时间差距太大，导致连接报错VMess MD5 认证信息 污染机制，VMess 的淘汰机制在搞鬼。报错信息如下：rejected common/drain: common/drain: drained connection > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v?ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.查看路径systemctl cat v2ray打开需要修改的文件vi /etc/systemd/system/v2ray.service鼠标光标移动到 [service] 区域中，在ExecStart=...上面，插入一行后保存退出Environment="V2RAY_VMESS_AEAD_FORCED=false"更新重启systemctl daemon-reload systemctl restart v2ray5⃣️注脚留作备份installed: /usr/local/bin/varay installed: /usr/local/share/v2ray/geoip.dat installed: /usr/local/share/v2ray/geosite.dat installed: /usr/local/etc/v2ray/config.json installed: /var/log/v2ray/ installed: /var/log/v2ray/access.log installed: /var/log/v2ray/error.log installed: /etc/systemd/system/v2ray.service installed: /etc/systemd/system/v2ray@.service removed: /tmp/tmp.YMYuJztdgv info: V2Ray v5.3.0 is installed. you may need to execute a command to remove dependent software: yum remove curl unzip please execute the command: systemctl enable v2ray; systemctl start v2ray6⃣️开启ipv4转发修改/etc/sysctl.conf，添加以下内容net.ipv4.ip_forward = 1重载sysctl -p7⃣️设置东京…