不一定有用

image-1765877348040

docker compose配置

services:
  v2ray_server:
    image: v2fly/v2fly-core
    container_name: v2ray_mianliu
    restart: always
    command: run -c /etc/v2ray/config.json
    ports:
      # 宿主机端口:容器端口
      - 9527:9527
    volumes:
      - ./config.json:/etc/v2ray/config.json
      - ./logs:/var/log/v2ray
    environment:
      - TZ=Asia/Shanghai

config.json

{
  "log": {
    "loglevel": "warning"
  },
  "inbound": {
    "protocol": "VMess",
    "port": 9527,
    "settings": {
      "clients": [
        {
          "id": "搞一个uuid",
          "alterId": 0,
          "security": "chacha20-poly1305"
        }
      ]
    },
    "streamSettings": {
      "network": "tcp",
      "httpSettings": {
        "path": "/"
      },
      "tcpSettings": {
        "header": {
          "type": "http",
          "response": {
            "version": "1.1",
            "status": "200",
            "reason": "OK",
            "headers": {
              "Content-Type": [
                "application/octet-stream",
                "application/x-msdownload",
                "text/html",
                "application/x-shockwave-flash"
              ],
              "Transfer-Encoding": [
                "chunked"
              ],
              "Connection": [
                "keep-alive"
              ],
              "Pragma": "no-cache"
            }
          }
        }
      }
    }
  },
  "inboundDetour": [],
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  }
}

客户端

去这里找
https://github.com/2dust/v2rayNG
路由设置里导入预定义规则集为全局
服务器地址填自己的域名,端口,传输协议TCP
伪装类型http
http host
可以是:wap.hb.189.cn,mgc.hb.189.cn:10001,www.zgdxhbkf.com,hb.10000shequ.com

另外可以找找 https://blog.csdn.net/huangniu88/article/details/136441526