{
  // 日志配置
  "log": {
    // access：访问日志路径
    // 设为 "none" 表示不记录访问日志
    "access": "none",
 
    // dnsLog：是否记录 DNS 相关日志
    "dnsLog": false,
 
    // error：错误日志路径，留空表示不写入文件
    "error": "",
 
    // loglevel：日志记录级别，可选 "debug"、"info"、"warning"、"error"、"none" 等
    "loglevel": "warning",
 
    // maskAddress：是否对日志中的 IP 地址进行掩码处理。留空表示不启用
    "maskAddress": ""
  },
 
  // 路由配置
  "routing": {
    // domainStrategy：域名匹配策略。常用值有 "AsIs"、"IPOnDemand"、"IPIfNonMatch" 等
    "domainStrategy": "AsIs",
 
    // rules：路由规则列表
    "rules": [
      {
        // type：规则类型，field 表示根据字段来匹配
        // inboundTag：指定哪些入站流量（Tag）使用此规则
        // outboundTag：匹配后流量转到哪个 outbound
        "type": "field",
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api"
      },
      {
        "type": "field",
        "outboundTag": "blocked",
        // ip：匹配指定的 IP 列表，这里使用 geoip:private 表示局域网 IP
        "ip": [
          "geoip:private"
        ]
      },
      {
        "type": "field",
        "outboundTag": "blocked",
        // protocol：匹配的协议，这里为 bittorrent，一般是为了屏蔽 BT 下载
        "protocol": [
          "bittorrent"
        ]
      }
    ]
  },
 
  // DNS 配置（此处为 null 表示未配置）
  "dns": null,
 
  // 入站配置
  "inbounds": [
    {
      // listen：监听地址
      "listen": "127.0.0.1",
      // port：监听端口
      "port": 62789,
      // protocol：入站协议类型，这里是 dokodemo-door
      "protocol": "dokodemo-door",
      "settings": {
        // address：dokodemo-door 对应的目标地址
        "address": "127.0.0.1"
      },
      "streamSettings": null,
      // tag：用于标识此入站的标签
      "tag": "api",
      "sniffing": null,
      "allocate": null
    },
    {
      // listen：默认值为 0.0.0.0 或系统默认监听
      "listen": null,
      "port": 443,
      // protocol：vless
      "protocol": "vless",
      "settings": {
        // clients：配置用户信息
        "clients": [
          {
            "email": "win",
            // flow：仅在 XTLS 等场景使用，这里为空字符串
            "flow": "",
            // id：VLESS 用户的 UUID
            "id": "0d5d6bd0-db88-45b1-8d48-691aa66a22bf"
          }
        ],
        // decryption：VLESS 的加密方式，这里为 "none"
        "decryption": "none",
        // fallbacks：回落配置，一般用于分流或 TLS 透明代理。这里为空
        "fallbacks": []
      },
      // streamSettings：传输层配置
      "streamSettings": {
        // network：此处为 TCP
        "network": "tcp",
        // realitySettings：REALITY (V2Ray/XRay) 的相关配置
        "realitySettings": {
          // dest：伪装流量实际要连接的目标地址
          "dest": "www.lcc1999.abrdns.com:8443",
          // maxClient、minClient 等一般用于限制客户端连接数量，这里留空或为默认
          "maxClient": "",
          "maxTimediff": 0,
          "minClient": "",
          // privateKey：REALITY 的私钥
          "privateKey": "MEKOmz5Bw15qWWJIqg3SqCQ84IDmeejWC_70N487Pls",
          // serverNames：SNI，指定要伪装的域名可改可不改
          "serverNames": [
            "www.lcc1999.abrdns.com"
          ],
          // shortIds：定义一组短 ID，用于 REALITY 的握手阶段课改可不该
          "shortIds": [
            "2f"
          ],
          // show：是否在日志中显示调试信息
          "show": false,
          // xver：REALITY 的版本，通常为 0
          "xver": 0
        },
        // security：使用 REALITY
        "security": "reality",
        "tcpSettings": {
          // acceptProxyProtocol：是否接收 PROXY protocol 的头部
          "acceptProxyProtocol": false,
          "header": {
            // type：可以是 none、http、srtp、utp、wechat-video 等
            "type": "none"
          }
        }
      },
      "tag": "inbound-55044",
      // sniffing：是否开启流量嗅探
      "sniffing": {
        "enabled": false,
        "destOverride": [
          "http",
          "tls",
          "quic",
          "fakedns"
        ],
        "metadataOnly": false,
        "routeOnly": false
      },
      "allocate": {
        // strategy：端口分配策略（多端口）
        "strategy": "always",
        // refresh：刷新间隔（分钟），单位为分钟
        "refresh": 5,
        // concurrency：并发数（同时开放多少个端口）
        "concurrency": 3
      }
    }
  ],
 
  // 出站配置
  "outbounds": [
    {
      // tag：此出站标记为 direct，一般用于直连
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        // domainStrategy：与 routing 中的配置相对应
        "domainStrategy": "AsIs",
        // redirect：可指定将流量转发到某个特定地址和端口，这里为空
        "redirect": "",
        // noises：新版本中可能用于特殊混淆，此处留空
        "noises": []
      }
    },
    {
      // tag：此出站标记为 blocked，用于黑洞流量（丢弃）
      "tag": "blocked",
      "protocol": "blackhole",
      "settings": {}
    }
  ],
 
  // transport：传输配置，这里为 null 表示没有额外配置
  "transport": null,
 
  // policy：策略配置
  "policy": {
    // levels：不同权限等级的策略
    "levels": {
      "0": {
        // statsUserDownlink/statsUserUplink：是否统计下行/上行流量
        "statsUserDownlink": true,
        "statsUserUplink": true
      }
    },
    // system：全局系统策略
    "system": {
      // 是否统计入站/出站的下行/上行流量
      "statsInboundDownlink": true,
      "statsInboundUplink": true,
      "statsOutboundDownlink": false,
      "statsOutboundUplink": false
    }
  },
 
  // api：API 接口配置，可用于动态管理 Xray
  "api": {
    "tag": "api",
    // services：启用哪些 API 服务
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ]
  },
 
  // stats：流量统计配置，这里为空对象，表示默认
  "stats": {},
 
  // reverse：反向代理配置，这里为 null
  "reverse": null,
 
  // fakedns：假 DNS 配置，用于某些特殊场景
  "fakedns": null,
 
  // observatory：此为 Xray 新增的延迟检测功能，这里为 null
  "observatory": null,
 
  // burstObservatory：批量延迟探测配置，这里为 null
  "burstObservatory": null
}