Firefox configure one hop (double) proxy

i once tried to do the same thing... i never made it, but my alternate solution was to open an ssh tunnel to the server hosting proxy B (through proxy A obviously because i had to), and with this tunnel I was able to do whatever i need to...

(i had to use proxytunnel http://proxytunnel.sourceforge.net/ because my proxy A needed NTLM authentication and proxytunnel was the only one i manage to auth with...)