Explorar o código

add doc for smartdns command line

Nick Peng %!s(int64=2) %!d(string=hai) anos
pai
achega
4aa2f00a08

+ 1 - 0
docs/config/ipset-nftset.md

@@ -20,6 +20,7 @@ hide:
 
 
     ```shell
     ```shell
     ipset /domain/ipset
     ipset /domain/ipset
+    ipset /domain/[#4:ipsetv4,#6:ipsetv6]
     ```
     ```
 
 
 1. 超时
 1. 超时

+ 16 - 1
docs/configuration.md

@@ -86,4 +86,19 @@ hide:
 | dualstack-ip-selection-threshold | 双栈 IP 优选阈值 | 10ms | 单位为毫秒(ms) | dualstack-ip-selection-threshold [0-1000] |
 | dualstack-ip-selection-threshold | 双栈 IP 优选阈值 | 10ms | 单位为毫秒(ms) | dualstack-ip-selection-threshold [0-1000] |
 | user | 进程运行用户 | root | user [username] | user nobody |
 | user | 进程运行用户 | root | user [username] | user nobody |
 | ca-file | 证书文件 | /etc/ssl/<br />certs/ca-certificates.crt | 合法路径字符串 | ca-file /etc/ssl/certs/ca-certificates.crt |
 | ca-file | 证书文件 | /etc/ssl/<br />certs/ca-certificates.crt | 合法路径字符串 | ca-file /etc/ssl/certs/ca-certificates.crt |
-| ca-path | 证书文件路径 | /etc/ssl/certs | 合法路径字符串 | ca-path /etc/ssl/certs |
+| ca-path | 证书文件路径 | /etc/ssl/certs | 合法路径字符串 | ca-path /etc/ssl/certs |
+
+## 命令行参数
+
+smartdns的命令行参数功能如下,也可通过`smartdns -h`来查看帮助。
+
+| 选项 | 功能 | 默认值 | 说明 
+| --- | --- | --- | --- | 
+| -f | 前台运行 | 无 |默认情况下,程序采用后台守护程序运行
+| -c | 配置文件路径 | /etc/smartdns/smartdns.conf
+| -p | pid文件 | /run/smartdns.pid |  进程pid文件路径
+| -R | 异常自动重启 | 无 | 进程故障时,自动重启进程
+| -S | 生成coredump | 无 | 进程故障时,生成coredump文件,用于调试定位
+| -x | 输入日志到终端 | 无 | 输出日志到终端
+| -v | 显示版本 | 无 |
+| -h | 显示命令行帮助 | 无 | 

+ 8 - 0
docs/install/docker.md

@@ -24,3 +24,11 @@ server 1.1.1.1
 ```
 ```
 docker run -d --name smartdns --restart=always -p 53:53/udp -v /etc/smartdns:/etc/smartdns pymumu/smartdns:latest
 docker run -d --name smartdns --restart=always -p 53:53/udp -v /etc/smartdns:/etc/smartdns pymumu/smartdns:latest
 ```
 ```
+
+## 不重启镜像加载配置
+
+对于docker容器,smartdns支持不重启镜像加载配置,当修改完成配置后,进入容器环境,执行下面的命令重新加载配置。
+
+```
+kill -HUP 1
+```

+ 1 - 0
en/docs/config/ipset-nftset.md

@@ -20,6 +20,7 @@ Like Dnsmasq, smartdns supports ipset and nftset, which can use TPROXY to transp
 
 
     ```shell
     ```shell
     ipset /domain/ipset
     ipset /domain/ipset
+    ipset /domain/[#4:ipsetv4,#6:ipsetv6]
     ```
     ```
 
 
 1. Timeout
 1. Timeout

+ 15 - 0
en/docs/configuration.md

@@ -83,3 +83,18 @@ hide:
 |user|run as user|root|user [username]|user nobody
 |user|run as user|root|user [username]|user nobody
 |ca-file|certificate file|/etc/ssl/certs/<br />ca-certificates.crt|path|ca-file /etc/ssl/certs/ca-certificates.crt
 |ca-file|certificate file|/etc/ssl/certs/<br />ca-certificates.crt|path|ca-file /etc/ssl/certs/ca-certificates.crt
 |ca-path|certificates path|/etc/ssl/certs|path|ca-path /etc/ssl/certs
 |ca-path|certificates path|/etc/ssl/certs|path|ca-path /etc/ssl/certs
+
+## Command Line Options
+
+The command line options for smartdns are as follows, you can also use `smartdns -h` to view the help.
+
+| Option | Function | Default Value | Description |
+| --- | --- | --- | --- |
+| -f | Run in foreground | None | By default, the program runs as a background daemon. |
+| -c | Configuration file path | /etc/smartdns/smartdns.conf | Path to the configuration file. |
+| -p | PID file | /run/smartdns.pid | Path to the process PID file. |
+| -R | Automatic restart on exception | None | Automatically restart the process on exception. |
+| -S | Generate coredump on crash | None | Generate a coredump file on process crash for debugging purposes. |
+| -x | Log to terminal | None | Output logs to the terminal. |
+| -v | Display version | None | Display the version of smartdns. |
+| -h | Display command line help | None | Display the command line help. |