Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Chromium new_context({ proxy }) ignored when running inside Docker without CDP #2883

Open
@4dvisor

Description

@4dvisor

Version

1.52.0

Steps to reproduce

importasyncioimportjsonfromplaywright.async_apiimportasync_playwrightTEST_URL="https://api.ipify.org?format=json"PROXY= {"server":"http://proxy_url:proxy_port","username":"username","password":"password", }asyncdeffetch_ip(context):page=awaitcontext.new_page()awaitpage.goto(TEST_URL,wait_until="domcontentloaded")ip=json.loads(awaitpage.text_content("body"))["ip"]awaitcontext.close()returnipasyncdefmain():asyncwithasync_playwright()asp:browser=awaitp.chromium.launch(headless=True,proxy={"server":"per-context"},# <-- requiredargs=["--disable-blink-features=AutomationControlled"],        )ctx1=awaitbrowser.new_context(proxy=PROXY)print("CTX-1 IP ⇒",awaitfetch_ip(ctx1))awaitbrowser.close()asyncio.run(main())

Expected behavior

CTX-1 IP ⇒ <IP-from-proxy>

Actual behavior

CTX-1 ⇒ <host-public-IP>

Additional context

When Chromium is launched with proxy={"server": "per-context"} inside a Docker container, no context created with browser.new_context(proxy=…) uses the proxy at all—all requests always fall back to the container’s outbound IP.

Environment

- Operating System: [Ubuntu 22.04]- CPU: [amd64]- Browser: [Chromium]- Python Version: [3.12]- Docker img: mcr.microsoft.com/playwright/python:v1.52.0-noble- Other info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp