Skip to content
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

Proxy in Incognito / Private Browsing Mode #136

Closed
ericjung opened this issue Feb 10, 2021 · 15 comments
Closed

Proxy in Incognito / Private Browsing Mode #136

ericjung opened this issue Feb 10, 2021 · 15 comments
Labels
feature request New feature or request

Comments

@ericjung
Copy link
Collaborator

From email:

I'd like to use a proxy for everything I visit using an Incognito window.

"Use XXX For All URLs" is not good because:

  1. Then everything in every browser window is going through that proxy, including my gmail and every open page that updates itself. If I'm going to Incognito & proxy for privacy reasons, it'd be best of all those other websites couldn't correlate me to that VPN exit node at that date and time.

  2. If I find a link in my regular browsing and use "Open Link in New Private Window", it's too late. I have to plan ahead to do the manual switch.

@erosman
Copy link
Collaborator

erosman commented Feb 10, 2021

Options are:

  • Using patterns instead of for all (personally, I regularly switch between pattern & all)
  • If user does not want proxy in Private Browsing at all, it can be disabled from Firefox addon options (although not tested)
    about:addons -> FoxyProxy -> Run in Private Windows -> Don’t Allow

@ericjung
Copy link
Collaborator Author

@erosman is it possible to detect Private Browing mode at runtime?

@erosman
Copy link
Collaborator

erosman commented Feb 13, 2021

proxy.onRequest has incognito boolean.

function proxyRequest(requestInfo) {
return findProxyMatch(requestInfo.url, activeSettings);
}

Therefore ....

function proxyRequest(requestInfo) {
  // check incognito
  if (requestInfo.incognito) { /* process */ }
  
  return findProxyMatch(requestInfo.url, activeSettings);
}

User preferences would be needed for:

  • proxy for normal & incognito (as FP runs now)
  • proxy for normal but not incognito (disabled for incognito)
  • not for normal but for incognito (disabled for normal)
  • same patterns for normal & incognito
  • different patterns for normal & incognito

@mipek
Copy link

mipek commented Mar 28, 2021

I wanted something like this myself and implemented it by adding a simple flag that specifies whether or not a particular proxy configuration can be used in incognito mode or not. This means you can have two separate sets of proxies (one set for regular browsing and one for incognito browsing). In incognito browsing only proxies that have this flag are allowed to be used.

The downside is that you need to have at least one proxy configured for incognito mode otherwise it deliberately fails to establish a connection (which may be a good thing depending on the user).

If this sounds okay I'm happy to provide a pull request.

@erosman
Copy link
Collaborator

erosman commented Sep 10, 2022

Note: incognito separation of proxy is not possible in Chrome.

@erosman erosman added the feature request New feature or request label Sep 10, 2022
@pmarks-net
Copy link

incognito separation of proxy is not possible in Chrome.

It works fine in my extension: https://github.com/pmarks-net/incognito-proxy

@erosman
Copy link
Collaborator

erosman commented Oct 12, 2022

incognito separation of proxy is not possible in Chrome.

It works fine in my extension: https://github.com/pmarks-net/incognito-proxy

That is a bit different.

The question in FoxyProxy is how to handle include/exclude patterns and user options, similar to the answer given in #194 regarding containers.

@ghost
Copy link

ghost commented Jun 27, 2023

Options are:

* Using patterns instead of for all (personally, I regularly switch between pattern & all)

* If user does not want proxy in Private Browsing at all, it can be disabled from Firefox addon options (although not tested)
  **about:addons -> FoxyProxy -> Run in Private Windows -> Don’t Allow**

Perhaps a simple dropdown box to enable/disable the pattern in normal or private tabs?
Also, any news on this feature?

@erosman
Copy link
Collaborator

erosman commented Jun 28, 2023

The next update of FoxyProxy has a unified code for Firefox & Chrome.
In Chrome, proxy can apply to all, or only to incognito windows.

chrome.proxy: Examples

The settings apply to regular and incognito windows, as incognito windows inherit settings from regular windows. Please also consult the Types API documentation.

Chrome settings

regular
Settings set in the regular scope apply to regular browser windows and are inherited by incognito windows if they are not overwritten.

incognito_persistent
Settings set in the incognito_persistent scope apply only to incognito windows.

@erosman
Copy link
Collaborator

erosman commented Sep 23, 2023

Perhaps a simple dropdown box to enable/disable the pattern in normal or private tabs?
Also, any news on this feature?

Added Tab Proxy feature (Firefox only) in FoxyProxy v8.0.

See also: #125

@erosman
Copy link
Collaborator

erosman commented Sep 27, 2023

Follow on: Incognito & Container Support

@erosman erosman closed this as completed Sep 27, 2023
@pmarks-net
Copy link

Could you clarify how to configure FoxyProxy so that all private browsing tabs use a proxy?

I would like to add the instructions to https://github.com/pmarks-net/incognito-proxy

@erosman
Copy link
Collaborator

erosman commented Sep 27, 2023

Could you clarify how to configure FoxyProxy so that all private browsing tabs use a proxy?

The feature is not finalised yet. It will be available in future release of FoxyProxy.

@pmarks-net
Copy link

Ah, so foxyproxy/browser-extension#33 is a replacement for this bug.

@ericjung
Copy link
Collaborator Author

Ah, so foxyproxy/browser-extension#33 is a replacement for this bug.

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants