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