One way around this problem is to prevent the HTTP proxy from having to perform the DNS lookup at all.

Notice that in the HTTP request we specify the domain name of the website twice: in the URL; and in the "Host" directive. The proxy [should] resolve the domain found in the URL (not the "Host" directive, which is purely information for the web server), but if this domain is actually already an IP address then no lookup is necessary.

GET http://123.45.678.90/search?q=lolphin HTTP/1.1
Host: www.google.com
Connection: close

The "Host" directive is left untouched so the web server still knows what domain name we want to access.

Unfortunately Firefox itself doesn't provide a way to force this behaviour; Firefox always performs DNS lookups through a proxy server if you've defined one.

Update: It's a known bug [1] — apparently relevant only when using an automatic proxy configuration file (".pac") — that's being tracked [2]. It seems the lookups in the PAC specifically are the problem; these are what Firefox uses to determine what proxy server to use based on the requested site's address.

In the meantime the problem can be alleviated by entering proxy details directly in the "Manual Proxy Configuration" area; this is not a robust solution as any changes to the network configuration could render your manual configuration obsolete. However it will prevent proxied lookups from blocking the browser's main thread, which causes a momentary hang.


[1] http://kb.mozillazine.org/Firefox_hangs
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=235853