GithubHelp home page GithubHelp logo

Comments (16)

erosman avatar erosman commented on August 16, 2024 1

There is actually a bug in the pattern conversion. I am going to fix it.

from browser-extension.

ericjung avatar ericjung commented on August 16, 2024 1

and wrote it to the disk

https://github.com/foxyproxy/firefox-extension/blob/master/src/scripts/background.js#L14

There is no reason to write to disk unless the background page can be unloaded? It can be kept in a 500 element in-memory array.

there were never any complaints about performance of 7.x. You are sacrificing excellent functionality β€” why people choose FoxyProxyβ€” to maximize performance of an edge case. Logging is an edge case that is rarely used. But when it is used, users should be able to correlate a URL with a proxy that loads it. If I have 15 or more proxies, and multiple URLs to track down which proxy loaded it, the current log is useless because I will spend an inordinate amount of time and have to take notes on which proxy loads which url.

from browser-extension.

ericjung avatar ericjung commented on August 16, 2024

Thank you. Do you have any wildcard patterns? Did they import successfully?

from browser-extension.

agamotto avatar agamotto commented on August 16, 2024

Not sure if related or not, but with extension upgrade to 8.0. my configured proxies are gone. Where can I find them and import them?

from browser-extension.

erosman avatar erosman commented on August 16, 2024

Not sure if related or not, but with extension upgrade to 8.0. my configured proxies are gone. Where can I find them and import them?

Was the upgrade for FoxyProxy Basic on Firefox?
If so, it would be a different issue.

from browser-extension.

agamotto avatar agamotto commented on August 16, 2024

Not sure if related or not, but with extension upgrade to 8.0. my configured proxies are gone. Where can I find them and import them?

Was the upgrade for FoxyProxy Basic on Firefox? If so, it would be a different issue.

Yes it was on Firefox (latest 117.0.1), it just updated FoxyProxy Basic automatically but configurations were gone.

from browser-extension.

erosman avatar erosman commented on August 16, 2024

Do you have a backup?

from browser-extension.

TriMoon avatar TriMoon commented on August 16, 2024

@ericjung
Thank you. Do you have any wildcard patterns? Did they import successfully?

Yes i have many, and no they didn't import successfully as i mentioned in the OP...


@erosman

The error says it all. The regular expression has errors. Please fix the error and try again. [0-9] requires a repeat value.
FoxyProxy v8.0 checks the patterns for errors before saving them (previous versions didn't but failed later when matching).

The regExp in the backup has NO-ERRORS, it is the translation while importing that has error...

FoxyProxy originally supported full URL matching patterns. Due to some API limitations, it was later changed to host matching patterns in the Firefox version. FoxyProxy v8.0 supports full URL patterns matching in v8.0 again.

I understand that's why i suggested you to split into parts for the user and your code.
That way you can both import backups from the current old version AND allow users to explicitly enter regExp for the page parts.

  • [!Important]
    I think you need to separate your patterns into protocol, hostname, and eventual path patterns in your new version, and import into the hostname patterns only. The protocol part could be made a select-list, while the other two definitely need separate input boxes and code to check only those parts of the URL...

Your code NEEDS 3 separate values to correctly check the URL: https://some.web.site:80/page1/index.html

  1. Protocol part = https in example above.
    This can be a string or enum in your code.
    The String is in case you will allow users to enter freestyle text fe. ws instead of the standard http or https, otherwise you can make it an enum only that the user can select from a drop-down listing.
  2. Host part = some.web.site:80 in example above.
    This can be a string or regExp.
    This is to be able to properly import previous backups which only supported hostnames.
  3. Path part = page1/index.html in example above.
    This can be a string, regExp or null.
    This will be the page address after the hostname.
    This is to be able to properly import previous backups which only supported hostnames.

Without the above you won't be able tobe "backward-compatible"...

from browser-extension.

TriMoon avatar TriMoon commented on August 16, 2024

Please keep in mind the old-rules, in backup, i gave in OP because people WILL have used that kind...

I'll be waiting to pull the changes and test on my side πŸ‘

from browser-extension.

erosman avatar erosman commented on August 16, 2024

Repo updated with a fix (fingers crossed).

from browser-extension.

erosman avatar erosman commented on August 16, 2024

Oops.. there was a typo... repo updated

from browser-extension.

TriMoon avatar TriMoon commented on August 16, 2024

πŸ‘ Seems it's fixed now, no errors while importing from older version backup...

Will need to check all rules later when i have time, but looks good so far πŸ‘


Just one note though, unrelated to this issue:
Can the LOG screen please show the name of the proxy used instead of it's address?
Name of the proxy the user has set is much more useful, maybe also color the lines using the color of that proxy...
πŸ‘

image

from browser-extension.

erosman avatar erosman commented on August 16, 2024

The log is generated from a separate independent process which doesn't have access to the saved data. It prints direct from the data provided by Firefox.

It would also be easier to correlate the log with external network monitors.

from browser-extension.

ericjung avatar ericjung commented on August 16, 2024

The 7.x and earlier versions display the name of the proxy and it’s colors in the log, as I remember.

from browser-extension.

erosman avatar erosman commented on August 16, 2024

Updated: (correction)

v7.* logged every connection at the time of matching, and kept it in RAM in the background script. In MV3 background script gets unloaded.

v8.0 has a live log. It starts when the Options page opens and stops when the page is closed.

Please also note ...

Proposal: Provide documentation and reporting for browser's slow extension warnings
https://github.com/w3c/webextensions/issues/456

https://searchfox.org/mozilla-central/source/dom/ipc/ProcessHangMonitor.cpp#63-86
"EXTENSION NAME" is slowing down Firefox. To speed up your browser, stop that extension. Learn more

https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/warning_set.cc;l=71-80;bpv=1;bpt=1
This extension is slowing down Google Chrome. You should disable it to restore Google Chrome's performance.

from browser-extension.

erosman avatar erosman commented on August 16, 2024

In MV3 background page will be unloaded.

https://github.com/foxyproxy/firefox-extension/blob/a3598e1c7f0237ee50e8a13a59dec265462c38a6/src/scripts/log.js#L33-L41

runtime.getBackgroundPage()
Retrieves the Window object for the background page running inside the current extension. If the background page is non-persistent (an event page) and it is not running, the background page is started.

from browser-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.