Pull request 2189: 5345-ipset-file-comments

Updates #5345.

Squashed commit of the following:

commit 66ceac9ac2646bd9a8d6be545b283008342f3153
Merge: 8be4dce3c 82247d764
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Apr 5 19:05:48 2024 +0300

    Merge branch 'master' into 5345-ipset-file-comments

commit 8be4dce3ca7420464084ce062aac81de9ddb53c8
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 2 14:56:21 2024 +0300

    all: upd chlog

commit 53c72130157b4bb8c55208f2faee24a80456b85f
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 2 14:48:56 2024 +0300

    dnsforward: ipset file comments
This commit is contained in:
Stanislav Chzhen 2024-04-05 19:32:38 +03:00
parent 82247d764a
commit 6f36ebc06c
2 changed files with 7 additions and 0 deletions

View file

@ -23,6 +23,12 @@ See also the [v0.107.49 GitHub milestone][ms-v0.107.49].
NOTE: Add new changes BELOW THIS COMMENT.
-->
### Added
- Support for comments in the ipset file ([#5345]).
[#5345]: https://github.com/AdguardTeam/AdGuardHome/issues/5345
<!--
NOTE: Add new changes ABOVE THIS COMMENT.
-->

View file

@ -452,6 +452,7 @@ func (s *Server) prepareIpsetListSettings() (err error) {
}
ipsets := stringutil.SplitTrimmed(string(data), "\n")
ipsets = stringutil.FilterOut(ipsets, IsCommentOrEmpty)
log.Debug("dns: using %d ipset rules from file %q", len(ipsets), fn)