centos 中v2r客户端配置实例


1.安装

curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v3ray/master/install-release.sh   # 下载install-release.sh
bash install-release.sh  # 脚本安装

2.修改配置文件

vim /usr/local/etc/v3ray/config.json

{
  "log": {
    "error": "",
    "loglevel": "info",
    "access": ""
  },
  "inbounds": [
    {
      "listen": "0.0.0.0",
      "protocol": "socks",
      "settings": {
        "udp": false,
        "auth": "noauth"
      },
      "port": 1080
    },
    {
      "listen": "0.0.0.0",
      "protocol": "http",
      "settings": {
        "timeout": 360
      },
      "port": 1081
    }
  ],
  "outbounds": [
    {
      "mux": {
        "enabled": false,
        "concurrency": 8
      },
      "protocol": "vmess",
      "streamSettings": {
        "wsSettings": {
          "path": "/live",
          "headers": {
            "host": ""
          }
        },
        "tlsSettings": {
          "allowInsecure": true
        },
        "security": "tls",
        "network": "ws"
      },
      "tag": "proxy",
      "settings": {
        "vnext": [
          {
            "address": "cf2us.mzke5.buzz",
            "users": [
              {
                "id": "79758a33-5ad2-4058-8f55-a5a707f13e",
                "alterId": 2,
                "level": 0,
                "security": "aes-128-gcm"
              }
            ],
            "port": 443
          }
        ]
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIP",
        "redirect": "",
        "userLevel": 0
      }
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "none"
        }
      }
    }
  ],
  "dns": {},
  "routing": {
    "settings": {
      "domainStrategy": "AsIs",
      "rules": []
    }
  },
  "transport": {}
}

3.启动

cd /usr/local/etc/v3ray/config.json  # 配置文件
systemctl disable v3ray.service --now   # 停止
systemctl start v3ray  # 启动
systemctl stop v3ray  # 停止
systemctl restart v3ray  # 重启
systemctl enable v3ray  # 开启启动
systemctl status v3ray  # 查看状态
netstat -apn | grep v3ray
tcp        0      0 127.0.0.1:10808         0.0.0.0:*               LISTEN      11827/v3ray         
udp        0      0 127.0.0.1:10808         0.0.0.0:*                           11827/v3ray         
unix  3      [ ]         STREAM     CONNECTED     194290074 11827/v3ray      

4.配置文件获取

 

 

 

 

 

 

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM