foxyproxy / browser-extension

Version 8 and above. Browser extension source code for Firefox, Chrome, and other Chromium-based browsers
GNU General Public License v2.0
198 stars 29 forks source link

HTTPS proxy on Chrome keeps prompting sign in #136

Open eiqnepm opened 3 weeks ago

eiqnepm commented 3 weeks ago

I have a HTTPS proxy for which I have already provided the username and password. Unfortunately on Chrome I keep getting prompted for sign in upon browser launch (if the proxy is selected). For some reason proxy by pattern sometimes works as expected and sometimes doesn't. For example if I add the pattern gql.twitch.tv and visit https://twitch.tv I will be prompted for sign in, but if I add ipleak.net and visit https://ipleak.net it works as expected without a prompt.

The exact same configuration does not have these problems on Firefox, it seems unique to Chrome.

Prompt

proxy

Proxy

prompt

erosman commented 3 weeks ago

Unfortunately on Chrome I keep getting prompted for sign in upon browser launch (if the proxy is selected).

Browsers often start making net connections as soon as they launch and before extensions are loaded. Previously: Site not being proxied at startup

For example if I add the pattern gql.twitch.tv and visit https://twitch.tv/ I will be prompted for sign in, but if I add ipleak.net and visit https://ipleak.net/ it works as expected without a prompt.

Subdomains are completely different domains. gql.twitch.tv and twitch.tv are two separate sites.

eiqnepm commented 3 weeks ago

The extension is fully loaded when this occurs. I understand that those are two different hosts, however when you visit https://twitch.tv it will make an XHR request to gql.twitch.tv and for some reason having this as an include in the patterns causes the prompt in Chrome but not Firefox.

erosman commented 3 weeks ago

The hostname field on FoxyProxy Options for an HTTP/S proxy should be the hostname only, without the protocol.

eiqnepm commented 3 weeks ago

I am not including the scheme. I am using exactly gpl.twitch.tv.

Assuming you have access to a HTTPS proxy, are you able to replicate my issue?

erosman commented 3 weeks ago
proxy

Above shows https://... in the hostname

eiqnepm commented 3 weeks ago

My bad, when obfuscating the host I added https:// to indicate that it was a HTTPS proxy, but when I did the tests prior I only included the host, not the scheme.

https://streamable.com/a58vuc

erosman commented 3 weeks ago

The extension is fully loaded when this occurs. I understand that those are two different hosts, however when you visit https://twitch.tv it will make an XHR request to gql.twitch.tv and for some reason having this as an include in the patterns causes the prompt in Chrome but not Firefox.

Can you post the patterns you have for twitch.tv?

eiqnepm commented 3 weeks ago

usher.ttvnw.net, video-weaver.*.hls.ttvnw.net and gql.twitch.tv.

erosman commented 3 weeks ago

The video appears to show:

Does the login prompt appear if you set FoxyProxy to use a single proxy for everything?

eiqnepm commented 3 weeks ago

Does the login prompt appear if you set FoxyProxy to use a single proxy for everything?

No it does not, it works as expected when you use the proxy for everything, however it misbehaves when you use proxy by patterns.

erosman commented 3 weeks ago

I have seen occasions where a request coming from the target site is shown incorrectly by the browser as coming from the proxy server (sine it passes via the server).

Your situation is also such that some domains on a page, inclining the main domain are not proxied but some are. Try adding the rest of the domains that are active on that page to the patterns and see if that changes the situation.

You can try more generalised patters such as:

https://twitch.tv/
https://*.twitch.tv/
https://*.ttvnw.net/
... etc
eiqnepm commented 2 weeks ago

Unfortunately I am not looking to proxy all of the hosts of Twitch, only certain ones, so I am able to stream video reliably in my region without having Twitch appear as though I am in the region of the proxy. It's unfortunate that this issue happens in Chrome as I find Twitch to be a bit flaky in Firefox.

Maybe it's a known issue with Chrome, if so then I would hope it's reproducible and hopefully gets fixed down the line by Chrome or maybe the extension can find a workaround. Until then I will just have to continue using Firefox for Twitch.

Thanks for taking the time to investigate the issue nonetheless.