Skip to content

Commit

Permalink
add dns type
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 27, 2023
1 parent 9b93dbe commit d7f5a50
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
20 changes: 11 additions & 9 deletions docs/config/dns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ prefer-h3: true

## listen

dns 服务监听
DNS 服务监听

```yaml
listen: 0.0.0.0:1053
Expand All @@ -88,7 +88,7 @@ ipv6: true

可选值 `fake-ip / redir-host`

Clash 的 dns 处理模式
Clash 的 DNS 处理模式

```yaml
enhanced-mode: fake-ip
Expand All @@ -98,7 +98,7 @@ enhanced-mode: fake-ip

格式为 `ip/掩码`

fakeip 下的 IP 段设置,tun 网卡的默认 ip 也使用此值
fakeip 下的 IP 段设置,tun 网卡的默认 IP 也使用此值

```yaml
fake-ip-range: 198.18.0.1/16
Expand All @@ -110,7 +110,8 @@ fakeip 过滤,以下地址不会下发 fakeip 映射用于连接

```yaml
fake-ip-filter:
- '*.lan'
- '+.lan'
- '+.local'
- localhost.ptlogin2.qq.com
```

Expand All @@ -126,9 +127,9 @@ use-hosts: true

## default-nameserver

默认 dns, 用于解析 DNS 服务器 的域名
默认 DNS, 用于解析 DNS 服务器 的域名

必须为 ip, 可为加密 dns
必须为 IP, 可为加密 DNS

```yaml
default-nameserver:
Expand All @@ -138,6 +139,8 @@ default-nameserver:
- https://223.5.5.5/dns-query
```



## nameserver-policy

指定域名查询的解析服务器,可使用 geosite, 优先于 `nameserver/fallback 查询`
Expand All @@ -163,7 +166,6 @@ nameserver-policy:
nameserver:
- tls://dot.pub
- https://dns.alidns.com/dns-query
# - system:// # 如果想附加系统DNS,可以使用名为`system://`的项
```

## proxy-server-nameserver
Expand Down Expand Up @@ -237,11 +239,11 @@ fallback-filter:

## 部分特殊写法

此部分可用于所有的 dns 服务器
此部分可用于所有的 DNS 服务器

### DNS 经过代理查询

书写格式为 dns 服务器后 `#策略组或节点`
书写格式为 DNS 服务器后 `#策略组或节点`

书写规范应带引号,以防出现特殊字符,如需过代理查询,应配置 `proxy-server-nameserver`, 以防出现鸡蛋问题

Expand Down
48 changes: 48 additions & 0 deletions docs/config/dns/type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
description: Clash 的 DNS 支持类型
---

# DNS 支持类型

## UDP

```yaml
- 114.114.114.114
```
## DNS over TLS
```yaml
- tls://1.1.1.1
```
## DNS over HTTPS
```yaml
- https://doh.pub/dns-query
```
## DNS over HTTP/3
```yaml
- https://dns.alidns.com/dns-query#h3=true
```
## DNS over QUIC
```yaml
- quic://dns.adguard.com:784
```
## system
```yaml
- system://
- system
```
## dhcp
```yaml
- dhcp://en0 # dns from dhcp
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ nav:
- 全局配置: config/general.md
- DNS配置:
- config/dns/index.md
- DNS类型: config/dns/type.md
- hosts: config/dns/hosts.md
- 解析流程: config/dns/diagram.md
- 域名嗅探:
Expand Down

0 comments on commit d7f5a50

Please sign in to comment.