Open Bug 1854324 Opened 1 year ago Updated 10 months ago

proxy.onRequest failure to bypass proxy for localhost

Categories

(WebExtensions :: Request Handling, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: eros_uk, Unassigned)

Details

(Whiteboard: [design-decision-needed])

Connections to localhost, 127.0.0.1/8, and ::1 are never proxied.

There are 2 main proxying API in Firefox:

Chrome only has proxy.settings.

localhost

  • proxy.settings in both Firefox and Chrome implement a default bypass/pass-through for localhost
  • proxy.onRequest does not appear to have the above default bypass

In addition to the unexpected behaviour, there are security considerations associated with proxying localhost.

The question is, shouldn't proxy.onRequest have a default bypass/pass-through for localhost to maintain the uniformity of the policy?


See also:

Severity: -- → N/A
Type: defect → enhancement
Priority: -- → P3
Whiteboard: [design-decision-needed]

For what it's worth, proxying *.localhost is quite useful for mapping Unix-domain-socket-bound services into http://*.localhost URIs (https://github.com/randomstuff/soxidizer): *.localhost have the good taste of being considered as secure contexts.

However, proxying localhost URIs to remote servers is certainly problematic and considering proxied *.localhost services as secure contexts might not make much sense either.

For reference, bug entry for FoxyProxy about the ability to disable the localhost bypass: https://github.com/foxyproxy/browser-extension/issues/50

You need to log in before you can comment on or make changes to this bug.