DNS Lookup
Hi List, In Webkit, do we have any provision to provide application level DNS lookup map to route the particular URLs to a IP address? Similar like /private/etc/hosts file, trying to maintain a map at application level with DNS name as key and array of IP addresses, which will provide the webpage. When ever my application trigger a request to load a embedded web page, it would lookup at the DNS name and pick any of the responding IP address from the map. Understood, this is kind of Hackers way, looking for some workable APIs. Appreciated any third party libraries are available. - Apparao Mulpuri This email and any attachments are confidential, and may be legally privileged and protected by copyright. If you are not the intended recipient dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Any views or opinions are solely those of the sender. This communication is not intended to form a binding contract unless expressly indicated to the contrary and properly authorised. Any actions taken on the basis of this email are at the recipient's own risk. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: DNS Lookup
On 15 May 2014, at 14:15, Appa Rao Mulpuri appar...@ivycomptech.com wrote: Hi List, In Webkit, do we have any provision to provide application level DNS lookup map to route the particular URLs to a IP address? Similar like /private/etc/hosts file, trying to maintain a map at application level with DNS name as key and array of IP addresses, which will provide the webpage. When ever my application trigger a request to load a embedded web page, it would lookup at the DNS name and pick any of the responding IP address from the map. Understood, this is kind of Hackers way, looking for some workable APIs. Appreciated any third party libraries are available. WebKit uses the Cocoa URL loading system. You can register your own custom NSURLProtocol to override and handle URLs in almost any way you like. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Bypass Network System Preferences for DNS lookup
Is there any way to bypass the system network preferences for DNS servers to perform all DNS lookups from within a Cocoa app? For example, I would like my app to always make DNS queries to a particular pair of DNS servers. -- Michael Jackson http://mjijackson.com @mjijackson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
Afaik, no. Why would you do that? Sent from my iPhone4 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
On Jul 1, 2010, at 7:42 PM, Michael Jackson wrote: Is there any way to bypass the system network preferences for DNS servers to perform all DNS lookups from within a Cocoa app? For example, I would like my app to always make DNS queries to a particular pair of DNS servers. I’m pretty sure that’s not directly possible, since DNS lookups are done by a shared daemon process, not by individual apps. What you could do is incorporate direct DNS-lookup code into your app (I’m sure there are open-source libraries for it), use that to resolve the hostname to an IP address, and then use that IP address with your favorite networking APIs instead of the hostname. (If you’re using NSURLConnection, you’d need to transform the raw address into dotted-quad form, or the equivalent for IPv6.) —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
Afaik, no. Why would you do that? I don't know about the original sender's reason, but DNS servers are often the initial target of attacks. Then when you go to, say www.nike.com, the DNS server sends you the IP address of a malicious site. That site infects your browser, then redirects you to the original www.nike.com web site -- you never know you were just hit by a drive-by browser attack. In any case, this discussion should probably be re-directed to the darwin-kernel mailing list instead of Cocoa. Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
On Jul 1, 2010, at 9:42 PM, Michael Jackson wrote: Is there any way to bypass the system network preferences for DNS servers to perform all DNS lookups from within a Cocoa app? For example, I would like my app to always make DNS queries to a particular pair of DNS servers. -- Michael Jackson http://mjijackson.com @mjijackson ___ http://developer.apple.com/mac/library/documentation/Networking/Conceptual/SystemConfigFrameworks/SC_UnderstandSchema/SC_UnderstandSchema.html#//apple_ref/doc/uid/TP40001065-CH203-CHDIHDCG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
On Jul 1, 2010, at 9:42 PM, Michael Jackson wrote: Is there any way to bypass the system network preferences for DNS servers to perform all DNS lookups from within a Cocoa app? For example, I would like my app to always make DNS queries to a particular pair of DNS servers. As a starting point (following on from Jens' suggestion): http://sourceforge.net/projects/adns/. Nice, simple source code which you can hack around, liberal license. No doubt there are other options out there. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
Le 2 juil. 2010 à 19:33, Jens Alfke a écrit : On Jul 1, 2010, at 7:42 PM, Michael Jackson wrote: Is there any way to bypass the system network preferences for DNS servers to perform all DNS lookups from within a Cocoa app? For example, I would like my app to always make DNS queries to a particular pair of DNS servers. I’m pretty sure that’s not directly possible, since DNS lookups are done by a shared daemon process, not by individual apps. What you could do is incorporate direct DNS-lookup code into your app (I’m sure there are open-source libraries for it), use that to resolve the hostname to an IP address, and then use that IP address with your favorite networking APIs instead of the hostname. (If you’re using NSURLConnection, you’d need to transform the raw address into dotted-quad form, or the equivalent for IPv6.) FWIW, dig can do that, as you can specify a server when you use it to test DNS query: http://www.opensource.apple.com/source/bind9/bind9-31/bind9/bin/dig/ -- Jean-Daniel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
It should be possible using the dynamic store of the System Configuration framework. http://developer.apple.com/mac/library/documentation/Networking/Conceptual/SystemConfigFrameworks/SC_Components/SC_Components.html#//apple_ref/doc/uid/TP40001065-CH207-CHDDDCHG The documentation says that this store contains a snapshot of the current configured networking preferences, and it's constantly being updated by various Configuration Agents as conditions change (location, for example). The documentation also outlines the system configuration schema which is the complex data structure that contains all networking settings, among other things. My problem is that the schema is so complex, I can't figure out how to use it properly to change the DNS settings. As far as my intent goes, it's nothing malicious. I would simply like to make my app always query the same set of DNS servers for speed/security reasons. This shouldn't be a shocker to anyone who has ever worked on high security applications. Any help would be appreciated. Thanks, Michael -- Michael Jackson http://mjijackson.com @mjijackson On Fri, Jul 2, 2010 at 11:33 AM, Jens Alfke j...@mooseyard.com wrote: On Jul 1, 2010, at 7:42 PM, Michael Jackson wrote: Is there any way to bypass the system network preferences for DNS servers to perform all DNS lookups from within a Cocoa app? For example, I would like my app to always make DNS queries to a particular pair of DNS servers. I’m pretty sure that’s not directly possible, since DNS lookups are done by a shared daemon process, not by individual apps. What you could do is incorporate direct DNS-lookup code into your app (I’m sure there are open-source libraries for it), use that to resolve the hostname to an IP address, and then use that IP address with your favorite networking APIs instead of the hostname. (If you’re using NSURLConnection, you’d need to transform the raw address into dotted-quad form, or the equivalent for IPv6.) —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bypass Network System Preferences for DNS lookup
On Jul 2, 2010, at 3:54 PM, Michael Jackson wrote: I would simply like to make my app always query the same set of DNS servers for speed/security reasons. This shouldn't be a shocker to anyone who has ever worked on high security applications. Understandable. Just be aware that (a) your favorite DNS server may be slow if the computer is many hops away from it, (b) it may not be reachable at all if the computer is behind a firewall, and (c) it can still be spoofed if there are malicious/hacked routers in the way (unless you’re using DNS-Sec.) —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com