浏览代码

readme: update readme

Nick Peng 2 年之前
父节点
当前提交
4b42e1ef85
共有 2 个文件被更改,包括 123 次插入27 次删除
  1. 75 27
      ReadMe.md
  2. 48 0
      ReadMe_en.md

+ 75 - 27
ReadMe.md

@@ -112,7 +112,7 @@ rtt min/avg/max/mdev = 5.954/6.133/6.313/0.195 ms
    支持域名后缀匹配模式,简化过滤配置,过滤 20 万条记录时间 < 1ms。
 
 6. **域名分流**  
-   支持域名分流,不同类型的域名向不同的 DNS 服务器查询。
+   支持域名分流,不同类型的域名向不同的 DNS 服务器查询,支持iptable和nftable更好的分流
 
 7. **Windows / Linux 多平台支持**  
    支持标准 Linux 系统(树莓派)、OpenWrt 系统各种固件和华硕路由器原生固件。同时还支持 WSL(Windows Subsystem for Linux,适用于 Linux 的 Windows 子系统)。
@@ -186,43 +186,55 @@ entware|ipkg update<br>ipkg install smartdns|软件源路径:https://bin.entwa
 
 1. 安装
    
-   下载配套安装包,并上传到 Linux 系统中。 
-   
-   标准 Linux 系统(X86 / X86_64)请执行如下命令安装:
-   
-   ```shell
-   $ tar zxf smartdns.1.yyyy.MM.dd-REL.x86_64-linux-all.tar.gz
-   $ cd smartdns
-   $ chmod +x ./install
-   $ ./install -i
-   ```
-   
-   树莓派或其他 Debian 系系统(ARM / ARM64)请执行如下命令安装:
-   
-   ```shell
-   # dpkg -i smartdns.1.yyyy.MM.dd-REL.arm-debian-all.deb
-   ```
+    下载配套安装包,并上传到 Linux 系统中。 
+
+    标准 Linux 系统(X86 / X86_64)请执行如下命令安装:
+
+    ```shell
+    $ tar zxf smartdns.1.yyyy.MM.dd-REL.x86_64-linux-all.tar.gz
+    $ cd smartdns
+    $ chmod +x ./install
+    $ ./install -i
+    ```
+
+    树莓派或其他 Debian 系系统(ARM / ARM64)请执行如下命令安装:
+
+    ```shell
+    # dpkg -i smartdns.1.yyyy.MM.dd-REL.arm-debian-all.deb
+    ```
 
 2. 修改配置
    
     安装完成后,可配置 SmartDNS 的上游服务器信息。
-   
+
     一般情况下,只需要增加 `server `[`IP`]`:port` 和 `server-tcp `[`IP`]`:port` 配置项。
-   
+
     请尽可能配置多个上游 DNS 服务器,包括国内外的服务器。
