• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bypass Network System Preferences for DNS lookup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bypass Network System Preferences for DNS lookup


  • Subject: Re: Bypass Network System Preferences for DNS lookup
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 2 Jul 2010 10:33:11 -0700

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Bypass Network System Preferences for DNS lookup
      • From: Michael Jackson <email@hidden>
    • Re: Bypass Network System Preferences for DNS lookup
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Bypass Network System Preferences for DNS lookup (From: Michael Jackson <email@hidden>)

  • Prev by Date: Re: iOS4: VOIP App
  • Next by Date: Re: Bypass Network System Preferences for DNS lookup
  • Previous by thread: Re: Bypass Network System Preferences for DNS lookup
  • Next by thread: Re: Bypass Network System Preferences for DNS lookup
  • Index(es):
    • Date
    • Thread