跳转至

Selector

结构

{
  "type": "selector",
  "tag": "select",

  "outbounds": [
    "proxy-a",
    "proxy-b",
    "proxy-c"
  ],
  "default": "proxy-c",
  "interrupt_exist_connections": false,
  "prefer_domain": true
}

选择器目前只能通过 Clash API 来控制。

字段

outbounds

必填

用于选择的出站标签列表。

default

默认的出站标签。默认使用第一个出站。

interrupt_exist_connections

当选定的出站发生更改时,中断现有连接。

仅入站连接受此设置影响,内部连接将始终被中断。

prefer_domain

与 dial 字段中的 prefer_domain 选项相同。

在组出站上启用时,IP 目标会被嗅探的域名覆盖,然后将连接传递给选定的子出站。