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

Integrated tester incorrectly wrong results #92

Closed TheNec closed 5 months ago

TheNec commented 6 months ago

Hello. I was one of the guys with the update problem (btw. 8.6 doesn't solve it automatically).

I needed to downgrade, export, update, import and now the proxies and the settings are back but the regexes (edit: and wildcards) do not work as they seem to be converted wrong. Luckily I only had one regex by me which could be recreated fast but the automatically created also don't work.

Edit: I found the problem(s)

  1. My regex was wrong in the exported file from the old version which is a bit curious because I'm sure it worked before...
  2. The import adds slashes to the end of each pattern which results in mydomain.com/index working but mydomain.com not!

Thanks for FoxyProxy and kind regards! :D

PS The Tester result symbol should flash or something when consecutive wrong or correct tests occur and it would be cool if the patterns would work without a http(s) at the beginning like before

erosman commented 6 months ago

The import adds slashes to the end of each pattern which results in mydomain.com/index working but mydomain.com not!

FoxyProxy v7 had only hostname matching. When tested against a URL, the slashes were added.

Although Firefox address-bar shows example.com, if you copy it, it becomes https://example.com/ There is always a forward slash at the end of the host.

it would be cool if the patterns would work without a http(s) at the beginning like before

it would work but it would be better to be more precise in the patterns. All these would work for mydomain.com

Wildcard

Regular Expression

Please check the included Help for more information.

TheNec commented 6 months ago

Ah sorry! My OP reads like that the patterns don't work in firefox which I didn't know when writing it because after recognizing the wrong regex rule I used the integrated tester for the others that showed only errors...

Although Firefox address-bar shows [example.com](http://example.com), if you copy it, it becomes https://example.com/ There is always a forward slash at the end of the host.

I know but shouldn't the tester then ignore the missing slash at the end of the url or at least add a hint or something? Because if you say FoxyProxy still works the tester shows a red error x when it is missing.

Wildcard

* `[mydomain.com](http://mydomain.com)`

* `://[mydomain.com/](http://mydomain.com/)` (more precise)

Regular Expression

* `mydomain\.com`

* `^[^:]+://mydomain\.com/` (more precise)

This may be more precise but would not work for hosts/subdomains which could cause a leakage!

erosman commented 6 months ago

I know but shouldn't the tester then ignore the missing slash at the end of the url or at least add a hint or something?

Firefox doesn't show the slash but it is there. The tester can only test what is given and can not guess. There are many patterns that don't require a slash at the end.

This may be more precise but would not work for hosts/subdomains which could cause a leakage!

Wildcard: ://*.mydomain.com/ (more precise with possible subdomains)