mixed-port: 7890
allow-lan: true
mode: rule
log-level: info

dns:
  enable: true
  listen: 0.0.0.0:7874
  ipv6: false

  nameserver:
    - 223.5.5.5
    - 119.29.29.29
    - 1.1.1.1

  fallback:
    - 8.8.8.8
    - 9.9.9.9

  fake-ip-filter:
    - "*.netflix.com"
    - "*.nflxvideo.net"
    - "*.nflximg.net"
    - "*.nflxso.net"
    - "*.nflxext.com"
    - "*.nflxsearch.net"

proxies:
  # 🇯🇵 日本 VLESS 节点
  - name: "🇯🇵 VLESS-jp.zhaoszj.uk"
    type: vless
    server: jp.zhaoszj.uk
    port: 443
    uuid: 18ef4ab7-e037-424c-d296-640937fd2127
    tls: true
    network: ws
    servername: jp.zhaoszj.uk
    ws-opts:
      path: /netflix
      headers:
        Host: jp.zhaoszj.uk
    client-fingerprint: chrome

  # 🇺🇸 美国/CA VLESS 节点
  - name: "🇺🇸 VLESS-ca.zhaoszj.uk"
    type: vless
    server: ca.zhaoszj.uk
    port: 443
    uuid: 18ef4ab7-e037-424c-d296-640937fd2127
    tls: true
    network: ws
    servername: ca.zhaoszj.uk
    ws-opts:
      path: /netflix
      headers:
        Host: ca.zhaoszj.uk
    client-fingerprint: chrome

  # 🇸🇬 新加坡 VLESS 节点
  - name: "🇸🇬 VLESS-sg.zhaoszj.uk"
    type: vless
    server: sg.zhaoszj.uk
    port: 443
    uuid: 18ef4ab7-e037-424c-d296-640937fd2127
    tls: true
    network: ws
    servername: sg.zhaoszj.uk
    ws-opts:
      path: /netflix
      headers:
        Host: sg.zhaoszj.uk
    client-fingerprint: chrome

  # 🎬 日本 VPS 上的 2087（德国出口）
  - name: "🎬 JP_SOCKS_2087"
    type: socks5
    server: jp.zhaoszj.uk
    port: 2087
    username: "admin2087"
    password: "R38jfA7!kz99"
    udp: true

  # 🎬 新加坡 VPS 上的 2087（德国出口）
  - name: "🎬 SG_SOCKS_2087"
    type: socks5
    server: sg.zhaoszj.uk
    port: 2087
    username: "admin2087"
    password: "p2087sg"
    udp: true

proxy-groups:
  # 主代理
  - name: "🚀 主代理"
    type: select
    proxies:
      - "🌏 国外自动"
      - "🇯🇵 VLESS-jp.zhaoszj.uk"
      - "🇺🇸 VLESS-ca.zhaoszj.uk"
      - "🇸🇬 VLESS-sg.zhaoszj.uk"
      - DIRECT

  # 自动测速
  - name: "🌏 国外自动"
    type: url-test
    proxies:
      - "🇯🇵 VLESS-jp.zhaoszj.uk"
      - "🇺🇸 VLESS-ca.zhaoszj.uk"
      - "🇸🇬 VLESS-sg.zhaoszj.uk"
    url: https://www.gstatic.com/generate_204
    interval: 300
    tolerance: 50

  # 🎬 Netflix（优先日本 → 新加坡 → 其他）
  - name: "🎬 NETFLIX"
    type: select
    proxies:
      - "🎬 JP_SOCKS_2087"
      - "🎬 SG_SOCKS_2087"
      - "🇯🇵 VLESS-jp.zhaoszj.uk"
      - "🇸🇬 VLESS-sg.zhaoszj.uk"
      - "🇺🇸 VLESS-ca.zhaoszj.uk"
      - DIRECT

  # 📺 Disney+（同 Netflix 优先顺序）
  - name: "📺 DISNEY+"
    type: select
    proxies:
      - "🎬 JP_SOCKS_2087"
      - "🎬 SG_SOCKS_2087"
      - "🇯🇵 VLESS-jp.zhaoszj.uk"
      - "🇸🇬 VLESS-sg.zhaoszj.uk"
      - "🇺🇸 VLESS-ca.zhaoszj.uk"
      - DIRECT

rules:
  # ⭐ NAS DS37（10.0.0.244）全量直连：所有流量走本地 500M 宽带，不走任何代理
  - SRC-IP-CIDR,10.0.0.244/32,DIRECT,no-resolve

  # 内网目的地址直连（给其它设备访问内网用）
  - IP-CIDR,100.64.0.0/10,DIRECT,no-resolve
  - IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
  - IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
  - IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
  - IP-CIDR,127.0.0.0/8,DIRECT,no-resolve

  # 去 VPS 的连接直连（避免回环经过代理）
  - DST-PORT,2087,DIRECT
  - DOMAIN-SUFFIX,zhaoszj.uk,DIRECT

  # Netflix
  - DOMAIN-SUFFIX,netflix.com,🎬 NETFLIX
  - DOMAIN-SUFFIX,netflix.net,🎬 NETFLIX
  - DOMAIN-SUFFIX,nflximg.com,🎬 NETFLIX
  - DOMAIN-SUFFIX,nflximg.net,🎬 NETFLIX
  - DOMAIN-SUFFIX,nflxso.net,🎬 NETFLIX
  - DOMAIN-SUFFIX,nflxvideo.net,🎬 NETFLIX
  - DOMAIN-SUFFIX,nflxext.com,🎬 NETFLIX
  - DOMAIN-SUFFIX,nflxsearch.net,🎬 NETFLIX

  # Disney+
  - DOMAIN-SUFFIX,disneyplus.com,📺 DISNEY+
  - DOMAIN-SUFFIX,dssott.com,📺 DISNEY+
  - DOMAIN-SUFFIX,bamgrid.com,📺 DISNEY+
  - DOMAIN-KEYWORD,disneyplus,📺 DISNEY+

  # 大陆直连
  - GEOIP,CN,DIRECT

  # 其他走主代理
  - MATCH,🚀 主代理
