Youtube视频


配置参考

{
  "log": {
    "level": "info",
    "disabled": false,
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "address": "https://223.5.5.5/dns-query",
        "detour": "➡️直连",
        "tag": "alidns",
        "strategy": "prefer_ipv4"
      },
      {
        "address": "https://1.1.1.1/dns-query",
        "detour": "🌐代理",
        "tag": "cloudflare",
        "strategy": "prefer_ipv4"
      },
      {
        "address": "rcode://success",
        "tag": "block"
      }
    ],
    "rules": [
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "outbound": ["any"]
          },
          {
            "clash_mode": "Direct"
          },
          {
            "rule_set": ["geosite-cn", "geosite-private"]
          },
          {
            "domain_suffix": [".cn"]
          }
        ],
        "server": "alidns"
      },
      {
        "server": "cloudflare",
        "clash_mode": "Global"
      },
      {
        "server": "block",
        "rule_set": ["geosite-category-ads-all"]
      }
    ],
    "disable_cache": false,
    "disable_expire": false,
    "final": "cloudflare",
    "strategy": "prefer_ipv4"
  },
  "route": {
    "final": "🌐代理",
    "auto_detect_interface": true,
    "rule_set": [
      {
        "format": "binary",
        "tag": "geoip-cn",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-cn",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-private",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-private.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-category-ads-all",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-disney",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-disney.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-netflix",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-netflix.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-telegram",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-telegram.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-openai",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-openai.srs",
        "download_detour": "🌐代理"
      },
      {
        "format": "binary",
        "tag": "geosite-tiktok",
        "type": "remote",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-tiktok.srs",
        "download_detour": "🌐代理"
      }
    ],
    "rules": [
      {
        "protocol": "dns",
        "outbound": "dns-out"
      },
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "ip_is_private": true
          },
          {
            "domain_keyword": ["baidu"]
          },
          {
            "domain_suffix": ["qq.com"]
          },
          {
            "rule_set": ["geosite-private"]
          },
          {
            "clash_mode": "Direct"
          }
        ],
        "outbound": "➡️直连"
      },
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "domain": ["idev.dev", "www.idev.dev"]
          },
          {
            "rule_set": ["geosite-tiktok"]
          },
          {
            "clash_mode": "Global"
          }
        ],
        "outbound": "🌐代理"
      },
      {
        "domain": ["online.idev.dev"],
        "outbound": "🏎️Auto"
      },
      {
        "outbound": "🤖OpenAI",
        "rule_set": ["geosite-openai"]
      },
      {
        "outbound": "🚁Telegram",
        "rule_set": ["geosite-telegram"]
      },
      {
        "domain_suffix": [".cn"],
        "rule_set": ["geoip-cn", "geosite-cn"],
        "outbound": "🇨🇳国内"
      },
      {
        "outbound": "📺️流媒体",
        "rule_set": ["geosite-disney", "geosite-netflix"]
      },
      {
        "network": ["udp"],
        "outbound": "🏄🏼‍♀️UDP"
      },
      {
        "outbound": "block",
        "rule_set": ["geosite-category-ads-all"]
      }
    ]
  },
  "inbounds": [
    // 选其一
    {
      "type": "mixed",
      "tag": "mixed-in",
      "listen": "::",
      "listen_port": 5353,
      "tcp_fast_open": true,
      "udp_fragment": true,
      "sniff": true,
      "sniff_override_destination": true,
      "set_system_proxy": true
    },
    {
      "strict_route": true,
      "stack": "system",
      "domain_strategy": "",
      "sniff": true,
      "udp_timeout": 300,
      "interface_name": "utun",
      "type": "tun",
      "mtu": 1420,
      "auto_route": true,
      "sniff_timeout": "300ms",
      "inet4_address": "172.19.0.1/30",
      "sniff_override_destination": true,
      "tag": "tun-in"
    }
  ],
  "outbounds": [
    {
      "tag": "➡️直连",
      "type": "direct"
    },
    {
      "tag": "block",
      "type": "block"
    },
    {
      "tag": "dns-out",
      "type": "dns"
    },
    // 以下通过四个节点来演示,请替换对应的节点配置以及 selector和urltest中的outbounds(填代理节点的tag)
    {
      "tag": "美国节点1",
      "type": "vless"
    },
    {
      "tag": "美国节点2",
      "type": "vless"
    },
    {
      "tag": "香港节点",
      "type": "vmess"
    },
    {
      "tag": "日本节点",
      "type": "vmess"
    },
    {
      "default": "香港节点",
      "outbounds": ["香港节点", "日本节点", "美国节点1", "美国节点2", "🏎️Auto"],
      "tag": "🌐代理",
      "type": "selector"
    },
    {
      "default": "➡️直连",
      "outbounds": ["➡️直连", "🌐代理"],
      "tag": "🇨🇳国内",
      "type": "selector"
    },
    {
      "outbounds": ["香港节点", "日本节点", "美国节点1", "美国节点2"],
      "interval": "3m",
      "tag": "🏎️Auto",
      "type": "urltest",
      "interrupt_exist_connections": false,
      "url": "https://www.gstatic.com/generate_204",
      "tolerance": 50
    },
    {
      "outbounds": ["香港节点", "日本节点"],
      "tag": "📺️流媒体",
      "type": "selector"
    },
    {
      "outbounds": ["美国节点1", "美国节点2"],
      "tag": "🤖OpenAI",
      "type": "selector"
    },
    {
      "outbounds": ["香港节点", "日本节点", "美国节点1", "美国节点2", "🏎️Auto"],
      "tag": "🚁Telegram",
      "type": "selector"
    },
    {
      "default": "block",
      "outbounds": ["日本节点", "美国节点1", "block"],
      "tag": "🏄🏼‍♀️UDP",
      "type": "selector"
    }
  ],
  "experimental": {
    "cache_file": {
      "path": "cache.db",
      "cache_id": "cache_id",
      "store_fakeip": true,
      "enabled": true
    },
    "clash_api": {
      // IP改为自己实际的IP,或者回环地址127.0.0.1,如果需要其他设备访问,需要改为实际的IP
      "external_controller": "192.168.1.168:9090",
      "external_ui_download_url": "",
      "secret": "",
      "default_mode": "",
      "external_ui_download_detour": "",
      "external_ui": "ui"
    }
  }
}
如果觉得我的文章对你有用,请随意赞赏