From:  Jason Duell <>
Date:  23 Feb 2013 06:28:02 Hong Kong Time

Re: Question on adding some network-related features.


On 02/22/2013 09:40 AM, Ben Greear wrote:
> Hello!
> I am interested in extending firefox so that it can bind to a specific
> local IP address (and network interface on Linux, using SO_BINDTODEVICE).

Can I ask what the use case is here?  The more useful the case, the more 
likely that we'd take the patches.  (Also depends on patch complexity).

You can probably tweak Firefox to use the NSPR "PR_Bind()" function to 
choose a client-side IP/port.  I don't know offhand if 
PR_SocketSetSocketOption supports SO_BINDTODEVICE--looks like that might 
require a patch to NSPR (which is a different product than Firefox, with 
different code owners), to add a field to PRSocketOptionData.

> I am also interested in adding c-ares support so I have better control
> over DNS requests.

You should follow

We're integrating libunbound to Firefox.  Probably not room for 2 DNS 
libs in the browser, but you could make your case if you think a 
different lib is better.

> Are these features something that might be accepted upstream?
> If so, are command-line arguments an acceptable way to allow
> such configuration?

Command line args might be a good way to go: you could also use 
about:config prefs.