Sign inSign up

cnbbx/v2ray

By cnbbx

•Updated over 6 years ago

Image
0

838

cnbbx/v2ray repository overview

⁠服务的配置:

docker run --restart=always --name cnbbx_v2ray -p 4433:443 -d cnbbx/v2ray
docker cp v2ray.crt cnbbx_v2ray:/etc/v2ray/v2ray.crt
docker cp v2ray.key cnbbx_v2ray:/etc/v2ray/v2ray.key
docker restart cnbbx_v2ray

*** config.json ***

{
  "inbounds": [
    {
      "port": 443, // 建议使用 443 端口
      "protocol": "vmess",    
      "settings": {
        "clients": [
          {
            "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",  
            "alterId": 64
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls", // security 要设置为 tls 才会启用 TLS
        "tlsSettings": {
          "certificates": [
            {
              "certificateFile": "/etc/v2ray/v2ray.crt", // 证书文件
              "keyFile": "/etc/v2ray/v2ray.key" // 密钥文件
            }
          ]
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}
⁠客户端配置:

docker run --restart=always --name cnbbx_client_v2ray -p 1080:1080 -d cnbbx/v2ray
docker cp client_config.json cnbbx_client_v2ray:/etc/v2ray/config.json
docker restart cnbbx_client_v2ray

*** client_config.json ***

{
  "inbounds": [
    {
      "port": 1080,
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": ["http", "tls"]
      },
      "settings": {
        "auth": "noauth"
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "mydomain.me", // tls 需要域名,所以这里应该填自己的域名
            "port": 443,
            "users": [
              {
                "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
                "alterId": 64
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls" // 客户端的 security 也要设置为 tls
      }
    }
  ]
}

Tag summary

Content type

Image

Digest

Size

24.9 MB

Last updated

over 6 years ago

docker pull cnbbx/v2ray