# 修改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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.1stream.icu/new/xray-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
