Loading... ## 某云服 ### 1、手动安装v2 #### 1⃣️一键安装v2脚本 ```shell 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.json` ```shell vi /usr/local/etc/v2ray/config.json ``` 修改为以下内容 ```shell { "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⃣️启动脚本 ```shell systemctl start v2ray ``` #### 4⃣️相关报错修复 > 原因为客户端和服务端时间差距太大,导致连接报错 > VMess MD5 认证信息 污染机制,VMess 的淘汰机制在搞鬼。 报错信息如下: ```shell 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. ``` 查看路径 ```shell systemctl cat v2ray ``` 打开需要修改的文件 ```shell vi /etc/systemd/system/v2ray.service ``` 鼠标光标移动到 [service] 区域中,在ExecStart=...上面,插入一行后保存退出 ```shell Environment="V2RAY_VMESS_AEAD_FORCED=false" ``` 更新重启 ```shell systemctl daemon-reload systemctl restart v2ray ``` #### 5⃣️注脚 留作备份 ```shell 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 v2ray ``` #### 6⃣️开启ipv4转发 修改`/etc/sysctl.conf`,添加以下内容 ```shell net.ipv4.ip_forward = 1 ``` 重载 ```shell sysctl -p ``` #### 7⃣️设置东京时间 ```shell cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime ``` ### 2、一键脚本安装v2 依次执行以下脚本 ```shell wget https://git.io/v2ray.sh chmod +x v2ray.sh ./v2ray.sh ``` 接着按照提示进行操作,等待安装完成后输入执行`v2ray`即可 最后修改:2023 年 05 月 09 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏
3 条评论
你的才华让人瞩目,期待你的更多文章。 http://www.55baobei.com/VkK95UHdeN.html
你的才华横溢,让人敬佩。http://www.qzershouche.com
陈汶魔:文章真不错http://wap.jst-gpmx.cn/news/26512.html