Skip to content

Commit

Permalink
IPSubstituting: accept CIDR
Browse files Browse the repository at this point in the history
  • Loading branch information
lifenjoiner committed Sep 22, 2022
1 parent 546f3e6 commit 58d6969
Show file tree
Hide file tree
Showing 10 changed files with 367 additions and 218 deletions.
8 changes: 6 additions & 2 deletions default.config
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,16 @@ GroupFile
BlockIP

# IPSubstituting <IP1 IP'1>,<IP2 IP'2>,.....
# �滻 DNS ���ݰ��е� IP ��ַ��ֻ֧�� IPv4 ��ַ�� (since 5.0.1)
# �滻 DNS ���ݰ��е� IP ��ַ
# Ҫ�滻�� IP ֧�� CIDR д�����滻Ϊ�� IP ��֧�֣����ұ��뱣����ͬ�汾
# ���磺
# IPSubstituting 127.0.0.1 1.2.0.127
# ��Ч���ǰ� DNS ���ݰ������е� 127.0.0.1 ��ַ�滻Ϊ 1.2.0.127
# ��Ч���ǰ� DNS ���ݰ������е� 127.0.0.1 ��ַ�滻Ϊ 1.2.0.127 (since 5.0.1)
# IPSubstituting 173.245.48.0/20 173.245.48.22
# ��Ч���ǰ� DNS ���ݰ������� 173.245.48.0/20 �ڵĵ�ַ�滻Ϊ 173.245.48.22 (since 6.5.0)
# ���滻ͨ����������TCP �� UDP����ѯ������ DNS ���ݰ������ڻ����к� Hosts �еĽ����Ч
# �����滻��Ŀ�ð�Ƕ��� (`,') �ָ���Ҳ����д���� `IPSubstituting'
# ��ƥ�� IP ������ƥ�� CIDR ����
IPSubstituting

# BlockNegativeResponse <BOOLEAN>
Expand Down
8 changes: 6 additions & 2 deletions default.en.config
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,16 @@ GroupFile
BlockIP

# IPSubstituting <IP1 IP'1>,<IP2 IP'2>,.....
# Replace an IP with another in every response from servers(only IPv4 supported) (since 5.0.1)
# Replace an IP with another in every response from servers
# The IPs to be replaced support CIDR form, but the desired IP does NOT, and MUST keep the same version
# e.g.
# IPSubstituting 127.0.0.1 1.2.0.127
# Which is, replacing 127.0.0.1 with 1.2.0.127 in every response from servers
# Which is, replacing 127.0.0.1 with 1.2.0.127 in every response from servers (since 5.0.1)
# IPSubstituting 173.245.48.0/20 173.245.48.22
# will replace all IPs in 173.245.48.0/20 with 173.245.48.22 in every response from servers (since 6.5.0)
# This option only affects responses from servers, but not responses from hosts and cache
# Adjacent items should be separated by a comma, or split them to different lines of `IPSubstituting'
# IP rules are tested first, and then CIDR rules.
IPSubstituting

# BlockNegativeResponse <BOOLEAN>
Expand Down
Loading

0 comments on commit 58d6969

Please sign in to comment.