# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Xray(Reality)
spec:
    description: VLESS + TCP + REALITY + Vision (No domain/certificate needed).
    icon: https://raw.githubusercontent.com/2dust/v2rayN/refs/heads/master/v2rayN/v2rayN/Resources/v2rayN.ico
    readme: "# Xray (REALITY) - Point & Click Setup\n\n## \U0001F3AE 4-Step Mouse Operation\n1. **Check Port**: Services → Port Mapping (6443 → random public port)\n2. **Generate Keys**: Console → `xray x25519` → Copy **PrivateKey + PublicKey**\n3. **Edit Config**: Config Editor → `/etc/xray/config.json` → Update **UUID + privateKey** → Save\n4. **Restart**: Click **Restart button**\n\n## \U0001F50C Client Setup\n```\nAddress: [Server IP from Zeabur dashboard]\nPort: [Random public port from port mapping]\nUUID: [Your UUID]\nFlow: xtls-rprx-vision\nNetwork: tcp\nSecurity: reality\nSNI: www.microsoft.com\nFingerprint: chrome\nPublicKey: Z4B5563FJfvHpH9KsfmU7dfBSo4s0hvQ1tSjnNQaYDA\nShortId: 16\n```\n"
    services:
        - name: Xray
          icon: https://raw.githubusercontent.com/2dust/v2rayN/refs/heads/master/v2rayN/v2rayN/Resources/v2rayN.ico
          template: PREBUILT_V2
          spec:
            id: xray
            source:
                image: teddysun/xray:latest
            ports:
                - id: port
                  port: 6443
                  type: TCP
            configs:
                - path: /etc/xray/config.json
                  template: |-
                    {
                      "log": {"loglevel": "warning"},
                      "inbounds": [{
                        "port": 6443,
                        "protocol": "vless",
                        "settings": {
                          "clients": [{"id": "b831381d-6324-4d53-ad4f-8cda48b30811", "flow": "xtls-rprx-vision"}],
                          "decryption": "none"
                        },
                        "streamSettings": {
                          "network": "tcp",
                          "security": "reality",
                          "realitySettings": {
                            "dest": "www.microsoft.com:443",
                            "serverNames": ["www.microsoft.com","microsoft.com"],
                            "privateKey": "MNo20hhQmNsYsQaH8XXJwDTRgDfXmYgvCZr-iUvIklY",
                            "shortIds": ["16"]
                          },
                          "tlsSettings": {
                            "fingerprint": "chrome"
                          }
                        },
                        "sniffing": {"enabled": true, "destOverride": ["http","tls","quic"]}
                      }],
                      "outbounds": [{"protocol": "freedom"}]
                    }
                  permission: null
                  envsubst: null
localization:
    zh-CN:
        description: VLESS + TCP + REALITY + Vision协议（不需要域名/证书）。
        readme: "# Xray (REALITY)\n\n## \U0001F3AE 4 步鼠标操作\n1. **查端口**：服务 → 端口映射（6443 → 随机公网端口）\n2. **生成密钥**：命令 → `xray x25519` → 复制 **PrivateKey + PublicKey**\n3. **编辑配置**：文件编辑器 → `/etc/xray/config.json` → 修改 **UUID + privateKey** → 保存\n4. **重启**：点击**重启按钮**\n\n## \U0001F50C 客户端参数\n```\n地址: [Zeabur 控制台查看服务器IP]\n端口: [随机公网端口]\nUUID: [手动填写]\n流控: xtls-rprx-vision\n网络: tcp\n安全: reality\nSNI: www.microsoft.com\n客户端指纹: chrome\nPublicKey: Z4B5563FJfvHpH9KsfmU7dfBSo4s0hvQ1tSjnNQaYDA\nShortId: 16\n```\n"
    zh-TW:
        description: VLESS + TCP + REALITY + Vision協議（不需要網域/憑證）。
        readme: "# Xray (REALITY)\n\n## \U0001F3AE 4 步滑鼠操作\n1. **查端口**：服務 → 端口映射（6443 → 隨機公網端口）\n2. **生成金鑰**：命令 → `xray x25519` → 複製 **PrivateKey + PublicKey**\n3. **編輯配置**：檔案編輯器 → `/etc/xray/config.json` → 修改 **UUID + privateKey** → 儲存\n4. **重啟**：點擊**重啟按鈕**\n\n## \U0001F50C 客戶端參數\n```\n地址: [Zeabur 控制台查看伺服器IP]\n端口: [隨機公網端口]\nUUID: [手動填寫]\n流控: xtls-rprx-vision\n網路: tcp\n安全: reality\nSNI: www.microsoft.com\n客戶端指紋: chrome\nPublicKey: Z4B5563FJfvHpH9KsfmU7dfBSo4s0hvQ1tSjnNQaYDA\nShortId: 16\n```"
