Files
smartdns/docs/config/ip-set.md
2023-10-31 22:21:02 +08:00

30 lines
710 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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
```