# 节点配置

## 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
```