-   
+
     具体配置参数请参考[配置文件说明](#配置文件说明)。  
    
-   ```shell
-   # vi /etc/smartdns/smartdns.conf
-   ```
+    ```shell
+    # vi /etc/smartdns/smartdns.conf
+    ```
+
+    `/etc/smartdns/smartdns.conf`配置包含如下基本内容:
+    ```
+    # 指定监听的端口号
+    bind []:53 
+    # 指定上游服务器
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # 指定域名规则
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
 
 3. 启动服务
    
-   ```shell
-   # systemctl enable smartdns
-   # systemctl start smartdns
-   ```
+    ```shell
+    # systemctl enable smartdns
+    # systemctl start smartdns
+    ```
 
 4. 将 DNS 请求转发到 SmartDNS 解析
    
@@ -390,6 +402,18 @@ entware|ipkg update<br>ipkg install smartdns|软件源路径:https://bin.entwa
    ```shell
    # vi /opt/etc/smartdns/smartdns.conf
    ```
+
+    `/opt/etc/smartdns/smartdns.conf`配置包含如下基本内容:
+    ```
+    # 指定监听的端口号
+    bind []:53 
+    # 指定上游服务器
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # 指定域名规则
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
    
    也可以通过网上邻居修改,网上邻居共享目录 `sda1` 看不到 `asusware.mipsbig` 目录,但可以直接在`文件管理器`中输入 `asusware.mipsbig\etc\init.d` 访问
    
@@ -418,6 +442,18 @@ entware|ipkg update<br>ipkg install smartdns|软件源路径:https://bin.entwa
    ```shell
    # vi /opt/etc/smartdns/smartdns.conf
    ```
+
+   `/opt/etc/smartdns/smartdns.conf`配置包含如下基本内容:
+    ```
+    # 指定监听的端口号
+    bind []:53 
+    # 指定上游服务器
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # 指定域名规则
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
    
     另外,如需支持 IPv6,可设置工作模式为 `2`,将 DNSmasq 的 DNS 服务禁用,设置 SmartDNS 为主用 DNS 服务器。将文件 `/opt/etc/smartdns/smartdns-opt.conf` 中的 `SMARTDNS_WORKMODE` 的值修改为 `2`
    
@@ -480,6 +516,17 @@ entware|ipkg update<br>ipkg install smartdns|软件源路径:https://bin.entwa
     尽可能配置多个上游DNS服务器,包括国内外的服务器。
    
     具体配置请参考[配置文件说明](#配置文件说明)。
+     `smartdns.conf` 配置包含如下基本内容:
+    ```
+    # 指定监听的端口号
+    bind []:53 
+    # 指定上游服务器
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # 指定域名规则
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
 
 4. 重新加载配置
    
@@ -508,6 +555,7 @@ entware|ipkg update<br>ipkg install smartdns|软件源路径:https://bin.entwa
    smartdns        name = smartdns.
    ```
 
+
 ## 配置文件说明
 
 配置建议:**smartdns默认已设置为最优模式,适合大部分场景的DNS查询体验改善,一般情况只需要增加上游服务器地址即可,无需做其他配置修改;如有其他配置修改,请务必了解其用途,避免修改后起到反作用。**

+ 48 - 0
ReadMe_en.md

@@ -203,6 +203,18 @@ https://github.com/pymumu/smartdns/releases
     vi /etc/smartdns/smartdns.conf
     ```
 
+    `smartdns.conf` example:
+    ```
+    # set listen port
+    bind []:53 
+    # set upstream servers
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # set domain rules
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
+
 1. Start Service
 
     ```shell
@@ -363,6 +375,18 @@ Note: Merlin firmware is derived from ASUS firmware and can theoretically be use
     ```shell
     vi /opt/etc/smartdns/smartdns.conf
     ```
+    
+    `smartdns.conf` example:
+    ```
+    # set listen port
+    bind []:53 
+    # set upstream servers
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # set domain rules
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
 
     It can also be modified from Network Neighborhood. From the neighbor sharing directory `sda1` you can't see the `asusware.mipsbig` directory, but you can directly enter `asusware.mipsbig\etc\init.d` in `File Manager` to modify it.
 
@@ -392,6 +416,18 @@ Note: Merlin firmware is derived from ASUS firmware and can theoretically be use
     Vi /opt/etc/smartdns/smartdns.conf
     ```
 
+    `smartdns.conf` example:
+    ```
+    # set listen port
+    bind []:53 
+    # set upstream servers
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # set domain rules
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
+
     Note: if you need to support IPV6, you can set the worke-mode to `2`, this will disable the DNS service of dnsmasq, and smartdns run as the primary DNS server. Change `SMARTDNS_WORKMODE` in the file `/opt/etc/smartdns/smartdns-opt.conf` to 2.
 
     ```shell
@@ -447,6 +483,18 @@ Note: Merlin firmware is derived from ASUS firmware and can theoretically be use
     In general, you only need to add `server [IP]:port`, `server-tcp [IP]:port` configuration items.  
     Configure as many upstream DNS servers as possible, including servers at home and abroad. Please refer to the `Configuration Parameters` section for configuration parameters.  
 
+    `smartdns.conf` example:
+    ```
+    # set listen port
+    bind []:53 
+    # set upstream servers
+    server 1.1.1.1
+    server-tls 8.8.8.8
+    # set domain rules
+    address /example.com/1.2.3.4
+    domain-rule /example.com/ -address 1.2.3.4
+    ```
+    
 1. Start Service
 
     Double-click `reload.bat` in the `D:\smartdns\package\windows` directory for reload.