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

"Proxy by Patterns" is only available when multiple proxies exist, disabling patterns for single proxy setups #106

Closed lanmaster53 closed 5 months ago

lanmaster53 commented 6 months ago

Patterns only apply when "Proxy by Patterns" is enabled, which is only available when more than one proxies are configured. Therefore, it is no longer possible to filter a single proxy, even if it is configured with patterns. I recommend enabling the "Proxy by Patterns" option even when only a single proxy is configured, which was how v7.x worked.

lanmaster53 commented 6 months ago

My temporary workaround is to create my "real" proxy with an include all pattern followed by exclusion patterns. I then create a "dummy" proxy with an exclude all pattern followed by a dummy include pattern. If there isn't an include pattern on each proxy, then the "Proxy by Patterns" option will not show up. After doing this, I can enable "Proxy by Patterns" and everything behaves as expected and can be validated by the log.

This was way too hard for something that was so simple before. As a fellow software developer, I don't understand all of these major changes to something that simply worked perfectly fine the way it was.

erosman commented 6 months ago

Can you explain a bit more?

The "Proxy by Patterns" option shows when there is at least ONE enabled proxy with a pattern.

image

lanmaster53 commented 6 months ago

Yep. I see that now.

Why does the option only exist if there is an include rule? Is there not an implicit include all? If not, why? Seems unintuitive. When I configure the proxy, it implicitly includes all. When I add a pattern, the proxy suddenly implicitly excludes all. This has not been the case historically and makes configuring one or more proxies with patterns confusing.

erosman commented 6 months ago

Seems unintuitive. When I configure the proxy, it implicitly includes all.

Many people would want to set a proxy for specific sites. That is what the patterns are there for.

When I add a pattern, the proxy suddenly implicitly excludes all.

Whatever you include will be proxied and whatever you exclude wont. The rest wont be proxied.

This has not been the case historically and makes configuring one or more proxies with patterns confusing.

FoxyProxy 8 gives the choice and control to the user to set patterns to suit their needs.

By definition. a pattern has to match something and that is whatever is in "include".

If you want to include all, there is an include all pattern.

If you are only using one proxy, and that is for all, there is a simpler way.

This way you will have 2 entries in the popup, "Disable" and the "proxy"

image

lanmaster53 commented 6 months ago

Seems unintuitive. When I configure the proxy, it implicitly includes all.

Many people would want to set a proxy for specific sites. That is what the patterns are there for.

When I add a pattern, the proxy suddenly implicitly excludes all.

Whatever you include will be proxied and whatever you exclude wont. The rest wont be proxied.

This has not been the case historically and makes configuring one or more proxies with patterns confusing.

FoxyProxy 8 gives the choice and control to the user to set patterns to suit their needs.

By definition. a pattern has to match something and that is whatever is in "include".

If you want to include all, there is an include all pattern.

  • Add an include all
  • Exclude whatever you want

If you are only using one proxy, and that is for all, there is a simpler way.

  • Don't add any patterns
  • Add the excludes to the Global Exclude
  • Instead of "Proxy by Patterns", select that individual proxy

This way you will have 2 entries in the popup, "Disable" and the "proxy"

image

This looks like a decent solution. Do Global Excludes officially support wildcards? According to my testing they do, but I want to confirm. What about regex?

erosman commented 6 months ago

This looks like a decent solution. Do Global Excludes officially support wildcards? According to my testing they do, but I want to confirm.

They do but there are considerations. You can read about them in the include Help under Global Exclude. Please note that the implementation is based on the browser passthrough/bypass list rules.

What about regex?

As bowsers don't support Regex in passthrough/bypass list, it is not supported.

lanmaster53 commented 6 months ago

Got it. The documentation isn't clear on wildcards at the end of URLs, such as for the TLD. How will an exclusion like *.example.* work as a global exclusion?

erosman commented 6 months ago

The documentation isn't clear on wildcards at the end of URLs, such as for the TLD. How will an exclusion like .example. work as a global exclusion?

It is not supported.

There are links in the Help to Chrome & Firefox documentation for the supported formats e.g. No Proxy for