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 by patterns not recognized by default #164

Open
dromhost opened this issue Dec 4, 2024 · 5 comments
Open

Proxy by patterns not recognized by default #164

dromhost opened this issue Dec 4, 2024 · 5 comments
Labels
app: Firefox Specific to Firefox area: patterns Patterns related

Comments

@dromhost
Copy link

dromhost commented Dec 4, 2024

Firefox 133.0 (64-bit) Linux
FoxyProxy 8.9

When Firefox is restarted, FoxyProxy is set to "Proxy by Patterns", although this does not happen. Patterns are not working.
If I click "Disable", and then "Proxy by Patterns" again, things start working by the added patterns. If I forget when restarting Firefox, security is compromized since proxies are not used at all.

Please advise

@erosman erosman added app: Firefox Specific to Firefox area: patterns Patterns related labels Dec 4, 2024
@erosman
Copy link
Collaborator

erosman commented Dec 4, 2024

Can you paste the exported settings of FoxyProxy?
(remove private data before pasting)

@dromhost
Copy link
Author

dromhost commented Dec 6, 2024

Thanks @erosman
This is the exported .json with some data removed.

{
  "mode": "pattern",
  "sync": true,
  "autoBackup": false,
  "passthrough": "",
  "theme": "",
  "container": {
    "incognito": "",
    "container-1": "",
    "container-2": "",
    "container-3": "",
    "container-4": ""
  },
  "commands": {
    "setProxy": "",
    "setTabProxy": "",
    "quickAdd": ""
  },
  "data": [
    {
      "active": true,
      "title": "ssh35393",
      "type": "socks5",
      "hostname": "127.0.0.1",
      "port": "35393",
      "username": "",
      "password": "",
      "cc": "",
      "city": "",
      "color": "#cc1cc9",
      "pac": "",
      "pacString": "",
      "proxyDNS": true,
      "include": [
        {
          "type": "wildcard",
          "title": "*binsearch*",
          "pattern": "*://*binsearch*/",
          "active": true
        },
        {
          "type": "wildcard",
          "title": "*whatismyip*",
          "pattern": "*whatismyip*",
          "active": true
        },
        {
          "type": "wildcard",
          "title": "*duckduckgo*",
          "pattern": "*duckduckgo*",
          "active": true
        },
        {
          "type": "wildcard",
          "title": "*canyouseeme*",
          "pattern": "*canyouseeme*",
          "active": true
        },
      ],
      "exclude": [
        {
          "type": "regex",
          "title": "local hostnames (usually no dots in the name). Pattern exists because 'Do not use this proxy for localhost and intranet/private IP addresses' is checked.",
          "pattern": "^[^:]+://(?:[^:@/]+(?::[^@/]+)?@)?(?:localhost|127\\.\\d+\\.\\d+\\.\\d+)(?::\\d+)?(?:/.*)?/",
          "active": true
        },
        {
          "type": "regex",
          "title": "local subnets (IANA reserved address space). Pattern exists because 'Do not use this proxy for localhost and intranet/private IP addresses' is checked.",
          "pattern": "^[^:]+://(?:[^:@/]+(?::[^@/]+)?@)?(?:192\\.168\\.\\d+\\.\\d+|10\\.\\d+\\.\\d+\\.\\d+|172\\.(?:1[6789]|2[0-9]|3[01])\\.\\d+\\.\\d+)(?::\\d+)?(?:/.*)?/",
          "active": true
        },
        {
          "type": "regex",
          "title": "localhost - matches the local host optionally prefixed by a user:password authentication string and optionally suffixed by a port number. The entire local subnet (127.0.0.0/8) matches. Pattern exists because 'Do not use this proxy for localhost and intranet/private IP addresses' is checked.",
          "pattern": "^[^:]+://(?:[^:@/]+(?::[^@/]+)?@)?[\\w-]+(?::\\d+)?(?:/.*)?/",
          "active": true
        }
      ]
    },
      ],
    }
  ],
  "showPatternProxy": false
}

@erosman
Copy link
Collaborator

erosman commented Dec 6, 2024

Although it should not cause any problems, the settings seems to be imported from older versions of FoxyProxy (pre v8) and uses older type patterns.
It might be useful to update those.

As mentioned in the included Help...

Wildcard
Leading or trailing * is not necessary

*whatismyip* would be the same as whatismyip (which is better)

AFA excludes ...

  • if they are Global (for all proxies), then it would be more efficient to use Global Exclude
  • If they are not global, then using the v8 ready-made patterns (via Quick Add) should be more efficient and easier to maintain

@dromhost
Copy link
Author

dromhost commented Dec 6, 2024

Thanks again @erosman
Good clean suggestions on patterns. Was not aware of the change. Implemented and working well now.

Global Exclude: You mean something like below?

{
"include": "exclude",
"type": "regex",
"title": "All",
"pattern": "\S+",
"active": true
}

Still I can reproduce the original error. Any other leads? I've been using FoxyProxy for more than a decade and it has been a life saver. But the 8.2 update screwed things up big time with settings being lost, and this started happening then. I haven't had time to look into it for something like a year.

Thanks for your time and input into FP!

@erosman
Copy link
Collaborator

erosman commented Dec 7, 2024

Global Exclude: You mean something like below?

Global Exclude is found on the Options Tab in FoxyProxy settings.
The included Help has information on how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: Firefox Specific to Firefox area: patterns Patterns related
Projects
None yet
Development

No branches or pull requests

2 participants