Skip to content

Conversation

@Ground-Zerro
Copy link

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:

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.

issues #7248

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.
@windsurf-bot
Copy link

windsurf-bot bot commented Nov 22, 2025

I ran into an unexpected issue while reviewing this PR. Please try again later.

@Ground-Zerro Ground-Zerro mentioned this pull request Nov 22, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant