Skip to content

[NODRIVER] Proxy Setup Randomly Stop Working Now? #2157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zerxdapro opened this issue Mar 12, 2025 · 1 comment
Open

[NODRIVER] Proxy Setup Randomly Stop Working Now? #2157

zerxdapro opened this issue Mar 12, 2025 · 1 comment

Comments

@zerxdapro
Copy link

So, I didnt change my proxy setup at all, but all of the sudden, it just isnt working anymore. I just keep getting "ERR_NO_SUPPORTED_PROXIES".
I tried 3 different proxies, so I know its not the proxies. If someone could help me out, that would be awesome!

PROXY = f"http://{proxyusername}:{proxypassword}@{proxyhost}:{proxyport}"

# Proxy setup function
async def setup_proxy(username: str, password: str, tab):
    async def auth_challenge_handler(event):
        await tab.send(
            fetch.continue_with_auth(
                request_id=event.request_id,
                auth_challenge_response=fetch.AuthChallengeResponse(
                    response="ProvideCredentials",
                    username=username,
                    password=password,
                ),
            )
        )

    async def req_paused(event):
        await tab.send(fetch.continue_request(request_id=event.request_id))

    tab.add_handler(fetch.RequestPaused, lambda event: asyncio.create_task(req_paused(event)))
    tab.add_handler(fetch.AuthRequired, lambda event: asyncio.create_task(auth_challenge_handler(event)))
    await tab.send(fetch.enable(handle_auth_requests=True))

async def start():
    options = Options()
    options.weighted_versions = True
    ua = ua_generator.generate(device='desktop', browser=('chrome', 'edge', 'firefox'), options=options)

    browser_args = [
        f'--user-agent={ua}',
        '--ignore-certificate-errors',
        '--disable-gpu',
        '--disable-extensions',
        '--disable-site-isolation-trials',
        '--incognito',
        f'--proxy-server={PROXY}',
    ]
    #browser_args.append(f"--headless=new")
    browser = await uc.start(browser_args=browser_args)
    main_tab = await browser.get("draft:,")
    await setup_proxy(proxyusername, proxypassword, main_tab)
    try:
        ipPage = await browser.get("https://www.myexternalip.com/raw")
        await asyncio.sleep(50)
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

No branches or pull requests

2 participants
@zerxdapro and others