# Clash Trojan Configuration Template
# Copy and modify for your use case

proxies:
  - name: "Trojan-Server"
    type: trojan
    server: 23.94.194.34
    port: 443
    password: F2vhwxP1Vvtc4r+NeIsHFx/s+B7sMGcj/o8OQteFJkY=
    udp: true
    sni: 23.94.194.34
    skip-cert-verify: true  # Required for self-signed certificates

# If you have multiple servers, add them here
#  - name: "Trojan-Server-2"
#    type: trojan
#    server: another-server-ip
#    port: 443
#    password: another-password
#    sni: another-domain.com
#    skip-cert-verify: true

proxy-groups:
  - name: "Proxy"
    type: select
    proxies:
      - Trojan-Server
      # Add other proxies here if available

  - name: "Auto-Select"
    type: url-test
    proxies:
      - Trojan-Server
    url: http://www.gstatic.com/generate_204
    interval: 300

rules:
  # Local network bypass
  - IP-CIDR,192.168.0.0/16,DIRECT
  - IP-CIDR,10.0.0.0/8,DIRECT
  - IP-CIDR,172.16.0.0/12,DIRECT
  - IP-CIDR,127.0.0.0/8,DIRECT

  # Use proxy for everything else
  - MATCH,Proxy

# For Let's Encrypt certificates (recommended for production), remove skip-cert-verify:
#  - name: "Trojan-Server-Production"
#    type: trojan
#    server: yourdomain.com  # Use domain instead of IP
#    port: 443
#    password: YOUR_PASSWORD
#    sni: yourdomain.com
#    # skip-cert-verify: true  # ← Remove this line for real certs
#    udp: true
