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

710 B
Raw Permalink Blame History

hide
hide
toc

IP地址集合的使用

为方便按集合配置IP地址对于使用到ip/subnet的配置可以指定IP地址集合方便维护。具体方法为

  1. 使用ip-set配置集合文件,如

    ip-set -name cloudflare -file /etc/smartdns/cloudflare-list.conf
    

    cloudflare-list.conf的格式为一个IP地址一行

    1.2.3.4
    192.168.1.1/24
    
  2. 在有ip/subnet配置的选项使用IP地址集合只需要将ip/subnet配置为ip-set:[集合名称]/即可,如:

    ignore-ip ip-set:cloudflare
    ip-rules ip-set:cloudflare -whitelist-ip
    ip-alias ip-set:cloudflare 192.168.1.1