> For the complete documentation index, see [llms.txt](https://doc.cfcloud.life/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.cfcloud.life/usage/node.md).

# 节点配置

## Our Values

{% hint style="info" %}
**注意** 部分香港CMI屏蔽了UDP 53的查询，本服务已经开启了TCP53，直接修改VPS的DNS时请在/etc/resolv.conf文件中第一行添加
{% endhint %}

```
options use-vc
```

***

{% hint style="info" %}
如果您使用DOH，对于Xray系来说，您需要在 `dns.json` 一行配置一个默认DNS，如1.1.1.1，然后在后面写分流规则；否则DOH因为是默认第一个域名，XraryCore会请求DoH，但是由于DoH之前没有获取到IP，所以会向DoH请求DoH的IP，造成 `context exceed timeout`
{% endhint %}

```
{
    "servers": [
     "1.1.1.1",
     {
        "address": "https://您的doh",
        "port": 443,
        "domains": []
     }
     ]
  }
```

### XrayR <a href="#xrayr" id="xrayr"></a>

* **1.首先配置 DNS 文件**

```
vi /etc/XrayR/dns.json
```

全部删除覆盖

```
{
  "servers": [
    "1.1.1.1",
    "8.8.8.8",
    "localhost",
    {
      "address": "4.4.4.4（以实际为准）",
      "port": 53,
      "domains": ["geosite:netflix"]
    }
  ],
  "tag": "dns_inbound"
}
```

* **2.修改 XrayR 配置文件**

第 5 行去掉#号开启

```
  DnsConfigPath:  /etc/XrayR/dns.json
```

第 35 行附近修改参数 (如果机器带V6但是访问谷歌等异常可以将“UseIP”改为“UseIPv4”)

```
 EnableDNS: true
 DNSType: UseIP
```

* **3.重启**

```
XrayR restart
```

* **docker改全局DNS**

启动时指定：

```
docker run --dns 8.8.8.8 busybox:latest
```

修改

```
vi /etc/docker/daemon.json 

{
  "dns" : [
    "填写指定dns"
  ]
}
```

重启

```
systemctl daemon-reload
systemctl restart docker
```

### [#](https://doc.nfdns.top/pages/793dcb/#soga)SoGa <a href="#soga" id="soga"></a>

* **docker**

要素

```
-e default_dns=4.4.4.4 \
-e dns_cache_time=1 \
-e dns_strategy=ipv4_first \
```

示例

```
docker run --restart=on-failure --name soga -d \
-v /etc/soga/:/etc/soga/ --network host \
-e type=sspanel-uim \
-e server_type=ssr \
-e api=webapi \
-e webapi_url=https://api.soga.com \
-e webapi_key=admin \
-e node_id=10 \
-e default_dns=4.4.4.4 \
-e dns_cache_time=1 \
-e dns_strategy=ipv4_first \
-e forbidden_bit_torrent=true \
-e cert_domain=image.baidu.com \
-e cert_mode=http \
-e tunnel_enable=false \
-e tunnel_proxy_protocol=true \
-e proxy_protocol=true \
vaxilu/soga
```

* **脚本安装**

```
/etc/soga/soga.conf 修改 default_dns=4.4.4.4
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.cfcloud.life/usage/node.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
