# Hosts编辑

{% hint style="info" %}

* 本功能使用Clash核心内置的功能实现Hosts，具体请参看 [**Clash Wiki**](https://lancellc.gitbook.io/clash/clash-config-file/dns/host)；
* <mark style="color:orange;">修改Hosts有风险</mark>，不懂勿动；
* 本功能提交修改后，<mark style="color:orange;">重启MC插件生效</mark>。
  {% endhint %}

![](/files/C5SJ633WLNRFCwh204xI)

* <mark style="color:blue;">**配置示例**</mark>

格式：(空两格)<mark style="color:orange;">'域名':</mark>(空格)<mark style="color:orange;">IP</mark>

```yaml
hosts:
  '*.clash.dev': 127.0.0.1 
  '*.foo.*.example.com': 123.123.123.123
  'alpha.clash.dev': ::1
```

{% hint style="info" %}
**静态**域名<mark style="color:orange;">优先级高于</mark>**通配符**域名
{% endhint %}

* <mark style="color:blue;">**MC初始化Hosts文件**</mark>（<mark style="color:orange;">勿删</mark>）

```yaml
hosts:
#开启MC后，可使用域名登陆路由器后台
  router.asus.com: 192.168.50.1
  #google中国重新定向
  services.googleapis.cn: 74.125.193.94
  #win网络状态检查
  ipv6.msftconnecttest.com: 2a01:111:2003::52
  www.msftconnecttest.com: 13.107.4.52

```

{% hint style="warning" %}
若未找到本页介绍的功能模块，请先到【<mark style="color:blue;">附加功能</mark>】里打开该模块显示，请参看 [**FAQ13**](/mc/mcold/faq/faq1.md#q13) **。**
{% endhint %}


---

# 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://mcreadme.gitbook.io/mc/mcold/advanced/hosts.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.
