cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Multiple --interface options for better dual-stack support?

From: Harry Strongburg <harry.curl_at_harry.lu>
Date: Wed, 24 Nov 2010 07:30:44 +0000

On Tue, Nov 23, 2010 at 11:12:07PM -0800, Dan Fandrich wrote:
> On Tue, Nov 23, 2010 at 08:36:00AM +0000, Harry Strongburg wrote:
> > I am wondering if there's a way to have multiple --interface options.
> > The cURL docs say "If this option is used several times, the last one
> > will be used"; I am wondering if there is a chance this could be
> > changed.
> >
> > Reasoning: better dual-stack support for interfaces. I think cURL should
> > read both --interface options, and use whichever one works. For example:
> > > curl --interface 2001:etc:etc:: --interface 1.2.3.4 http://ip6.me/
> > cURL should get the DNS result of the site ip6.me - it will see it has
> > an AAAA record, so it should use the IPv6 --interface supplied. Using
> > http://ip4.me/ will work as well - it will see there is only an A
> > record, so it will only try the IPv4 --interface.
> >
> > If this suggestion even gets accepted, possibably cURL could have an
> > --iface4 and --iface6 if you want to keep the classic approach to
> > --interface (maybe?). It would be a lot better for cURL to accept
> > numerous --interfaces, but --iface4/6 would also be just as swell.
>
> Assuming the interface to be used is the same in both cases, can you not
> just supply the interface name to get this behaviour?

There are often more than one IPv6 addressed per interface name. Even
for me, my eth1 has over 20 different IPv6 addresses assigned to it.

The interface name would probably work okay for the IPv4-side, but not
for IPv6 and/or dualstacked connections. :)
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-24