Add IPSet auto-creation feature#8127
Open
Ground-Zerro wants to merge 1 commit intoAdguardTeam:masterfrom
Open
Conversation
This PR adds a new feature to automatically create IPSets on AdGuard Home startup if they don't exist in the system.
## Features
### Backend (Go)
- Add IpsetCreateConfig and IpsetSetConfig to DNS configuration
- Implement automatic IPSet creation using go-ipset/v2 library
- Support for both IPv4 (inet) and IPv6 (inet6) families
- Support for hash:ip and hash:net IPSet types
- Optional timeout configuration for IPSet entries
- Skip creation if IPSet already exists (with logging)
- Cross-platform support (Linux implementation + stub for other platforms)
### Frontend (React/TypeScript)
- New IPSet settings page at /#ipset
- Support for both config-based and file-based IPSet rules
- CRUD operations for IPSet rules
- Auto-creation section with enable/disable checkbox
- Modal dialogs for adding/editing IPSet definitions
- Support for creating multiple IPSets with same settings (comma-separated names)
- Table views with edit/delete actions
- Full English and Russian localization
## Configuration
New YAML configuration block:
```yaml
dns:
ipset_create:
enabled: true
sets:
- name: my_ipset
type: hash:ip
family: inet
timeout: 300
```
Settings are applied on save without requiring application restart.
|
I ran into an unexpected issue while reviewing this PR. Please try again later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new feature to automatically create IPSets on AdGuard Home startup if they don't exist in the system.
Features
Backend (Go)
Frontend (React/TypeScript)
Configuration
New YAML configuration block:
Settings are applied on save without requiring application restart.
issues #7248