> For the complete documentation index, see [llms.txt](https://docs.1stream.icu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1stream.icu/new/xray-config.md).

# 修改Xray配置

{% embed url="<https://t.me/streamunblock1>" %}

{% hint style="success" %} <mark style="color:green;">**推荐使用DoQ接入**</mark>
{% endhint %}

### 修改配置文件

#### 1.开启流量识别

{% code title="config.json" overflow="wrap" lineNumbers="true" %}

```json
  "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      }
```

{% endcode %}

#### 2.修改出口流量域名分类方式

{% code title="config.json" overflow="wrap" lineNumbers="true" %}

```
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {
        "domainStrategy":"UseIP"
      }
    }
  ]
```

{% endcode %}

#### 3.添加DNS分流&#x20;

*<mark style="color:red;">**修改后请将注释行删除**</mark>*

{% code title="config.json" overflow="wrap" lineNumbers="true" %}

```json
   "dns": {
    "servers": [
      "1.1.1.1","8.8.8.8", 
      {
        "address": "quic+local://xxx.core.access.xxxxx.fun:853", 
        "port": 53,
        //如需多个流媒体或域名请按照每个字符串+"," 分隔 如 "geosite:netflix","geosite:disney","domain:dddd.com" 修改后请将此行删除
        "domains": [
           "geosite:netflix"
        ]
      }
    ]
  }
```

{% endcode %}
