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

FoxyProxy is incompatible with the SpoofDPI proxy server #121

Closed vukitoso closed 5 months ago

vukitoso commented 5 months ago

Hi.

FreeBSD 13.2 Firefox 121.0.1 FoxyProxy 8.8

Installed the SpoofDPI server on the local HTTPS machine - https://github.com/xvzc/SpoofDPI Launched SpoofDPI as 127.0.0.1:8080

When you add HTTPS proxy 127.0.0.1:8080 from SpoofDPI to FoxyProxy, the connection is not established, in the SpoofDPI logs there is gibberish. If you add proxy 127.0.0.1:8080 to the Firefox system settings (without FoxyProxy), then connections are established, everything is fine. Everything works fine via curl too: curl -v -I -X GET --proxy 127.0.0.1:8080 https://facebook.com

I assume that the problem is somewhere in FoxyProxy. Thx.

erosman commented 5 months ago

When you add HTTPS proxy 127.0.0.1:8080 from SpoofDPI to FoxyProxy,

127.0.0.1:8080 should be HTTP proxy (not HTTPS). Try setting the "Type" to HTTP and check again.

vukitoso commented 5 months ago

127.0.0.1:8080 should be HTTP proxy (not HTTPS). Try setting the "Type" to HTTP and check again.

Thanks, it worked. I didn’t know that the HTTP proxy supports the HTTP CONNECT method and through which HTTPS can work successfully. I thought HTTP was pure HTTP, without HTTPS.

erosman commented 5 months ago

I didn’t know that the HTTP proxy supports the HTTP CONNECT method and through which HTTPS can work successfully. I thought HTTP was pure HTTP, without HTTPS.

That was how proxies behaved in the early days. Sadly, Firefox's build-in proxy option still works that way (Bug 1804693: Setting single proxy for all fails). That means HTTP proxy for HTTP target and HTTPS proxy for HTTPS target. That was designed when HTTPS was new and very few sites used it.

Modern proxy servers forward requests and the proxy server's own protocol is not relevant to the forwarding. The final SSL communication and decryption still happen between browser & the target site.