GithubHelp home page GithubHelp logo

foxyproxy / browser-extension Goto Github PK

View Code? Open in Web Editor NEW
195.0 195.0 29.0 17.5 MB

Version 8 and above. Browser extension source code for Firefox, Chrome, and other Chromium-based browsers

License: GNU General Public License v2.0

JavaScript 49.42% HTML 39.76% CSS 10.82%

browser-extension's People

Contributors

aneitel avatar deevroman avatar dmplace avatar ericjung avatar erosman avatar eshagh79 avatar r0htg0r avatar rijenkii avatar trimoon avatar webknjaz avatar yutayamate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

browser-extension's Issues

Broken CORS functionality with SOCKS5 proxy

When configured to use a SOCKS5 proxy for an address the web page doesn't work.

Example:

Result in Firefox "Web Developers Tools":

  • cdn.radiantmediatechs.com gets blocked with NS_ERROR_DOM_CORP_FAILED
    (and similar namespace errors for other sites that access URL's from within javascript)

image


Note

This same bug happens both in the old FoxyProxy-Standard from addons site, and this new v8 version...

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0 ID:20230915003051
(Latest snap version of Firefox on Kubuntu 23.04)

On startup Firefox connects directly, ignoring Foxyproxy rules

Firefox 108.0.2, Foxyproxy 7.5.1

Hi,
I have a few tabs open and when I close and reopen Firefox (I set the option to restore the tabs from the previous session) then Firefox connects directly to the web sites in the tabs, completely ignoring the rules set in Foxyproxy.
Btw, these connections do not show in the Foxyproxy log.

Is that a bug or expected?

Thanks for your help.

[Bug] V8 Import from older version is broken.

I just wanted to try this new version, so i exported my settings from the older version from "ff-add-ons" and tried to import it in this new version.
But it seems it has problems...

I have a few proxies setup with many rules that are mixed wildcard/RegExp...
image
This rule inside the backup-json looks like:

{
   "title": "ipv6 adress",
   "pattern": "^\\[([0-9]|:)+\\]",
   "type": 2,
   "protocols": 1,
   "active": true
},

Obviously you need to fix your import functionality, if you want more people to test πŸ˜‰
(Because people won't want to hand edit all their rules manually...)

Note

I will try to remove all the prepended *:// or *://* and appended / from the rules to see if they still work, but i think i need to hand edit as needed..


Warning

It seems these kind of default rule in the old version, seem to be broken also...
Not only because of the prepended/appended chars mentioned above, but because they were intended to check the HOSTNAM-PART's only...

"blackPatterns": [
{
   "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+)?(?:/.*)?$",
   "type": 2,
   "protocols": 1,
   "active": true
},
{
   "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+)?(?:/.*)?$",
   "type": 2,
   "protocols": 1,
   "active": true
},
{
   "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+)?(?:/.*)?$",
   "type": 2,
   "protocols": 1,
   "active": true
},

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...

Synced settings lost on new version

Hi,

extension updated to latest version and I lost all my settings synced over google account on chrome.

Can you please tell me is there any way I can recover my settings? I tried to enable/disable sync, but list is still empty.

FoxyProxy version: 8.1

Chrome is up to date
Version 119.0.6045.199 (Official Build) (arm64)

Prompt for SOCK5 authentication when accessing site via proxy

Hi,

I have a SOCKS5 proxy set up with authentication. I noticed the connection works if I save the credentials in FoxyProxy, but fails if credentials are not set.

I am in the position where I need authentication, but can't have the credentials permanently saved in the browser either. Would it be possible for FoxyProxy to have the option prompt for credentials when site is accessed, similar to the way HTTP Proxy works in vanilla Firefox?

Thanks!

after update I can't use no proxy mode

when my foxyproxy was updated, in direct mode it use system proxy and I don't want use system proxy. I want firefox just use direct access like old times foxyproxy wasn't updated is there any way to rollback old version. this version is sucks

PAC URL file:/// Unsupported

foxyproxy standard 8.2
firefox support local pac file. but foxyproxy seems doesn't support it
When fill PAC URL field with: file:///path/to/pacfilename.pac
error: Unsupported Protocol file:

connections to localhost are forwarded through the proxy

I use Foxyproxy Basic on Firefox to quickly turn on or off a proxy.
When a proxy is on, I cannot connect to my localhost services despite network.proxy.allow_hijacking_localhost being turned off.
I thus expected Foxyproxy to not interfere with localhost traffic or provide a way to not mess with it.

Unix domain socket SOCKS proxy support

On Firefox, FoxyProxy Classic supports configuring SOCKS proxy over Unix domain sockets. This is done by configuring a host of the form file:///path/to/socket. The port is ignored.

This does not seems to be working anymore with the new version of FoxyProxy. Using a Unix domain socket SOCKS proxy actually works with proxy.onRequest():

browser.proxy.onRequest.addListener(handleProxyRequest, {urls: ["<all_urls>"]});

function handleProxyRequest(requestInfo) {
  return {
    type: "socks",
    host: "file:///run/user/1000/proxy.socks",
    port: 9999,
    proxyDNS: true,
  };
}

[Improvement] Bring back the display of disabled templates in the popup window

A handy feature of this extension has disappeared in newer versions. I use several proxy templates, most of the time they are disabled, but sometimes I need to enable forced proxying from a specific template for all addresses. In FoxyProxy 7.5.1 this could be done in a popup window, in 8.2 the template is not shown if it is turned off. Now I have to go to the settings and turn on the template there first and then in the popup window, which is inconvenient

  • FoxyProxy Standard 8.2
  • Windows 10 22H2
  • Firefox 120.0.1

User Interface Design

User Interface Design

Arguably, designing the user interface (UI) is one of the most difficult part of any software development.

Intuitive

The word "intuitive" is often used when describing user interfaces. Cambridge Dictionary states:

intuitive
easy to use or learn without any special knowledge
It has a stunning and intuitive user interface.

In practice, people often refer to "what they know or used to" as intuitive. While simple software with very few settings can have an easy-to-use or intuitive user interface, a software with complex settings often requires "special knowledge".

As an analogy, old TVs had a few buttons and limited functions. Further developments resulted in more buttons and functions; which later changed to fewer button plus a remote-control. A few years ago, TVs still had some buttons on their side to operate in case of remote-control problems, but newer models no longer have any buttons. Remote-controls have also evolved to a point that require special knowledge to fully utilise all their functions.

User interface in cars have evolved greatly as well. When comparing the latest model with one from a few years ago, users may find a knob instead of a gear stick, or a button instead of a handbrake, or AC controls that are no longer visible and have to be accessed via a monitor. Majority of people know how to drive a car but using features of a modern car requires special knowledge. Even getting the spare tire in some cars requires reading the manual.
Steering wheel in some cars are on the left and some on the right (and a few in the middle). Some people find left hand drive cars as intuitive, and some the right hand drive cars.

There are extensive changes to the user interface between Windows 7 and Windows 10. The user interface in Firefox (and other browsers) have changed considerably over the years.
As an advanced user myself, when upgrading my mobile phone from Android 8 to Android 12, although I could operate the device, I had to search the internet (and still do) multiple times to learn how to do certain tasks.

It is also worth noting that software that maintain the same user interface for years are often reviewed as having an "aged user interface".

Read the Manual

RTM (and RTFM) used to be a catchphrase some years ago. Nowadays, users expect to operate devices and software without any knowledge and/or with most the basic knowledge, and label anything else as unintuitive. However that is rather shortsighted.
The best approach for software with complex features would be to provide an easy to access Help guide.

Practical Examples

Consider having 10 proxies, each with their own configurations, all on port 3128 and you want to change their ports to 443.

In one type of user interface, users have to:

  • Click the proxy and open a new tab/window with the settings for that proxy
  • Change port to 443
  • Click OK and close the new tab/window
  • Repeat above 10 times

In another type of user interface, users have to:

  • Click the proxy and change its port (no new tab/window)
  • Repeat above 10 times

With the first user interface, changing 10 ports on average takes many times longer than the second type.

In another similar example, let us consider userscript managers. There are 4 main userscript managers for Firefox & Chrome. The well established 3 use an interface type similar to the first type mentioned above.

When editing a userscript, users will have to:

  • Click the userscript edit button and open a new tab
  • Make the required edits
  • Click save
  • Click to go back tot he main interface
  • Repeat for each edit

FireMonkey on the other hand, has an all-in-one interface where users can switch between userscripts and make changes rapidly without hoping between tabs. FireMonkey has received comments calling it unintuitive which in realty means they are not used to it (and not interested to learn the benefits of the new user interface).

Clicking on pattern 'filter' icon leads to import tab

When editing the patterns for a proxy, clicking on the 'test' button (with blue beaker icon) leads to the Import tab, no the expected Tester tab.

It's a small enough fix:

diff --git a/src/content/options.js b/src/content/options.js
index 3bd176b..a0b45a7 100644
--- a/src/content/options.js
+++ b/src/content/options.js
@@ -78,7 +78,7 @@ class Options {
     // --- navigation
     this.navOptions = document.getElementById('nav3');
     this.navProxy = document.getElementById('nav4');
-    this.navTester = document.getElementById('nav5');
+    this.navTester = document.getElementById('nav6');

     // --- Incognito Access
     // https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/proxy/settings

(Note, I ran git config core.whitespace cr-at-eol locally as the codebase seems to mix CRLF and LF line endings, options.js uses CRLF)

Support for setting proxy setting via policy

Hi,

This is a continuation of Support for chrome.storage.managed for the pre-8.0 ForxyProxy.

Would be nice to be able to set proxy settings via policy and have the user not able to modify/remove settings (access to Add-on Manager can be disabled in Firefox Enterprise,via policy; possibly also in Chrome).

Is this still on the roadmap?

Thanks!

Connection timing out on SOCK5 proxies

When setting a sock5 proxy, any matching url gets timed out/infinite loads. The proxy is responsive as I can reach it using python/curl. Just unable to reach it with the extension

FoxyProxy Basic version: 8.2
Firefox: 120.0.1

Regex: icanhazip\.com
OR
Wildcard: *icanhazip.com*

firefox_YvbQvFWaV7

firefox_yI5iVmyeX0

import requests

proxies = {
    'http': f'socks5://{prox["socks"]}:{port}',
    'https': f'socks5://{prox["socks"]}:{port}'
}

r = requests.get('http://icanhazip.com', proxies=proxies)

print(r.text) // 104.XXX.XXX.XXX
$ curl -x "socks5://host:port" "http://icanhazip.com"
104.XXX.XXX.XXX

Authenticated SOCKS5 proxy not working in Chromium

I have installed the extension on the latest Chromium (Version 120.0.6099.71 (Official Build) (64-bit)), after adding a SOCKS5 proxy with user/pass authentication and enabling it all connections fail with the following message.

image

The proxy is from Private Internet Access (more information on hostnames/IPs/ports here https://helpdesk.privateinternetaccess.com/kb/articles/do-you-offer-a-socks5-proxy), I've exported my working configuration from Firefox and imported it into chromium, so the proxy itself is working just fine on the same version of FoxyProxy on Firefox. I've also tried the proxy manually with curl and it works fine as expected.

Here is another screenshot showing the exact same FoxyProxy config on both Firefox and Chromium, and the proxy only working with Firefox:

image

Things I've tried without success:

  • Reinstalling Chromium
  • Creating a new fresh Chromium profile
  • Disabling/enabling WebRTC in Chromium flags and extension checkbox
  • Disabling/enabling Proxy DNS
  • Reinstalling the extension
  • Adding the proxy manually instead of importing FoxyProxy settings from Firefox

If there is any additional log or information I can provide I'd be happy to do so. OS is Windows 10 x64.

Extension functionality is broken for non-PAC proxies

Hello, Thanks for efforts in making this extension better and better.

I tested latest git on Chrome, it doesn't work on anything else than PAC.

Selecting PAC proxies are working but by selecting any normal proxiy nothing happens

HTTPS/SSL type failure -- need option to not verify proxy's own cert

I have an Apache server at work I have been using as a proxy with FoxyProxy via an ssh tunnel for years successfully on port 80 with the proxy type of HTTP. I run from my laptop "ssh -L8080:proxy:80 sshgatewaybox" into my ssh gateway and this lets me access my internal only web services from outside the work firewall. The Apache server "proxy" is configure with

<IfModule mod_proxy.c>
     ProxyRequests On
     AllowCONNECT 8443
     AllowCONNECT 443
     AllowCONNECT 8080
     <Proxy *>
         Order deny,allow
         Deny from all
         Allow from 127.0.0.1
         Allow from IP_of_ssh_gateway_box
     </Proxy>
</IfModule>

<VirtualHost _default_:443>
...
...
SSLProxyEngine on
SSLProxyVerify require
...
...
</VirtualHost>

and FoxyProxy is setup with proxy type HTTP, host localhost, port 8080 and patterns to match my internal servers. This all has worked fine for years for both internal http and https sites.

But I decided to up my security game and get the communication to the proxy from the ssh gateway box to be over SSL too. So I modified FoxyProxy to proxy TYPE HTTPS/SSL, host localhost, port 8080 and changed my ssh to "ssh -L8080:proxy:443 sshgatewaybox"

Now all attemps to use the proxy fail with Firefox security warning SSL_ERROR_BAD_CERT_DOMAIN. The detailed message is basically:

Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for internalsite.domain. The certificate is only valid for the following names: proxy.domain
Basically now all sites appear to be using the proxy's certificate instead of their own certificate and Firefox throws the SSL_ERROR_BAD_CERT_DOMAIN error. I cannot even use the "Accept Risk and Continue" button as it just throws the same error again.

Even more weird is using the proxy to go to the proxy's own website fails saying:

Firefox does not trust this site because it uses a certificate that is not valid for proxy.domain. The certificate is only valid for the following names: proxy.domain

Which makes no sense since the names are the same!

I will add I am running 'tcpdump host proxy and port 443' on the internalsite box and never see any traffic so things are not getting past the proxy at all. And the Apache logs on the proxy show no useful messages about it. So it appears the issue is Firefox/FoxyProxy is just refusing to use the proxy at all. The proxy is using a fully valid certificate signed by a major CA

Is the issue that the FoxyProxy config has the host as localhost (since we are going over the ssh tunnel)?

Hmm. I just edited \Windows\System32\drivers\etc\hosts on my laptop to add the line

127.0.0.1 localhost proxy.domain

and changed the FoxyProxy config from localhost to proxy.domain and now it works.

So I guess this ticket is turning into a feature request in the proxy configuration where you can ask FoxyProxy to ignore (not verify) the certificate of the proxy itself when using type HTTPS/SSL

Feature Request - Searching from the popup

Hello

With a large list of proxies it becomes annoying to scroll looking for the location/proxy to use from the popup.
If possible a feature where maybe when hovering over the extension popup and pressing / for example, will allow filtering like in the options page

Thanks

Destructive vs Nondestructive Editing

Destructive vs Nondestructive Editing

For the purpose of this article, destructive editing refers to saving each action to disk, while nondestructive refers to having to click a button (i.e. SAVE) to write to disk.

Performance

Disk I/O operations are considerably resource intensive (especially for disk writers) and should be avoided when not imperative.

HDD/SSD Lifespan

The number of times that data can be written to a block on disk is limited. The more writes, the shorter the lifespan.
While it can be argued that the impact of a single extension on disk lifespan is infinitesimal, the disk lifespan consideration in software development is a worthy ethos. Modern devices nowadays run myriad of software and if all developers ignore the consideration, the accumulative impact would be quite considerable.

Furthermore, each disk write often involves many storage blocks (depending on the size of the data), and can results in subsequent disk writes. For example, a change in extension settings, may result in a change in browser settings, and subsequently a change in operating system settings.

Accident Prevention

There are occasions (e.g. in importing data) that due to user error (e.g. wrong data), extension bug, browser bug (also happens) and other reasons, data gets corrupted.

  • With destructive editing, data may be lost which can be painful for users with many custom settings
  • With nondestructive editing, user is able to check (and edit or discard) the result of the action before saving it to the disk for permanent storage

FIFO & Asynchronous Execution Order

While FIFO (first in, first out) is desired, the execution order of the asynchronous operations are not guaranteed. The issue is especially significant in disk write operations.

In addition to the discussion in Inconsistency: StorageArea callback order, I have personally experienced the issue in developing another extension (FIFO based rapid consecutive userscript storage writes in FireMonkey v2.68 resulted in data loss and had to be reverted in v2.70).

Consider the following examples:

Example 1

{
  a: 1,
  b: 2,
  c: 3
}

When saving a single simple value, absence of FIFO often does not cause any complications.

browser.storage.local.set({a: 10});
browser.storage.local.set({b: 20});

However, with complex values and overwriting, the final outcome is not guaranteed.

let pref = {a: 10, b: 20, c: 30};
browser.storage.local.set(pref);

pref = {a: 100, b: 200, c: 300};
browser.storage.local.set(pref);

Example 2

{
  a: {x: 1, y: 2, z: 3},
  b: {x: 4, y: 5, z: 6},
  c: {x: 7, y: 8, z: 9},
}
browser.storage.local.set({a: {x: 10, y: 2, z: 3}});
browser.storage.local.set({a: {x: 100, y: 2, z: 3}});

Multithreading & Multiprocessing

Modern software have been multithreading & multiprocessing for years to improve performance. Firefox started multiprocessing with v57 in 2017.
Consider the following execution order analogy in a 2 thread set-up showing the reason asynchronous execution Order is not FIFO.

op1 -> thread 1
op2 -> thread 2
op3 -> queued for thread 1 (disk write)
op4 -> queued for thread 2 (disk write)

  • If op1 completes before op2, op3 will start before op4
  • If op1 completes after op2, op3 will start after op4

Practical Example

Consider having 10 proxies, each with their own configurations, all on port 3128 and you want to change their ports to 443, and then move the last proxy to the top.

It should be noted that in this case, each storage.local.set results in some event listeners firing in the background script, and changes to the extension operational data.
It also results in proxy.settings.set disk write in browser configuration.
In case of having Sync enabled, each disk write would also result in corresponding storage.sync.set disk write.
In case of global browser Sync option, changes in browser configuration results in additional disk writes.

{
  a: {order: 1, port: 3128, ... },
  b: {order: 2, port: 3128, ... },
  c: {order: 3, port: 3128, ... },
  d: {order: 4, port: 3128, ... },
  e: {order: 5, port: 3128, ... },
  f: {order: 6, port: 3128, ... },
  g: {order: 7, port: 3128, ... },
  h: {order: 8, port: 3128, ... },
  i: {order: 9, port: 3128, ... },
  j: {order: 10, port: 3128, ... },
}

Destructive Editing

  • Change Port

    • Change port a to 443 => browser.storage.local.set(data)
    • Change port b to 443 => browser.storage.local.set(data)
    • Change port c to 443 => browser.storage.local.set(data)
    • Change port d to 443 => browser.storage.local.set(data)
    • Change port e to 443 => browser.storage.local.set(data)
    • Change port f to 443 => browser.storage.local.set(data)
    • Change port g to 443 => browser.storage.local.set(data)
    • Change port h to 443 => browser.storage.local.set(data)
    • Change port i to 443 => browser.storage.local.set(data)
    • Change port j to 443 => browser.storage.local.set(data)
  • Move

    • Move proxy from position 10 to 9 => browser.storage.local.set(data)
    • Move proxy from position 9 to 8 => browser.storage.local.set(data)
    • Move proxy from position 8 to 7 => browser.storage.local.set(data)
    • Move proxy from position 7 to 6 => browser.storage.local.set(data)
    • Move proxy from position 6 to 5 => browser.storage.local.set(data)
    • Move proxy from position 5 to 4 => browser.storage.local.set(data)
    • Move proxy from position 4 to 3 => browser.storage.local.set(data)
    • Move proxy from position 3 to 2 => browser.storage.local.set(data)
    • Move proxy from position 2 to 1 => browser.storage.local.set(data)

The mentioned process produces 19 disk writes which can become 57+ when considering secondary disk writes.
Due to the lack of guaranteed FIFO, the result of rapid consecutive disk writes is not guaranteed (e.g. in the above move example) .

Nondestructive Editing

  • Change Port

    • Change port a to 443
    • Change port b to 443
    • Change port c to 443
    • Change port d to 443
    • Change port e to 443
    • Change port f to 443
    • Change port g to 443
    • Change port h to 443
    • Change port i to 443
    • Change port j to 443
  • Move

    • Move proxy from position 10 to 9
    • Move proxy from position 9 to 8
    • Move proxy from position 8 to 7
    • Move proxy from position 7 to 6
    • Move proxy from position 6 to 5
    • Move proxy from position 5 to 4
    • Move proxy from position 4 to 3
    • Move proxy from position 3 to 2
    • Move proxy from position 2 to 1
  • Save

    • Click SAVE => browser.storage.local.set(data)

[UI] Button to directly open the Logs screen

As mentioned in #38 (comment):

Just a request, could you guys add a button on the popup to directly open the logs view like we have on the old version? 🀝
I wasn't able to do it because i'm too unfamiliar with the JS code, in particular i went as far as just adding the button on the popup and opening the options page but i didn't know how to make the button open the view directly...

CR+LF in many files.

I just noticed many, not all, of your source code files have CR+LF (\r\n) as line-endings, which might cause problems sooner or later.
CR+LF is a MicroShaft only encoding, all other OS's use a single LF (\n)...

  • find -exec file '{}' + | grep CRLF:
    (Executed in the directory where the git repo was cloned, just now)
./src/content/about.html:                                               HTML document, Unicode text, UTF-8 text, with CRLF line terminators
./src/content/app.js:                                                   JavaScript source, Unicode text, UTF-8 text, with CRLF line terminators
./src/content/background.html:                                          HTML document, ASCII text, with CRLF line terminators
./src/content/background.js:                                            JavaScript source, ASCII text, with CRLF line terminators
./src/content/default.css:                                              ASCII text, with CRLF line terminators
./src/content/help.html:                                                HTML document, Unicode text, UTF-8 text, with very long lines (365), with CRLF line terminators
./src/content/iframe.css:                                               Unicode text, UTF-8 text, with CRLF line terminators
./src/content/options.css:                                              Unicode text, UTF-8 text, with CRLF line terminators
./src/content/options.html:                                             HTML document, Unicode text, UTF-8 text, with CRLF line terminators
./src/content/popup.css:                                                ASCII text, with CRLF line terminators
./src/content/popup.html:                                               HTML document, ASCII text, with CRLF line terminators
./src/content/popup.js:                                                 JavaScript source, ASCII text, with CRLF line terminators
./src/content/options.js:                                               JavaScript source, Unicode text, UTF-8 text, with CRLF line terminators
./src/image/bin.svg:                                                    exported SGML document, ASCII text, with very long lines (481), with CRLF line terminators

AFAICS, most happened due to "file upload" instead of git push by a member πŸ˜‰
You might consider adding a .gitattributes file to fight this problem, see: https://www.git-scm.com/docs/gitattributes
(It will also make the total smaller for distributing 🀣)

πŸ––

Network detection feature.

Hello,

I make use of foxyproxy for people that work remotely, and seldom coming to office. Unfortunately, I could not make them care for changing foxyproxy to patterns mode when they leave our office. Is it possible to add a network detection method that conditionally changes proxies or turn it off? I mean, for example: if in 192.168.32.0/24 turn off. If not in 192.168.32.0/24 use patterns mode.

If this is acceptable as a feature request, I'd really appreciate to see such a thing in foxyproxy. Thank you for this great useful tool. You make a sysadmin's life easier.

All the best... :)

PS: I'd like to donate what I can, however, Paypal does not work in my country. Perhaps you might think adding USDT or BTC wallet info for donations.

Support instructions to install this version

Hi,
I've just come across FoxyProxy and see this new version emerging. Not sure if its ready for prime time - happy to be a tester πŸ‘
Perhaps some install from source instructions could be added to help.html? Or happy to wait for it to land in the Chrome store when ready.
thanks!
Nick

Does not work on LibreWolf (Firefox Fork)

Hello, foxyproxy v8 on Librewolf (116.0-1) is not proxying the requests, tried it on brave and works fine

Installed it using following commands

cd browser-extension/src
cp manifest-firefox.json manifest.json
zip -r foxyproxy_v8.xpi .

then disabled xpinstall.signatures.required and loaded it from about:addons

Proxies I am using:

  • SOCKS5 to a VPN internal wireguard socks proxy
  • Also tried TOR and a having a netcat connection on port 8080 to debug (while disconnected from the VPN) but no requests came in.

Was using the old version, when installed the new one, it automatically override the old one but kept the servers.

Things I tried:

  • Clearing/resetting and re-importing servers
  • uninstalling extension and installing again

1692313845-sshot

When hitting a rule that points to a PAC file, foxy tries to access it directly

  • Happening on Chrome Version 119.0.6045.199 (Official Build) (arm64)
  • Same issue with v8.2 tag (Checked it out a couple of minutes ago)
  • Same issue on the main branch
  • If I specify the PAC proxy directly, it works.
  • All other SOCK5 proxies are working.
  • Happens even if the PAC proxy is the first on the list and it has a catchall pattern.
    Not sure how to pull some logs under chrome

Lost settings after update

After latest update to 8.2 (9 of December) all previous proxy settings lost and now list is blank (((
MacOS Ventura, Firefox

Sync issue

Dear Dev,
I apologize for this bug report, as I'm probably missing something.
I noticed that this new version (8.0) is unable to synchronize either with the old version (Standard) or with itself installed on other devices.
Among the Firefox functions I can't find any debugging methods.
I've never actually had an account of yours, but I've always used Firefox sync.
Maybe this possibility no longer exists or not yet?
Thanks so much anyway for the clarification.
Domenico

Bugfixes needed to get the extension to work

I checked out the repository, created a symlink from manifest-firefox.json to manifest.json and got Firefox to accept it as a temporary add-on.

However, to get it to actually work with host patterns, I had to make the following changes:

diff --git a/src/content/on-request.js b/src/content/on-request.js
index 4b27023..b15ad91 100644
--- a/src/content/on-request.js
+++ b/src/content/on-request.js
@@ -53,7 +53,7 @@ class OnRequest {
   processPattern(url)  {
     if (!this.data[0]) { return {type: 'direct'}; }
 
-    const match = array => array.some(i => new RegExp(i.regex, 'i').test(url));
+    const match = array => array.some(i => new RegExp(i, 'i').test(url));
     for (const proxy of this.data) {
       if (!match(proxy.exclude) && match(proxy.include)) { return this.processProxy(proxy); }
     }
@@ -80,7 +80,7 @@ class OnRequest {
       // https://bugzilla.mozilla.org/show_bug.cgi?id=1794464
       // Allow HTTP authentication in proxy.onRequest
       // https://searchfox.org/mozilla-central/source/toolkit/components/extensions/ProxyChannelFilter.jsm#173
-      type === 'https' (res.proxyAuthorizationHeader = 'Basic ' + btoa(proxy.username + ':' + proxy.password));
+      type === 'https' && (res.proxyAuthorizationHeader = 'Basic ' + btoa(proxy.username + ':' + proxy.password));
     }
 
     console.log(res);

There's also an error syncing the settings, which I haven't tackled yet:

Uncaught (in promise) ReferenceError: can't access lexical declaration 'pref' before initialization
    syncIn moz-extension://88f4f524-24f0-44e5-bbaf-63d59e19c312/content/background.js:83
    onChanged moz-extension://88f4f524-24f0-44e5-bbaf-63d59e19c312/content/background.js:73
    init moz-extension://88f4f524-24f0-44e5-bbaf-63d59e19c312/content/background.js:48
background.js:83:16

It looks like line 91 should be moved up to before line 82.

Support OpenVPN profile?

I am using NordVPN.
NordVPN is slowly blocking http/https/socks5 proxies and forcing their browser extensions.
As of 2 months ago, the manual proxy stopped working.
No other browser extensions or external programs have a URL whitelist feature.

Toolbar popdown UI feels more bulky since the update

image

I think the previous one was much more compact... maybe a setting to get a compact popdown would be nice (I usually just switch between off/patterns and sometimes forcing a proxy for all urls)

There's also a strange white thingy around the colored dot in the icon.

Proxy bypassing stopped working in new version

proxy bypassing was working before, but after the update it stopped working.

proxy Type: HTTP Or WPAD URL in PAC URL
rule:
Include: Exclude
Type: Wildcard
pattern: *.mydev.team

all URLs which follow the patterns are not by-passing. still hitting the proxy

chrome version: 119.0.6045.199
foxyproxy: 8.1

Firefox Android: Proxies are not applied on v8.2

Regardless of FoxyProxy configuration, no connections attempt to use any proxy server.

Firefox Nightly 122.0a1 (Build #2015990567), a2268afaa0+
Huawei Mate 20 Pro, Emui 12 (Android 10)
My FoxyProxy was updated to 8.2 today, before that everything has always worked fine.
Unfortunately, I don't know which version I had previously, and sideloading other versions to test is impossible on android as far as I know.

Proxy basic auth

It seems not correctly used basic auth login/password.

I can't use with correct login/password pair.
In other places it's work, also with Firefox default proxy settings

Firefox starts very slowly with "proxy by pattern" after the big FoxyProxy update

I have a lot of tabs (hundreds). Previously Firefox started quite fast, maybe ~6 seconds. After the big FoxyProxy update it starts for about 3 minutes.
I use "proxy by pattern" and have several dozens of simple wildcard domain rules like *://*.medium.com/ (I remember them to be shorter/simpler before the update though..). If I use unconditional usage of proxy or just "disabled", Firefox starts fast again.

Add an option to disable "*.localhost" bypass

The previous version of FoxyProxy would allow you to proxy *.localhost domain names which makes it possible to remap some *.localhost domain names to :

Using *.localhost in this case is arguably semantically correct (as it is a local service) and currently makes it possible to host your HTTP service as a trusted context on Firefox.

However, this is not possible in the new version of the extension as it applies a global bypass for *.localhost which makes it impossible. While it is quite reasonable to have this protection by default, would it make sense to have an option to disable it ? (globally? per proxy?)

Caveats:

External IP/Location functionality

Could you please drop all code related to this functionality please?
IMHO: It has no place in an extension used for proxy configurations, and only serves to spy on users to provide adverts etc.

If a user wants to know it's own external IP there are many other ways instead of backing it into an extension whos main purpose is not related to that.

Incognito & Container Support

Incognito & Container Support

Support can be added for Firefox only.
See also: #27

User Interface

Incognito can be supported without any issues. However to support containers as well. there are 2 options for the User Interface:

1. Generic User Interface

Use a generic container list, not knowing or matching the number of containers the user has e.g.

  • Incognito
  • Container 1
  • Container 2
  • Container 3
  • Container 4

2. Specific User Interface

Get the container list contextualIdentities.query() and create the UI

Implementation

  • Incognito/Containers can be set to a specific proxy (not patterns or PAC URL)
  • Incognito/Container settings will have precedence over other settings (except Tab Proxy)

The checking order would be:

  1. Tab Proxy
  2. Incognito/Container Proxy
  3. Check for "Disable" mode
  4. Global Exclude
  5. PAC URL
  6. Proxy by Patterns or Individual Proxy

To decide

  • Should "Disable" disable everything?
  • Should Tab Proxy be independent of "Disable" since it has its own independent on/off?
  • Should Incognito/Container Proxy be independent of "Disable"?

Sync and Preferences: Import/Export

Container settings may mismatch, if the user has different containers on different browsers.

Hefty PayPal service fee

Thanks a lot for this super useful plugin.

I was about to donate the proposed 5.99$, when realizing that PayPal would charge a service fee of more than 50% (3.29$). This seems absurdly high.

image

Is there any other, cheaper, way to donate to this project?

icon doesn't change when proxy by pattern matches

Previously the icon changed and showed the proxy that was used when browsing. This was very helpful as I was able to monitor what was going on.

Now it only shows
image

Any chance you can bring back that functionality? If not, is there a way to install the old version?

feature request: "add exemption rule for this website" (i.e. not "this domain")

Hi

Coming back to my initial motivation for requesting this foxyproxy/firefox-extension#200
some sites have stuff included that breaks when accessed via a proxy (tor in this case), i.e. not the domain one is actually accessing is giving trouble but a "third party" domain. ("third party" for lack of a better word, because it’s sometimes not actually "third party", but "first party", yet a different domain.)
Sadly, the example I thought I had seems to work fine now, so I can’t give a proper example ATM.

Would it be possible to continue having rules based on domain of the actual request but additionally allow creating rules for some of the following

  • all requests made in this tab
  • all requests made in the context of loading $domain (loading something like maps.google.com would also cause requests to googleapis.com and I would like to be able to tell foxyproxy to treat all requests in the context of maps.google.com with the same rule)
  • all requests made by a given container

Thank you for considering!

Originally posted by @henk84 in foxyproxy/firefox-extension#200 (comment)

ping @Hideman85

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.