[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Anyone want to add libcares support to wget?
From: |
Ben Greear |
Subject: |
Re: [Bug-wget] Anyone want to add libcares support to wget? |
Date: |
Tue, 15 Mar 2016 09:03:19 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 03/15/2016 01:47 AM, Tim Ruehsen wrote:
Hi Ben,
just for my understanding:
You want the DNS UDP packets being sent with src=88.1.1.10 and
dst=(88.2.1.1,88.2.1.2)... this means using the interface 88.1.1.10.
IMO, this is a routing (and resolv.conf) issue.
similar to this post:
http://www.linuxquestions.org/questions/solaris-opensolaris-20/multiple-domains-in-resolv-conf-802024/
Maybe I am wrong, in that case could you please add a detailed explanation,
environment, purpose ? Because if anyone is going to implement such a thing,
(s)he will need to build up a test environment and also add automated tests (+
extending the test suite).
I want to use wget on multi-homed machines, and I use routing rules to route
pkts
out specific interfaces based on the source IP.
So, I need to be able to bind to a local IP address, including for the resolver
logic,
which is why I want to use libcares.
To test, I think it would be sufficient to put two IPs on a port (1.1.1.1,
1.1.1.2), and then
use cmd-line args to choose one or the other. Sniff and watch for proper
source address.
For DNS servers, have 1.1.1.3 and 1.1.1.4 be specified. Sniff and watch to see
that the
resolver destination IP is as specified. This should be completely independent
of whatever
is in /etc/resolv.conf, etc.
I (and others) have patched libcares and curl in the past to handle all of this,
so I know libcares can do it. I think the main work is to handle new cmd-line
arguments, pass appropriate info to libcares, and make wget use libcares for
it's
resolve logic.
Thanks,
Ben
Regards, Tim
On Monday 14 March 2016 14:11:46 Ben Greear wrote:
I have a feature request that would likely be most
easily implemented by adding libcares support to the wget tool.
The feature is basically: Allow specifying local IP to bind to,
and specific DNS to use on the cmd line when using wget to download a web
site (recursively, to emulate a browser loading a page with images, etc).
Something like:
wget -l 0 -r --bind-address 88.1.1.10 --bind-dns-address 88.1.1.10
--dns-servers "88.2.1.1,88.2.1.2" http://88.1.1.1/
curl can do this with one URL, but I don't think it can easily be made to
download image content and similar.
If anyone is looking for a side project and wants to give this a try, please
let me know.
Thanks,
Ben
--
Ben Greear <address@hidden>
Candela Technologies Inc http://www.candelatech.com
- [Bug-wget] Anyone want to add libcares support to wget?, Ben Greear, 2016/03/14
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Tim Ruehsen, 2016/03/15
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Daniel Stenberg, 2016/03/15
- Re: [Bug-wget] Anyone want to add libcares support to wget?,
Ben Greear <=
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Ángel González, 2016/03/15
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Ben Greear, 2016/03/16
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Ángel González, 2016/03/16
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Giuseppe Scrivano, 2016/03/17
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Tim Ruehsen, 2016/03/17
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Ben Greear, 2016/03/17
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Giuseppe Scrivano, 2016/03/17
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Ben Greear, 2016/03/17
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Tim Ruehsen, 2016/03/18
- Re: [Bug-wget] Anyone want to add libcares support to wget?, Ben Greear, 2016/03/18