diff --git a/docs/config/cname.md b/docs/config/cname.md index 9f3a86d..4a73e46 100644 --- a/docs/config/cname.md +++ b/docs/config/cname.md @@ -9,7 +9,7 @@ hide: ## 配置步骤 -1. 使用`cname /a.com/b.com`配置代理服务器 +1. 使用`cname /a.com/b.com`配置别名。 ```shell cname /a.com/b.com diff --git a/docs/config/domain-address.md b/docs/config/domain-address.md new file mode 100644 index 0000000..2316bce --- /dev/null +++ b/docs/config/domain-address.md @@ -0,0 +1,37 @@ +--- +hide: + - toc +--- + +# 指定域名地址 + +address除了可以设置屏蔽广告外,还可以指定域名的IP地址。 + +## 基本配置方法 + +1. 通过`address /domain/ip`选项指定IP,如。 + + ```shell + address /example.com/1.2.3.4 + ``` + + address选项中: + + * /domain/为后缀匹配算法,范围包含其子域名。 + * ip: 可以为IPV6,或IPV4地址 + +1. 指定IPV6 + + ```shell + address /example.com/::1 + ``` + +## 自动扩展address对应的PTR记录 + +如果想扩展上述address对应的PTR记录,可以使用`expand-ptr-from-address`开关开启自动扩展。`expand-ptr-from-address`参数可以重复设置,参数对设置后的`address`生效。 + +```shell +expand-ptr-from-address yes +address /example.com/1.2.3.4 +expand-ptr-from-address no +``` diff --git a/en/docs/config/dns64.md b/en/docs/config/dns64.md index 302f350..1751539 100644 --- a/en/docs/config/dns64.md +++ b/en/docs/config/dns64.md @@ -9,7 +9,7 @@ DNS64 is used to support accessing IPV4 websites in a pure IPV6 network, smartdn ## Configuration Steps -1. Use `dns64 ip/mask` to configure the proxy server +1. Use `dns64 ip/mask` to configure alias name. ```shell dns64 64:ff9b::/96 diff --git a/en/docs/config/domain-address.md b/en/docs/config/domain-address.md new file mode 100644 index 0000000..37bd518 --- /dev/null +++ b/en/docs/config/domain-address.md @@ -0,0 +1,37 @@ +--- +hide: + - toc +--- + +# Specify Domain Address + +In addition to blocking ads, `address` can also be used to specify the IP address of a domain. + +## Basic Configuration Method + +1. Use the `address /domain/ip` option to specify the IP, such as: + + ```shell + address /example.com/1.2.3.4 + ``` + + In the `address` option: + + * `/domain/` uses suffix matching algorithm, including subdomains. + * `ip`: can be an IPv6 or IPv4 address. + +1. Specify IPv6 + + ```shell + address /example.com/::1 + ``` + +## Automatically Expand PTR Records Corresponding to address + +If you want to expand the PTR record corresponding to the above `address`, you can use the `expand-ptr-from-address` switch to turn on automatic expansion. The `expand-ptr-from-address` parameter can be set repeatedly, and the parameter takes effect for the `address` set after it. + +```shell +expand-ptr-from-address yes +address /example.com/1.2.3.4 +expand-ptr-from-address no +``` diff --git a/en/mkdocs.yml b/en/mkdocs.yml index 4389c66..e653721 100644 --- a/en/mkdocs.yml +++ b/en/mkdocs.yml @@ -89,6 +89,7 @@ nav: - Security Related: 'config/security.md' - Resolve Local Hostname: 'config/resolv-dnsmasq-lease.md' - Bootstrap DNS: 'config/bootstrap-dns.md' + - Domain Address: 'config/domain-address.md' - CNAME Alias Query: 'config/cname.md' - Domain Set: 'config/domain-set.md' - IPSet and NFTSet: 'config/ipset-nftset.md' diff --git a/mkdocs.yml b/mkdocs.yml index 4b2eebe..8f055b5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -89,6 +89,7 @@ nav: - 安全相关: 'config/security.md' - 解析本地主机名: 'config/resolv-dnsmasq-lease.md' - Bootstrap DNS: 'config/bootstrap-dns.md' + - 域名地址: 'config/domain-address.md' - cname别名查询: 'config/cname.md' - 域名集合: 'config/domain-set.md' - IPSet和NFTSet: 'config/ipset-nftset.md'