WORKFLOW SNAPSHOT
- Determine whether an unexpected response comes from a filtering rule, DNS resolution, or the outgoing proxy route.
- Suggested starting behavior: Static assignment
- Validate the real application and destination
A practical AdGuard and proxy routing workflow
Determine whether an unexpected response comes from a filtering rule, DNS resolution, or the outgoing proxy route.
- Record which AdGuard product and configuration are in use.
- Test a non-sensitive allowed destination as the baseline.
- Change one layer at a time and retain certificate validation.
How do AdGuard filtering, DNS and proxy routing interact in this test?
Keep the proxy assignment fixed while classifying whether an unexpected response comes from filtering, name resolution or the outgoing connection. These layers can interact, but a blocked page is not automatically a failed proxy.
Which AdGuard rule or connection layer should you verify before repeating?
A blocked request is not necessarily a proxy failure. Filtering and proxy capabilities depend on the exact client and version.
Compare rule decisions, resolved destination, and observed exit without exporting private browsing histories.
Verify the AdGuard and proxy routing connection boundary
Record the filtering context, relevant rule outcome, resolver context and observed exit where available. Use the application’s supported diagnostics. Keep protective settings deliberate rather than disabling broad protections to hide an unexplained failure.
Separate an AdGuard filter result from the proxy response
Capture the allowed control page through the proxy as one observation to compare with AdGuard's separate filter decision and resolver evidence.
- 01Generate your endpoint
Choose HTTP / HTTPS and Sticky session for the complete workflow in Configure proxies.
- 02Set your proxy URL
Set
PS_PROXY_URLtohttp://USERNAME:PASSWORD@HOST:PORTusing your generated endpoint. For IP authentication, whitelist your machine and usehttp://HOST:PORT. Percent-encode special characters in credentials; these are proxy credentials, separate from your account password or API key. - 03Choose the destination
Set
Example URL · replace placeholders with your targetPS_TARGET_URLbefore running the code. Use a small non-sensitive HTTPS page known to be allowed by the specific AdGuard configuration under test; keep its expected body marker fixed while changing one supported setting at a time.https://example.com/qa/adguard/allowed-controlSet PS_EXPECT_TEXT to the allowed control page's deliberate marker, such as ADGUARD_ALLOWED_CONTROL. This optional check inspects the returned text without running JavaScript.
Python 3.10+ · python -m pip install requests · python ps_adguard.py# Capture the allowed control page through the proxy as one observation to compare with AdGuard's separate filter decision and resolver evidence.
# Set PS_TARGET_URL to a small non-sensitive HTTPS page known to be allowed by the specific AdGuard configuration under test; keep its expected body marker fixed while changing one supported setting at a time.
import hashlib
import json
import os
import time
from pathlib import Path
from urllib.parse import urlsplit
import requests
class InspectSession(requests.Session):
# Leave redirect bodies streamed instead of preparing the next request.
def resolve_redirects(self, *args, **kwargs):
return iter(())
proxy = os.environ["PS_PROXY_URL"] # HTTP endpoint from ProxySight
target = os.environ["PS_TARGET_URL"] # https://example.com/qa/adguard/allowed-control
if urlsplit(proxy).scheme != "http":
raise ValueError("Use your generated HTTP proxy endpoint for this example.")
if urlsplit(target).scheme not in ("http", "https"):
raise ValueError("PS_TARGET_URL must be an HTTP or HTTPS URL.")
with InspectSession() as client:
client.trust_env = False # No ambient proxy, NO_PROXY or netrc overrides
started = time.monotonic()
with client.get(
target,
proxies={"http": proxy, "https": proxy},
headers={"Accept-Language": "en-US,en;q=0.9"},
timeout=(10, 20), allow_redirects=False, stream=True,
) as response:
body = bytearray()
for chunk in response.iter_content(16384):
body.extend(chunk)
if len(body) > 1048576:
raise RuntimeError("Response exceeds this example's 1 MiB limit.")
Path("adguard-allowed-route-control.html").write_bytes(body)
print(json.dumps({
"workflow": "adguard", "status": response.status_code,
"elapsed_ms": round((time.monotonic() - started) * 1000),
"bytes": len(body), "sha256": hashlib.sha256(body).hexdigest(),
"headers": {name: response.headers.get(name) for name in ['Content-Type', 'Location', 'Server']},
}, indent=2))
expected = os.getenv("PS_EXPECT_TEXT", "")
if expected:
text = body.decode(response.encoding or "utf-8", errors="replace")
print("Expected text:", "found" if expected in text else "absent")
# A 200 status alone does not prove the intended page was returned.
# Inspect redirects, login prompts, 403 and 429 before another request.
Inspect status, response type and the known marker to distinguish the control page from a block document; the script does not configure AdGuard or prove it intercepts this process, and HTTP headers alone cannot establish the DNS resolver or explain which filtering rule acted.
Response bodies are limited to 1 MiB for a small diagnostic. TLS verification stays enabled; redirects are left for you to inspect. Connection guide
Example: isolate filtering, DNS, and outbound routing
Write down the exact AdGuard product and the layers it controls in your setup. Start with an allowed non-sensitive destination. Compare filtering decisions, name resolution, and the outgoing route one at a time.
Keep the expected outcome clear: a filtered request can be the correct result of the filter rather than evidence that the proxy failed.
{
"product": "RECORD_ADGUARD_PRODUCT",
"filter_result": "RECORD_DECISION",
"dns_result": "RECORD_RESULT",
"route_result": "RECORD_EXIT"
}AdGuard and proxy routing verification checklist
For this AdGuard and proxy routing workflow, record filter, dns and outbound path alongside the actual result. Use the evidence below to decide whether another observation is comparable before increasing the workload.
| Checkpoint | Hold constant or record | Expected evidence |
|---|---|---|
| Filter | Rule or decision category | Allowed or blocked as expected |
| DNS | Resolution context | Destination lookup understood |
| Outbound path | Configured client route | Observed exit for allowed traffic |
Troubleshoot AdGuard and proxy routing results and connection errors
| Symptom | Check next | What the result tells you |
|---|---|---|
| Request blocked | Inspect rule decision | Filtering may be working correctly |
| Name fails before connection | Check DNS layer | No target request may have occurred |
| Allowed site uses unexpected exit | Check route scope | Filter success does not verify routing |
Change one AdGuard test variable while preserving the route record
Choose a known public test page and save the direct outcome, filter outcome and routed outcome as separate observations. Change one supported setting at a time and restore the intended configuration. This helps attribute a difference to a rule, DNS answer or connection path.
A LITTLE CLARITY
Common questions.
Does a proxy replace an AdGuard filtering rule?
No. Filtering decisions and connection routing are separate controls.
Why change one layer at a time?
It lets you identify whether the observed difference came from filtering, DNS, or the route instead of guessing.
Which AdGuard rule or connection layer should you verify before repeating?
Record the filtering context, relevant rule outcome, resolver context and observed exit where available. Use the application’s supported diagnostics. Keep protective settings deliberate rather than disabling broad protections to hide an unexplained failure.