Skip to content

Custom blocking IP: blocked requests rejected at HTTP layer before reaching local WebServer #6167

Description

@wxcvm

Problem

When using AdGuard 4.14.0 Custom IP blocking mode (dns_custom_blocking_ipv4 = 127.0.0.1) with a local WebServer (e.g. AdAway), blocked ad requests are rejected at AdGuard HTTP proxy layer before reaching the WebServer.

  • DNS resolution works: domains resolve to 127.0.0.1 ✅
  • Direct connection to 127.0.0.1:80 works (returns webp placeholder) ✅
  • Through AdGuard VPN: Connection refused ❌

Root cause: ad_blocking_enabled=true intercepts ad-host requests at HTTP layer.

Reproduction

  1. Install AdGuard 4.14.0 (local APK, not Play Store) + AdAway (WebServer on 127.0.0.1:80)
  2. Go to Settings → Filters → DNS blocking → Custom IP → enter 127.0.0.1
  3. Enable ad-blocking (default ON)
  4. Visit ad-laden page
  5. Ad requests get Connection refused

Workaround

Edit base.xml:
Then ad requests reach AdAway and return webp images.

Expected Behavior

When Custom IP blocking is configured:

  1. DNS resolves blocked domains to custom IP (works)
  2. HTTP requests should reach the custom IP (broken - rejected at proxy)
  3. WebServer response should be returned to client

Request

Implement one of:

  • Option A: Auto-disable HTTP filtering when Custom IP mode is active
  • Option B: Add UI indicator for Custom IP mode
  • Option C: Add config option Allow local WebServer for custom blocking IP

This enables AdAway/Pi-hole integration for ad placeholder images.

Environment

  • ColorOS 16.1.0 / Android 16 (Rooted)
  • AdGuard version: 4.14.0 (versionCode=42218007, local APK)
  • AdAway: com.wxcvm.Adaway (127.0.0.1:80)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions