Skip to content

USE CASE / DEVICES & TOOLS

Windows proxy workflows

Windows browsers, background services, and application libraries may use different proxy configuration sources. Test the process that actually performs the work.

In this guide

WORKFLOW SNAPSHOT

  • Diagnose a route mismatch between an interactive browser and a scheduled application.
  • Suggested starting behavior: Static assignment
  • Validate the real application and destination

A practical Windows workflow

Diagnose a route mismatch between an interactive browser and a scheduled application.

  • Record the application, execution user, and configuration source.
  • Check proxy bypass rules and service-specific settings.
  • Run a minimal connection check in the same execution context.

Which Windows program and execution user should use the proxy?

Keep a stable assignment while comparing the affected Windows contexts. An interactive browser, a scheduled task and a background service may read different settings and handle credential prompts differently. Verify the process that sends the failing request.

What should you check before expanding Windows service or task testing?

A working browser setting does not establish that every Windows service uses the same proxy. Credential prompts may also behave differently in unattended processes.

Compare observed exits and redacted errors for both contexts before changing a system-wide setting.

Verify the Windows connection boundary

Record the executable or library, task user, configuration source and applicable bypass rules. Check the observed exit from that context where possible. A single working browser session is not proof that the unattended process has valid proxy authentication.

Compare a Windows job with a known HTTP fixture

Fetches a known document in the sample's current Windows execution context so you can compare its response with the unattended job's result.

  1. 01
    Generate your endpoint

    Choose HTTP / HTTPS and Sticky session for the complete workflow in Configure proxies.

  2. 02
    Set your proxy URL

    Set PS_PROXY_URL to http://USERNAME:PASSWORD@HOST:PORT using your generated endpoint. For IP authentication, whitelist your machine and use http://HOST:PORT. Percent-encode special characters in credentials; these are proxy credentials, separate from your account password or API key.

  3. 03
    Choose the destination

    Set PS_TARGET_URL before running the code. Use an HTTPS test document reachable by both the interactive user and the affected scheduled task or service, keeping its URL and timeout identical.

    Example URL · replace placeholders with your targethttps://example.com/diagnostics/windows-job.html

    Set PS_EXPECT_TEXT to the known document's non-secret environment label. This optional check inspects the returned text without running JavaScript.

ps_windows.pyFetches a known document in the sample's current Windows execution context so you can compare its response with the unattended job's result.
Before you runPython 3.10+ · python -m pip install requests · python ps_windows.py
# Fetches a known document in the sample's current Windows execution context so you can compare its response with the unattended job's result.
# Use an HTTPS test document reachable by both the interactive user and the affected scheduled task or service, keeping its URL and timeout identical.
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/diagnostics/windows-job.html
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("windows-job-response.html").write_bytes(body)
        print(json.dumps({
            "workflow": "windows", "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', 'Content-Language', 'Location']},
        }, 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.
Understand the result

Check the fixture marker and response fingerprint under each execution user, with proxy and bypass configuration recorded. This sample explicitly configures its own request; its success does not prove a browser, Windows service or scheduled application uses the same settings.

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: compare browser and unattended service settings

Identify the program and execution user that sends the request. A browser, scheduled task, and service can read different configuration sources and handle credential prompts differently.

Run the same small diagnostic request in the affected context. Keep proxy and bypass settings redacted but identifiable so another engineer can reproduce the setup.

Illustrative observation record · replace with your test data
{
  "program": "RECORD_CLIENT",
  "execution_user": "RECORD_CONTEXT",
  "config_source": "RECORD_SOURCE",
  "proxy_result": "RECORD_EXIT_OR_ERROR"
}

Windows verification checklist

For this Windows workflow, record program, execution and bypass alongside the actual result. Use the evidence below to decide whether another observation is comparable before increasing the workload.

CheckpointHold constant or recordExpected evidence
ProgramExact executable or client libraryThe affected sender identified
ExecutionInteractive or service userCorrect configuration context
BypassApplicable exclusionsDirect connections explained

Troubleshoot Windows results and connection errors

SymptomCheck nextWhat the result tells you
Browser works, task failsCompare task user and settingsDifferent configuration source
Only one host goes directInspect bypass rulesThe route may be intentionally excluded
Unattended auth failsCheck supported credential handlingInteractive prompts may not apply

Compare Windows browser, scheduled-task and service configurations

Run the same small diagnostic destination with the same timeout under the browser and the affected task context. Compare redacted errors and exits. If only one host goes direct, inspect exclusions before changing a system-wide setting or replacing valid credentials.

A LITTLE CLARITY

Common questions.

Does one Windows proxy setting cover every program?

No. Coverage depends on the program and networking stack.

What is a useful first step for an unattended Windows failure?

Reproduce the minimal request under the same execution user and configuration source as the task.

What should you check before expanding Windows service or task testing?

Record the executable or library, task user, configuration source and applicable bypass rules. Check the observed exit from that context where possible. A single working browser session is not proof that the unattended process has valid proxy authentication.

PUT THE KNOWLEDGE TO WORK

Your workflow.
Your next connection.

Try the controls, choose your IP behavior, and start with one clear connection check.

Explore the configurator ↗