add ip-set, ip-rules, ip-alias pages

This commit is contained in:
Nick Peng
2023-10-31 22:21:02 +08:00
parent ef1040c378
commit 4d69057696
10 changed files with 275 additions and 5 deletions

29
docs/config/ip-set.md Normal file
View File

@@ -0,0 +1,29 @@
---
hide:
- toc
---
# IP地址集合的使用
为方便按集合配置IP地址对于使用到`ip/subnet`的配置可以指定IP地址集合方便维护。具体方法为
1. 使用`ip-set`配置集合文件,如
```shell
ip-set -name cloudflare -file /etc/smartdns/cloudflare-list.conf
```
cloudflare-list.conf的格式为一个IP地址一行
```shell
1.2.3.4
192.168.1.1/24
```
1. 在有`ip/subnet`配置的选项使用IP地址集合只需要将`ip/subnet`配置为`ip-set:[集合名称]/`即可,如:
```shell
ignore-ip ip-set:cloudflare
ip-rules ip-set:cloudflare -whitelist-ip
ip-alias ip-set:cloudflare 192.168.1.1
```