# Various VLESS server configurations

# Basic VLESS server
- address: "0.0.0.0:16823"
  protocol:
    type: vless
    user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"

# VLESS over WebSocket
- address: "0.0.0.0:443"
  protocol:
    type: tls
    sni_targets:
      "vless.example.com":
        cert: "cert.pem"
        key: "key.pem"
        protocol:
          type: websocket
          targets:
            - matching_path: "/vless"
              protocol:
                type: vless
                user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"

# VLESS over QUIC
- address: "0.0.0.0:4443"
  transport: quic
  quic_settings:
    cert: "cert.pem"
    key: "key.pem"
    alpn_protocols: ["h3"]
  protocol:
    type: vless
    user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"

# VLESS with custom rules and upstream proxy
- address: "0.0.0.0:16824"
  protocol:
    type: vless
    user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"
  rules:
    # Direct connection for local addresses
    - masks: ["192.168.0.0/16"]
      action: allow
      # client_chain: direct is optional - direct is the default when omitted
      client_chain: direct
    # Route international traffic through proxy
    - masks: "0.0.0.0/0"
      action: allow
      client_chain:
        address: "proxy.example.com:1080"
        protocol:
          type: socks

# VLESS over Reality (censorship resistance)
- address: "0.0.0.0:8443"
  protocol:
    type: tls
    reality_targets:
      "www.cloudflare.com":
        private_key: "YOUR_PRIVATE_KEY_HERE"
        short_ids: ["0123456789abcdef", ""]
        dest: "www.cloudflare.com:443"
        protocol:
          type: vless
          user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"
          udp_enabled: true

# VLESS over Reality with Vision (censorship + performance)
- address: "0.0.0.0:9443"
  protocol:
    type: tls
    reality_targets:
      "www.google.com":
        private_key: "YOUR_PRIVATE_KEY_HERE"
        short_ids: ["0123456789abcdef"]
        dest: "www.google.com:443"
        vision: true  # Enable Vision
        protocol:
          type: vless  # Vision requires VLESS
          user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"
          udp_enabled: true

# VLESS over TLS with Vision (no Reality)
- address: "0.0.0.0:10443"
  protocol:
    type: tls
    tls_targets:
      "vless.example.com":
        cert: "cert.pem"
        key: "key.pem"
        vision: true  # Enable Vision
        alpn_protocols: ["http/1.1"]
        protocol:
          type: vless
          user_id: "b85798ef-e9dc-46a4-9a87-8da4499d36d0"
          udp_enabled: true
