Compare commits

..
249 Commits
Author SHA1 Message Date
Frank Denis 024ed9d287 Add a meta-installer 2012-10-12 13:28:08 -07:00
Frank Denis cbe7f394ee Use csh instead of ksh. Because ksh occasionally likes to dereference a NULL
pointer on Mountain Lion.
2012-10-11 14:15:43 -07:00
Frank Denis b83a2f514c Move the Uninstall button to the right again. 2012-10-11 14:11:12 -07:00
Frank Denis 362c2043eb www.opendns.com can take more than 5 sec to load, so check connectivity
with guide.opendns.com instead.
2012-10-10 22:22:34 -07:00
Frank Denis 6602c4ab5d Remove the focus before displaying the help page for the advanced settings. 2012-10-10 16:27:35 -07:00
Frank Denis c4c4748352 chmod, then chown 2012-10-10 15:25:38 -07:00
Frank Denis 7ed00f4a7a Enforce a few permissions. 2012-10-10 15:24:33 -07:00
Frank Denis 8aa0f90f16 Remove controls of plugins we don't ship any more. 2012-10-10 14:53:37 -07:00
Frank Denis 07c8f437b4 True dat. Detection of IPv6 connectivity is faster now. 2012-10-10 14:18:14 -07:00
Frank Denis 07900f384b A variable assignment can reset $?. Fix IPv6 detection. 2012-10-10 14:14:16 -07:00
Frank Denis ebfd2eead8 Update package for dnscrypt-proxy 1.2.0 and OSX UI 0.19 2012-10-10 13:56:51 -07:00
Frank Denis 43bc6e81d4 Can? Are. 2012-10-10 13:50:05 -07:00
Frank Denis 263d24c5e6 Ship the AAAA plugin and automatically enable it on IPv4-only networks. 2012-10-10 13:48:36 -07:00
Frank Denis a664db7d22 libldns update 2012-10-10 13:42:42 -07:00
Frank Denis bf7c7534cf Update ChangeLog 2012-10-10 13:36:31 -07:00
Frank Denis 9234cd2362 So, the next version will be 0.19. 2012-10-09 14:25:30 -07:00
Frank Denis 85277fd597 Remove dead scripts. 2012-10-09 14:21:59 -07:00
Frank Denis 1ddd8d28d6 Remove doc about removed stuff. 2012-10-09 14:19:47 -07:00
Frank Denis 8ab74b6406 Remove stuff 2012-10-09 14:18:14 -07:00
Frank Denis bf0d5a0eb5 Adjust the layout 2012-10-09 14:14:08 -07:00
Frank Denis 6285a75499 Remove. Stuff. 2012-10-09 14:06:06 -07:00
Frank Denis 9ee80347f5 127.0.0.54 => $INTERFACE_PROXY 2012-10-05 17:38:18 -07:00
Frank Denis 63e6052caf Update ldns 2012-10-03 16:55:53 -07:00
Frank Denis 2647aadad8 Re-enable JS for the feedback form 2012-10-03 10:08:45 -07:00
Frank Denis 6020eb8505 Grammar 2012-10-03 08:37:13 -07:00
Frank Denis d5f551de8a 0.18 2012-10-03 08:21:43 -07:00
Frank Denis 1c8e2e4fa1 Update release notes. 2012-10-03 08:15:28 -07:00
Frank Denis 093ab54300 Explain that a tool like dig(1) shouldn't be use in order to check if
an exception works.
2012-10-03 05:51:42 -07:00
Frank Denis d15252db40 Keep everything sorted, thanks. 2012-10-02 11:26:54 -07:00
Frank Denis 50dc9a9382 Add freebox.fr to the list of exceptions for things like mafreebox.freebox.fr 2012-10-02 11:25:33 -07:00
Frank Denis 75d3983289 Change "enable OpenDNS" to "always use OpenDNS" and
"enable FamilyShield" to "always use FamilyShield" in the
preference pane, too, in order to be in line with the
menu bar.
Suggested by G.D. Wolfman, thanks!
2012-10-02 07:14:59 -07:00
Frank Denis 24227488db Use 0.17.1 in the package. 2012-10-02 07:14:10 -07:00
Frank Denis cbfa42cb3a Moving on. Next will be 0.18 2012-09-29 15:22:55 +02:00
Frank Denis 2f6ab604fc Use static resolvers, if provided, in order to resolve names bypassing OpenDNS 2012-09-29 15:08:44 +02:00
Frank Denis 7bea3fbc63 Rename DNSCrypt-OSX.mpkg to DNSCrypt.mpkg in order to make Sparkle happy 2012-09-29 14:55:35 +02:00
Frank Denis a790696cdc names => domains 2012-09-29 14:40:02 +02:00
Frank Denis e9ef33c652 Invert the logic, save 2 bytes, yay. 2012-09-28 22:42:43 +02:00
Frank Denis 0bc15a0b7d Typo 2012-09-28 22:35:11 +02:00
Frank Denis 4ee0bee8bf Add entries for dnscrypt-proxy and hostip to the application firewall. 2012-09-28 21:51:45 +02:00
Frank Denis 1953182435 Add README.markdown 2012-09-28 19:07:16 +02:00
Frank Denis dfb93446e6 Not -dev any more 2012-09-28 18:48:46 +02:00
Frank Denis 982c9de99f Use opendns/welcome/ to that people know if they are using OpenDNS or not.
Switch to https by the way.
2012-09-28 18:42:07 +02:00
Frank Denis 26c4efbfd8 0.17 will be released today. 2012-09-28 00:52:38 +02:00
Frank Denis 3b6db0ef37 Remove old exceptions 2012-09-28 00:47:33 +02:00
Frank Denis 5e16b57247 DOMAINS_EXCEPTIONS_FILE => EXCEPTIONS_FILE 2012-09-28 00:17:59 +02:00
Frank Denis 92a8b0b097 Handle exceptions 2012-09-27 23:13:40 +02:00
Frank Denis fde1ebff46 domains-exceptions -> exceptions 2012-09-27 23:13:26 +02:00
Frank Denis 1dc4493321 Add update-exceptions.sh 2012-09-27 22:49:23 +02:00
Frank Denis 7b6f59025e Add a default background color for the help page. 2012-09-27 15:28:38 +02:00
Frank Denis 9193375610 Make the help webview opaque. 2012-09-27 15:22:47 +02:00
Frank Denis ce39c0b767 Move the "uninstall" button to the left, because having it at the same place
as the "help" button is probably a terrible idea.
2012-09-27 15:15:39 +02:00
Frank Denis 1a40da6a28 Define less capabilities for webviews 2012-09-27 15:10:18 +02:00
Frank Denis c5037615fb Update the release notes. 2012-09-27 15:01:59 +02:00
Frank Denis f1b8f2bfa6 Help for the advanced settings pane. 2012-09-27 14:44:56 +02:00
Frank Denis 22cbc2809b Never block opendns.com 2012-09-27 14:40:59 +02:00
Frank Denis 08e745dc2b Revert "Prepare a window for the "help" button."
This reverts commit 8048d73038.
2012-09-27 02:44:46 +02:00
Frank Denis 1369f07a58 Remove the query log file after a reboot. 2012-09-26 16:57:54 +02:00
Frank Denis 7a2e79b04e Let the uninstaller remove /var/log/dnscrypt-query.log 2012-09-26 16:50:05 +02:00
Frank Denis 8048d73038 Prepare a window for the "help" button. 2012-09-26 16:48:38 +02:00
Frank Denis f9728ffd45 Improve the way plugin files are parsed. One option per line. 2012-09-26 14:29:39 +02:00
Frank Denis 9ffa57ba8d Replace wrappers with symlinks 2012-09-26 14:26:10 +02:00
Frank Denis 6fb79a786d Remove alarmer/dnscrypt-proxy/hostip wrappers 2012-09-26 14:25:30 +02:00
Frank Denis 74c860fdfb Fix --ips vs --domains 2012-09-26 11:38:15 +02:00
Frank Denis 3234989005 Temporary files should die as soon as possible. 2012-09-26 11:35:48 +02:00
Frank Denis 7b976aaa33 Remove empty blacklist-domains and/or blacklist-ips files. 2012-09-26 11:34:20 +02:00
Frank Denis 11969f98da Call update-(ips|domains) when blacklists are updated. 2012-09-26 11:18:45 +02:00
Frank Denis 951b3df6a9 Rename switch-blacklist-(ips|domains)-on.sh to update-(ips|domains).sh 2012-09-26 11:18:25 +02:00
Frank Denis 0388eb87d8 Add scripts for switching IPs and domains blacklists on and off. 2012-09-26 11:12:59 +02:00
Frank Denis 582c1eb9a7 Read/write IPs and domains blacklists. 2012-09-26 10:41:07 +02:00
Frank Denis b5578e94e1 Add network settings lock-in support. 2012-09-26 00:07:33 +02:00
Frank Denis 3782b2851b Add network settings lock-in scripts. 2012-09-26 00:00:46 +02:00
Frank Denis 901537f8d5 Enable "View log" button. 2012-09-25 23:10:16 +02:00
Frank Denis b8c538e4aa Add query logging 2012-09-25 23:02:09 +02:00
Frank Denis f16b2c2717 Add support for advanced parental controls, move the whole thing to 0.17 beta. 2012-09-25 22:40:45 +02:00
Frank Denis 578362d2f3 No need to be so verbose. 2012-09-25 21:16:22 +02:00
Frank Denis 8786d2df3a Add the user interface version and the dnscrypt version to feedback messages.
Requested by the OpenDNS support team.
2012-09-25 21:13:35 +02:00
Frank Denis 8ef1d62cbd Typo 2012-09-25 02:17:35 +02:00
Frank Denis 052febc509 Set static resolvers from the preferences pane. 2012-09-24 09:33:38 +02:00
Frank Denis e889c387e1 Disable all checkboxes by default. 2012-09-24 08:46:46 +02:00
Frank Denis 97350f2207 Rephrase 2012-09-24 08:46:15 +02:00
Frank Denis 55cd65f0ad Add set-static-resolvers.sh 2012-09-24 08:45:58 +02:00
Frank Denis 9f10b681dc Change tab ids 2012-09-23 23:54:24 +02:00
Frank Denis df1e23bef7 Slightly change the way plugin-related control files are handled.
A plugins.enabled file is required for plugins to be enabled.
The content of that file is concatened with optional plugin-*.enabled files
in order to build the list of enabled plugins.
Using shell globbing for that is utterly disgusting. I couldn't agree more.
2012-09-23 23:16:36 +02:00
Frank Denis f5678bdd45 Add the path to libldns to the paths the linker will look at. 2012-09-23 22:15:14 +02:00
Frank Denis 507a09aa47 Ship a copy of libldns. 2012-09-23 22:09:48 +02:00
Frank Denis c381885f6a Bundle the uninstaller with the preference pane. Suggested by ScienceGuy, thanks! 2012-09-21 23:06:39 +02:00
Frank Denis 4112c0c19a Regen 2012-09-20 00:29:12 +02:00
Frank Denis 796b767e47 September 7th, 2012 was a Friday. 2012-09-20 00:28:50 +02:00
Frank Denis 0b219ce84c Update ChangeLog 2012-09-19 22:40:27 +02:00
Frank Denis 690ccf46b0 Properly handle multiple plugins when starting the proxy. 2012-09-19 22:15:52 +02:00
Frank Denis d1f8cb7d47 Update for Xcode 4.5 2012-09-19 22:00:52 +02:00
Frank Denis 36c6b64fd8 Bundle Sparkle 2012-09-19 21:58:04 +02:00
Frank Denis 31d640f631 0.16 2012-09-19 21:46:31 +02:00
Frank Denis 7e3135fe86 Add preliminary support for static DNS settings. 2012-09-18 23:07:09 +02:00
Frank Denis 64a6e8612b Load two (optional) config files: domains-exceptions and plugins. 2012-09-16 21:57:08 +02:00
Frank Denis 3fc0e7520f Move Sparkle XML file to Github like the OpenDNS Windows client. 2012-09-12 21:58:15 -07:00
Frank Denis ef41f7c045 Bring back Sparkle, updated. 2012-09-12 21:48:58 -07:00
Frank Denis 8e2ddfeb09 Remove the old Sparkle framework 2012-09-12 21:47:38 -07:00
Frank Denis ba17c08475 pkill -HUP mDNSResponder in addition to dscacheutil -flushcache in order to
flush the DNS cache after switching to different resolvers.
2012-09-09 13:48:30 -07:00
Frank Denis be119200b0 Be more liberal with the /Library/Application Support/DNSCrypt perms. 2012-09-07 14:23:41 -07:00
Frank Denis a9d5162dd4 chmod 755 "$DNSCRYPT_VAR_BASE_DIR" because the default perms are too restrictive. 2012-09-07 14:21:51 -07:00
Frank Denis 35b6f29267 sign 0.15 packages 2012-09-07 11:41:14 -07:00
Frank Denis 50e259112c Bump installer version to 0.15 2012-09-07 11:37:38 -07:00
Frank Denis 61c30c56df Prepare for release 0.15 of the OSX GUI. 2012-09-07 11:33:20 -07:00
Frank Denis 1e36414f46 Uninstall the dnscrypt plugins, too. 2012-09-06 10:57:17 -07:00
Frank Denis cfff4c9145 Regen 2012-08-20 17:18:51 -07:00
Frank Denis 0e9ebd325e Only chown/chmod the control dir if the permissions on the parent doesn't
match the current console owner.
If things go bad, it will make them even worse, but it avoids triggering
handle-control-change when not necessary.
2012-08-18 10:18:31 -07:00
Frank Denis d06b75393c Add nowtv.com to the list of exceptions.
Looks like a necessary evil.
2012-08-16 20:18:36 -07:00
Frank Denis 16a6ea8ff6 Add fritz.box to the list of domain exceptions. 2012-08-16 07:41:05 -07:00
Frank Denis 9da622c3fb Uninstaller: cd to the script directory before reverting to dhcp 2012-08-11 09:20:40 -07:00
Frank Denis c5bc5be9f7 Have the uninstaller uninstall files from GUI versions > 0.10 2012-08-10 21:40:04 -07:00
Frank Denis fe647a75c0 0.14 2012-08-08 12:14:41 -07:00
Frank Denis 58da45dd08 Compile the preference pane with gcc, for dead old OSX versions. 2012-08-08 12:01:55 -07:00
Frank Denis 7b6246a569 Synthesize tabView/aboutTabViewItem/releaseNotesTabViewItem. 2012-08-08 11:36:50 -07:00
Frank Denis 611bae452c Cope with possibly missing html files. 2012-08-08 10:36:17 -07:00
Frank Denis e517ebad51 Remove the about/release notes tabs for 10.7, too. 2012-08-08 09:15:22 -07:00
Frank Denis dcb209aa2c Remove about/release notes on OSX 10.6. 2012-08-08 08:53:22 -07:00
Frank Denis 8475fe5287 alloc/init the pipe instead of using an autoreleased object 2012-08-08 02:00:50 -07:00
Frank Denis 9aa4fea0ed Require restart after a menu bar app update. 2012-08-08 01:37:26 -07:00
Frank Denis 4ec53b807f 0.13 2012-08-08 01:36:07 -07:00
Frank Denis 33d17cdcd2 Support OSX 10.6 again. 2012-08-08 01:30:15 -07:00
Frank Denis e3c16df9fc Update release notes. 2012-08-08 01:25:41 -07:00
Frank Denis fcaae563c9 Kill NSLog() 2012-08-08 01:17:40 -07:00
Frank Denis 2a1aaa33b9 Have opendnsButtonPressed actually disable OpenDNS 2012-08-08 01:13:05 -07:00
Frank Denis 35277a3e08 Back to 64 bit 2012-08-08 00:36:39 -07:00
Frank Denis 0f8823d73d un-arc the pref pane 2012-08-08 00:36:39 -07:00
Frank Denis ed1c7d679c Embed about & release notes, so that these files can eventually match the current app. 2012-08-08 00:36:39 -07:00
Frank Denis ebfc8e667a More reordering for old Xcode versions. 2012-08-08 00:36:39 -07:00
Frank Denis 1ce77e1aee Reorder functions to make old Xcode versions happy. 2012-08-08 00:36:39 -07:00
Frank Denis 5d4ba56a8d hamlize the "about" page. 2012-08-08 00:36:39 -07:00
Frank Denis b6e5cf0427 Update and hamlize release notes. 2012-08-08 00:36:39 -07:00
Frank Denis 39a64fb476 Die, screen.css 2012-08-08 00:36:39 -07:00
Frank Denis e41fd947f0 Update the pages and php code with what we ((could|should) have used|will use) 2012-08-08 00:36:39 -07:00
Frank Denis 11826e20ee Don't install on OSX 10.6 and older. 2012-08-08 00:36:38 -07:00
Frank Denis 7fca88fc2d Head towards 0.13 2012-08-08 00:36:31 -07:00
Frank Denis 4b53063514 Explicitly flush the DNS cache after switching to a new resolver. 2012-08-07 10:36:23 -07:00
Frank Denis edc601496f Some code snippets come from dnssec-trigger. Mention it. 2012-08-07 10:31:13 -07:00
Frank Denis 0123713679 If there is a default domain, skip that. Don't add it as an exception. 2012-08-06 17:23:43 -07:00
Frank Denis 813c57887f Add a script to retrieve the current default domain name. 2012-08-06 17:10:19 -07:00
Frank Denis a2931c9c59 Create a dmg file in addition to the zip archive. 2012-08-06 17:09:14 -07:00
Frank Denis 62598b6337 Remove .local from the exceptions list. 2012-08-04 09:51:51 -07:00
Frank Denis 0753a619b8 Don't use daemon for probes. For now. 2012-08-03 14:17:48 -07:00
Frank Denis ca3580e327 Unfuck dnscrypt probes, and switch to use daemon. 2012-08-03 13:56:59 -07:00
Frank Denis 15c3ec2c42 Import uninstall script 2012-08-03 08:20:51 -07:00
Frank Denis 233d423deb Grmbl, old OSX versions didn't ship with pgrep(1). 2012-08-03 00:00:33 -07:00
Frank Denis b9a864f1c4 Be more hardcore when trying to restart the proxy. 2012-08-02 23:47:13 -07:00
Frank Denis 0471289968 Move the dnscrypt-proxy pid to /var/run 2012-08-02 23:27:46 -07:00
Frank Denis 01368b42ff Improve postinstall scripts and add a signature script. 2012-08-02 22:12:47 -07:00
Frank Denis af55b22493 shit =======> gold 2012-08-02 20:39:19 -07:00
Frank Denis 72ecb1c56a Add an afterboot script. 2012-08-02 19:57:33 -07:00
Frank Denis 42b0611d79 Check for 127.0.0.54 without dnscrypt during each round. 2012-08-02 19:46:25 -07:00
Frank Denis 376092962d If the curent active resolver is 127.0.0.54 but dnscrypt-proxy
is not running, start it or revert to dhcp.
2012-08-02 18:42:39 -07:00
Frank Denis d210ac5875 Move tickets to their own dir and make everything much much much faster 2012-08-02 18:20:40 -07:00
Frank Denis 6e56c04d96 Always create a ticket first here, too. 2012-08-02 18:11:59 -07:00
Frank Denis d8bd82ee52 Always create tickets first. 2012-08-02 18:09:49 -07:00
Frank Denis 6e547708a4 Interrupt attempts at using dnscrypt if the configuration changes. 2012-08-02 16:54:29 -07:00
Frank Denis 68c7f3d378 Add wrappers 2012-08-01 22:36:54 -07:00
Frank Denis e8a7f9988f Use absolute paths 2012-08-01 21:57:57 -07:00
Frank Denis 1db9d0e00e Use bin/ not sbin/ for hostip. 2012-08-01 17:29:18 -07:00
Frank Denis 3a4e290079 Add pre/postinstall scripts for the menu bar. 2012-08-01 17:03:43 -07:00
Frank Denis be69e9d200 Make the installer run the pre/post install scripts. 2012-08-01 16:44:48 -07:00
Frank Denis 3de444ed8c Add pre/postinstall scripts for the pref pane. Ditch dnscrypt-updater leftovers 2012-08-01 16:43:41 -07:00
Frank Denis a341b38ad7 Import alarmer 2012-08-01 16:30:04 -07:00
Frank Denis 93706a1b4c Update installer 2012-08-01 16:22:24 -07:00
Frank Denis f11b636efd Don't install this configupdater shit 2012-08-01 16:17:25 -07:00
Frank Denis 63974a384c Build for 64 bit archs for now 2012-08-01 16:15:27 -07:00
Frank Denis 4a8b22bc39 chmod +x exceptions-remove.sh 2012-08-01 15:58:53 -07:00
Frank Denis 2862c40e93 Automatically add/remove exceptions. 2012-08-01 15:56:35 -07:00
Frank Denis ea2203f26e Add scripts for adding/removing standard exceptions 2012-08-01 15:54:09 -07:00
Frank Denis a863680347 Move scripts to extra/usr/scripts 2012-08-01 15:00:25 -07:00
Frank Denis 9dd5cce583 Move the CU2 scripts to the pref pane. 2012-08-01 14:18:44 -07:00
Frank Denis 8d1d1707ea Use tickets in the menu bar app, too 2012-08-01 11:50:11 -07:00
Frank Denis ecf19099d8 shit => gold 2012-08-01 11:16:11 -07:00
Frank Denis a25da8424d Add a script to get the tickets count 2012-08-01 10:49:35 -07:00
Frank Denis ca334b322b Have the scripts handle tickets 2012-08-01 10:46:43 -07:00
Frank Denis c8f6eae98f Add a new script to push tickets 2012-08-01 10:37:38 -07:00
Frank Denis 5f6ac70941 Increase delay 2012-08-01 10:37:27 -07:00
Frank Denis 113c73bff9 There is no "TCP/443" checkbox. 2012-08-01 08:58:26 -07:00
Frank Denis 3a91b5b62b Disable the interface during updates. 2012-08-01 08:56:26 -07:00
Frank Denis 82c7f52841 Less strict locks 2012-08-01 00:59:25 -07:00
Frank Denis c2ccecd970 Use /var/run/ for locks. 2012-08-01 00:27:07 -07:00
Frank Denis 8f7da57704 Add locks 2012-08-01 00:10:53 -07:00
Frank Denis 48d850e6b8 Synchronize UI changes between the menu bar and the pref pane. 2012-07-31 23:43:32 -07:00
Frank Denis 2d0ff03ed5 Improve dnscrypt peer descriptions. 2012-07-31 23:17:48 -07:00
Frank Denis 480bd8fbb9 Almost done 2012-07-31 23:09:25 -07:00
Frank Denis 366d077bfb Make the checkboxes work 2012-07-31 22:54:23 -07:00
Frank Denis 6c86b8e676 Import initialization from the menubar app 2012-07-31 22:45:20 -07:00
Frank Denis 66e8e84187 Cleaning... 2012-07-31 22:20:31 -07:00
Frank Denis edcf64910d Spring cleaning, continued 2012-07-31 22:16:34 -07:00
Frank Denis 2050ea2ace Start the sprint cleaning of the pref pane 2012-07-31 22:09:53 -07:00
Frank Denis d1e6732dfd Remove TCP/443 from the pref pane, add Familyshield 2012-07-31 21:56:59 -07:00
Frank Denis e62278c189 Compile for 32 bit platforms, too. 2012-07-31 21:51:27 -07:00
Frank Denis 77e5ccf21c Don't use ARC so that we are compatible with 32-bit CPUs 2012-07-31 21:45:19 -07:00
Frank Denis a6c09091fd Bump version to 0.12, remove leftovers 2012-07-31 21:12:12 -07:00
Frank Denis 33e9218884 Add support for the fallback to insecure thing to the menubar thing. 2012-07-31 21:06:45 -07:00
Frank Denis 5c9a393c49 Display the unavailable icon when updating. - Incomplete. 2012-07-31 20:16:09 -07:00
Frank Denis 9551962ca2 Improve resolver description 2012-07-31 19:55:23 -07:00
Frank Denis 033993c9d7 Pasto 2012-07-31 19:47:27 -07:00
Frank Denis 92ba5b55d7 Add get-upstream-resolvers.sh 2012-07-31 19:40:19 -07:00
Frank Denis b94597cd75 Add descriptions 2012-07-31 19:38:11 -07:00
Frank Denis 64d76e3dbb Use TXT queries, introduce switch-to*sh 2012-07-31 18:50:06 -07:00
Frank Denis 7a78f8de10 Allow toggling dnscrypt from the menu bar 2012-07-31 17:32:28 -07:00
Frank Denis f3e11a2b41 Add get-current-resolvers.sh 2012-07-31 17:19:01 -07:00
Frank Denis 1a7bac56e8 get-current-resolvers.sh -> get-dhcp-resolvers.sh 2012-07-31 17:13:50 -07:00
Frank Denis 8a35f0a195 Unfuck start-dnscrypt-proxy.sh 2012-07-31 17:09:07 -07:00
Frank Denis 1255358bb7 Update paths for plist files 2012-07-31 14:34:16 -07:00
Frank Denis e435ad0cde Change paths. Scripts can be part of the pref pane. 2012-07-31 14:17:01 -07:00
Frank Denis 567463d459 Add get-resolvers-description.sh 2012-07-30 15:55:18 -07:00
Frank Denis b04fab35de Factorize get-current-resolvers.sh 2012-07-30 15:39:17 -07:00
Frank Denis e7d7f1566a Add a script to get the current resolvers 2012-07-30 15:36:58 -07:00
Frank Denis 5227d90e37 Add a state file to indicate an ongoing update. 2012-07-30 14:59:38 -07:00
Frank Denis b449925fc2 Watch utmpx in addition to /dev/console, don't keepalive, don't throttle. 2012-07-30 13:59:52 -07:00
Frank Denis a265d6cbda Make handle-console-change more gentle 2012-07-30 13:49:22 -07:00
Frank Denis bad6220be7 Bummer. Watching /dev/console is not supported by launchd. 2012-07-30 13:37:07 -07:00
Frank Denis 6ce06d32b3 Play it dangerously and remove the throttle interval for controle and control changes 2012-07-30 13:26:24 -07:00
Frank Denis cecddb7388 Change permissions when the console owner changes 2012-07-30 13:04:15 -07:00
Frank Denis 72d6ec858e Add plist files for watching the console, changing controls, etc. 2012-07-30 13:03:21 -07:00
Frank Denis 58f045ea86 Always revert to dhcp right after a network change. 2012-07-30 12:44:11 -07:00
Frank Denis 8611fc0df5 Use explicit paths 2012-07-30 12:39:12 -07:00
Frank Denis 42444b5652 Add extra paths to $PATH 2012-07-30 11:50:26 -07:00
Frank Denis 82d3ac7dfc If it ain't runnin' don't stop it. 2012-07-30 11:42:21 -07:00
Frank Denis cacdbcd206 Update DNSCRYPT_BASE_DIR
Yes, still a hard-coded location.
2012-07-30 11:27:04 -07:00
Frank Denis bb7bcf904c ipconfig can sometimes complain that the label name is > 63 chars 2012-07-30 10:32:19 -07:00
Frank Denis da08e06073 Don't run set-dns.sh without a list of IPs 2012-07-30 00:29:43 -07:00
Frank Denis db09e8c166 Farewell, dns-updater. You won't be missed. 2012-07-30 00:12:30 -07:00
Frank Denis 9408c5ff85 Add the code for the HTML pages loaded by the OSX client. 2012-07-30 00:11:04 -07:00
Frank Denis ff291efce8 In a network change, don't switch to dhcp unless dnscrypt was on. 2012-07-29 23:42:28 -07:00
Frank Denis bb108bdb18 Add a simple handler for control changes. 2012-07-29 23:29:47 -07:00
Frank Denis e6a94b0ca1 Add stop-dnscrypt-proxy.sh 2012-07-29 23:22:26 -07:00
Frank Denis 2d1a08a9e7 Add switch-to-dhcp 2012-07-29 23:15:37 -07:00
Frank Denis a4a77873dd handle-network-change only needs /bin/sh 2012-07-29 23:09:36 -07:00
Frank Denis 6abc72e0ce Use different scripts for handling network changes and switching to dnscrypt 2012-07-29 23:07:16 -07:00
Frank Denis 0b0f81c7aa Prepare for Familyshield support. 2012-07-29 22:48:53 -07:00
Frank Denis 511767f848 Control fallback and other stuff from files 2012-07-29 22:40:31 -07:00
Frank Denis f9a7da871a Introduce a bunch of scripts to start the proxy, cope with captive portals,
and replace this infamous and totally broken dns-updater horror.
2012-07-29 22:12:33 -07:00
Frank Denis d126bd5784 Don't use --resolver-port. 2012-07-15 17:27:37 -07:00
Frank Denis aa17fc1e61 Update menubar icons. 2012-06-21 17:14:09 -07:00
Frank Denis 22e5a2b21a The --tcp-port option doesn't exist any more, remove it from the prefpane. 2012-06-18 22:18:26 -07:00
Frank Denis e494714688 The --tcp-port switch has been removed a long time ago. 2012-06-18 22:16:14 -07:00
Frank Denis 999188e6ba Update to XCode 4.5 2012-06-18 22:03:03 -07:00
Frank Denis 5db8107281 Replace "unprotected" with "unencrypted" when OpenDNS is used without dnscrypt. 2012-04-16 19:01:41 +02:00
Frank Denis c24d0dcc32 There are no bridges any more without ARC. 2012-04-16 19:01:14 +02:00
Frank Denis c7b7664348 Remove backups 2012-04-16 19:00:39 +02:00
Frank Denis 63678ec24d Disable ARC in the preference pane. 2012-04-16 18:59:49 +02:00
Frank Denis d3262fbbd8 Import the OSX installer, made with Packages. 2012-02-29 22:27:01 -08:00
Frank Denis 0d235b3de1 0.10 2012-01-12 15:33:01 -08:00
Frank Denis fcdcfd6798 Work around the fact that webviews didn't always load on Snow Leopard. 2012-01-12 15:16:46 -08:00
Frank Denis 3a9f5df94a So I guess the next version will be 0.10 2012-01-12 13:19:59 -08:00
Frank Denis 747ab5b650 Replace the orange dot in the dnscrypt icon with a green one. 2012-01-11 18:23:56 -08:00
470 changed files with 7485 additions and 3610 deletions
-15
View File
@@ -1,15 +0,0 @@
/*
* Copyright (c) 2011 OpenDNS, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
@@ -1,267 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
09080E931458B8DB00A85DAE /* SocketListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 09080E921458B8DB00A85DAE /* SocketListener.m */; };
09080E971458DDE300A85DAE /* DNSUpdater.m in Sources */ = {isa = PBXBuildFile; fileRef = 09080E961458DDE300A85DAE /* DNSUpdater.m */; };
097388CE1456007900EAF57F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 097388CD1456007900EAF57F /* Foundation.framework */; };
097388D11456007900EAF57F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 097388D01456007900EAF57F /* main.m */; };
097388DC145600E600EAF57F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 097388DB145600E600EAF57F /* SystemConfiguration.framework */; };
09859652145669720037CE16 /* DNSGlobalSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 09859651145669720037CE16 /* DNSGlobalSettings.m */; };
09C03F83145A29C1009804EF /* ProxySpawner.m in Sources */ = {isa = PBXBuildFile; fileRef = 09C03F82145A29C1009804EF /* ProxySpawner.m */; };
09E8DB95145FB58E00B1DECF /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09E8DB94145FB58E00B1DECF /* CoreServices.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
097388C71456007900EAF57F /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
09080E911458B8DB00A85DAE /* SocketListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketListener.h; sourceTree = "<group>"; };
09080E921458B8DB00A85DAE /* SocketListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SocketListener.m; sourceTree = "<group>"; };
09080E951458DDE300A85DAE /* DNSUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSUpdater.h; sourceTree = "<group>"; };
09080E961458DDE300A85DAE /* DNSUpdater.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DNSUpdater.m; sourceTree = "<group>"; };
097388C91456007900EAF57F /* dns-updater */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "dns-updater"; sourceTree = BUILT_PRODUCTS_DIR; };
097388CD1456007900EAF57F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
097388D01456007900EAF57F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
097388D31456007900EAF57F /* dns-updater-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "dns-updater-Prefix.pch"; sourceTree = "<group>"; };
097388DB145600E600EAF57F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
09859650145669720037CE16 /* DNSGlobalSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSGlobalSettings.h; sourceTree = "<group>"; };
09859651145669720037CE16 /* DNSGlobalSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DNSGlobalSettings.m; sourceTree = "<group>"; };
09C03F81145A29C1009804EF /* ProxySpawner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxySpawner.h; sourceTree = "<group>"; };
09C03F82145A29C1009804EF /* ProxySpawner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProxySpawner.m; sourceTree = "<group>"; };
09E8DB94145FB58E00B1DECF /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
097388C61456007900EAF57F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
09E8DB95145FB58E00B1DECF /* CoreServices.framework in Frameworks */,
097388CE1456007900EAF57F /* Foundation.framework in Frameworks */,
097388DC145600E600EAF57F /* SystemConfiguration.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
097388BE1456007900EAF57F = {
isa = PBXGroup;
children = (
097388CF1456007900EAF57F /* dns-updater */,
097388CC1456007900EAF57F /* Frameworks */,
097388CA1456007900EAF57F /* Products */,
);
sourceTree = "<group>";
};
097388CA1456007900EAF57F /* Products */ = {
isa = PBXGroup;
children = (
097388C91456007900EAF57F /* dns-updater */,
);
name = Products;
sourceTree = "<group>";
};
097388CC1456007900EAF57F /* Frameworks */ = {
isa = PBXGroup;
children = (
09E8DB94145FB58E00B1DECF /* CoreServices.framework */,
097388CD1456007900EAF57F /* Foundation.framework */,
097388DB145600E600EAF57F /* SystemConfiguration.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
097388CF1456007900EAF57F /* dns-updater */ = {
isa = PBXGroup;
children = (
097388D01456007900EAF57F /* main.m */,
09080E951458DDE300A85DAE /* DNSUpdater.h */,
09080E961458DDE300A85DAE /* DNSUpdater.m */,
09859650145669720037CE16 /* DNSGlobalSettings.h */,
09859651145669720037CE16 /* DNSGlobalSettings.m */,
09C03F81145A29C1009804EF /* ProxySpawner.h */,
09C03F82145A29C1009804EF /* ProxySpawner.m */,
09080E911458B8DB00A85DAE /* SocketListener.h */,
09080E921458B8DB00A85DAE /* SocketListener.m */,
097388D21456007900EAF57F /* Supporting Files */,
);
path = "dns-updater";
sourceTree = "<group>";
};
097388D21456007900EAF57F /* Supporting Files */ = {
isa = PBXGroup;
children = (
097388D31456007900EAF57F /* dns-updater-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
097388C81456007900EAF57F /* dns-updater */ = {
isa = PBXNativeTarget;
buildConfigurationList = 097388D81456007900EAF57F /* Build configuration list for PBXNativeTarget "dns-updater" */;
buildPhases = (
097388C51456007900EAF57F /* Sources */,
097388C61456007900EAF57F /* Frameworks */,
097388C71456007900EAF57F /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = "dns-updater";
productName = "dns-updater";
productReference = 097388C91456007900EAF57F /* dns-updater */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
097388C01456007900EAF57F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
};
buildConfigurationList = 097388C31456007900EAF57F /* Build configuration list for PBXProject "dns-updater" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 097388BE1456007900EAF57F;
productRefGroup = 097388CA1456007900EAF57F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
097388C81456007900EAF57F /* dns-updater */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
097388C51456007900EAF57F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
097388D11456007900EAF57F /* main.m in Sources */,
09859652145669720037CE16 /* DNSGlobalSettings.m in Sources */,
09080E931458B8DB00A85DAE /* SocketListener.m in Sources */,
09080E971458DDE300A85DAE /* DNSUpdater.m in Sources */,
09C03F83145A29C1009804EF /* ProxySpawner.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
097388D61456007900EAF57F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_OBJC_GC = unsupported;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
097388D71456007900EAF57F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_OBJC_GC = unsupported;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
};
name = Release;
};
097388D91456007900EAF57F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "dns-updater/dns-updater-Prefix.pch";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
097388DA1456007900EAF57F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "dns-updater/dns-updater-Prefix.pch";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
097388C31456007900EAF57F /* Build configuration list for PBXProject "dns-updater" */ = {
isa = XCConfigurationList;
buildConfigurations = (
097388D61456007900EAF57F /* Debug */,
097388D71456007900EAF57F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
097388D81456007900EAF57F /* Build configuration list for PBXNativeTarget "dns-updater" */ = {
isa = XCConfigurationList;
buildConfigurations = (
097388D91456007900EAF57F /* Debug */,
097388DA1456007900EAF57F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 097388C01456007900EAF57F /* Project object */;
}
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:dns-updater.xcodeproj">
</FileRef>
</Workspace>
@@ -1,23 +0,0 @@
//
// DNSGlobalSettings.h
// dns-updater
//
// Created by OpenDNS, Inc. on 10/24/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#define kONLY_CHANGE_SERVICES_WITH_A_BSD_INTERFACE 1
@interface DNSGlobalSettings : NSObject
- (NSArray *) getActiveResolvers __attribute((ns_returns_retained));
- (BOOL) isRunningWithResolvers: (NSArray *) resolvers;
- (BOOL) isRunningWithResolversInResolversList: (NSArray *) resolversList;
- (BOOL) setResolvers: (NSArray *) resolvers;
- (BOOL) revertResolvers;
- (BOOL) backupExceptResolversList: (NSArray *) resolversList;
@end
@@ -1,164 +0,0 @@
//
// DNSGlobalSettings.m
// dns-updater
//
// Created by OpenDNS, Inc. on 10/24/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import "DNSGlobalSettings.h"
@implementation DNSGlobalSettings
- (BOOL) forceDHCPUpdate
{
NSLog(@"Forcing DHCP update");
NSArray *interfaces = (__bridge_transfer NSArray *) SCNetworkInterfaceCopyAll();
for (id interface_ in interfaces) {
SCNetworkInterfaceRef interface = (__bridge SCNetworkInterfaceRef) interface_;
SCNetworkInterfaceForceConfigurationRefresh(interface);
}
return TRUE;
}
- (BOOL) applyToNetworkServices: (BOOL (^)(SCDynamicStoreRef fs, NSString *service, NSDictionary *properties, NSArray *serverAddresses)) cb
{
SCDynamicStoreRef ds = SCDynamicStoreCreate(NULL, CFSTR("dnscrypt"), NULL, NULL);
#ifdef kONLY_CHANGE_SERVICES_WITH_A_BSD_INTERFACE
NSArray *services = (__bridge_transfer NSArray *) SCDynamicStoreCopyKeyList(ds, CFSTR("(State|Setup):/Network/Service/.+/DNS"));
#else
NSArray *services = (__bridge_transfer NSArray *) SCDynamicStoreCopyKeyList(ds, CFSTR("(State|Setup):/Network/(Service/.+|Global)/DNS"));
#endif
BOOL ret = TRUE;
for (NSString *service in services) {
#ifdef kONLY_CHANGE_SERVICES_WITH_A_BSD_INTERFACE
NSArray *elements = [service componentsSeparatedByString: @"/"];
if (elements.count < 4U) {
continue;
}
NSString *serviceId = [elements objectAtIndex: 3U];
NSString *interfacePath = [NSString stringWithFormat: @"Setup:/Network/Service/%@/Interface", serviceId];
NSDictionary *interfaceProperties = (__bridge_transfer NSDictionary *) SCDynamicStoreCopyValue(ds, (__bridge CFStringRef) interfacePath);
if (interfaceProperties == nil || ! [interfaceProperties isKindOfClass: [NSDictionary class]]) {
continue;
}
NSString *bsdInterface = [interfaceProperties objectForKey: @"DeviceName"];
if (bsdInterface == nil) {
continue;
}
NSLog(@"Found BSD interface: [%@]", bsdInterface);
#endif
NSDictionary *properties = (__bridge_transfer NSDictionary *) SCDynamicStoreCopyValue(ds, (__bridge CFStringRef) service);
if (properties == nil || ! [properties isKindOfClass: [NSDictionary class]]) {
continue;
}
NSArray *serverAddresses = [properties objectForKey: @"ServerAddresses"];
if (serverAddresses == nil || ! [serverAddresses isKindOfClass: [NSArray class]]) {
continue;
}
ret &= cb(ds, service, properties, serverAddresses);
}
CFRelease(ds);
return ret;
}
- (BOOL) setResolvers: (NSArray *) resolvers
{
[self applyToNetworkServices: ^BOOL(SCDynamicStoreRef ds, NSString *service, NSDictionary *properties, NSArray *serverAddresses) {
NSMutableDictionary *newProperties = [NSMutableDictionary dictionaryWithDictionary: properties];
[newProperties setObject: resolvers forKey: @"ServerAddresses"];
SCDynamicStoreSetValue(ds, (__bridge CFStringRef) service, (__bridge CFDictionaryRef) newProperties);
return TRUE;
}];
[[NSNotificationCenter defaultCenter] postNotificationName: @"CONFIGURATION_CHANGED" object: self userInfo: nil];
return TRUE;
}
- (BOOL) revertResolvers
{
[self applyToNetworkServices: ^BOOL(SCDynamicStoreRef ds, NSString *service, NSDictionary *properties, NSArray *serverAddresses) {
NSDictionary *propertiesWithBackup = [properties objectForKey: @"DNSCryptBackup"];
if (propertiesWithBackup == nil || ! [propertiesWithBackup isKindOfClass: [NSDictionary class]]) {
return FALSE;
}
NSArray *backupedServerAddresses = [propertiesWithBackup objectForKey: @"ServerAddresses"];
if (backupedServerAddresses == nil || ! [backupedServerAddresses isKindOfClass: [NSArray class]]) {
return FALSE;
}
NSMutableDictionary *newProperties = [NSMutableDictionary dictionaryWithDictionary: properties];
[newProperties setObject: backupedServerAddresses forKey: @"ServerAddresses"];
SCDynamicStoreSetValue(ds, (__bridge CFStringRef) service, (__bridge CFDictionaryRef) newProperties);
return TRUE;
}];
[self forceDHCPUpdate];
[[NSNotificationCenter defaultCenter] postNotificationName: @"CONFIGURATION_CHANGED" object: self userInfo: nil];
return TRUE;
}
- (NSArray *) getActiveResolvers
{
NSError *err;
NSString *resolvConf = [NSString stringWithContentsOfFile: @"/etc/resolv.conf" encoding: NSISOLatin1StringEncoding error: &err];
NSMutableArray *resolvers = [[NSMutableArray alloc] init];
if (! resolvConf) {
return resolvers;
}
NSArray *lines = [resolvConf componentsSeparatedByString: @"\n"];
for (NSString *line_ in lines) {
NSString *line = [line_ stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSArray *entry = [line componentsSeparatedByCharactersInSet: [NSCharacterSet whitespaceCharacterSet]];
if (![[entry objectAtIndex: 0U] isEqualToString: @"nameserver"]) {
continue;
}
NSString *resolver = [entry objectAtIndex: 1U];
[resolvers addObject: resolver];
}
return resolvers;
}
- (BOOL) resolversForService: (NSArray *) serverAddresses areInResolversList: (NSArray *) resolversList
{
for (NSArray *resolvers in resolversList) {
if ([serverAddresses isEqualToArray: resolvers]) {
return TRUE;
}
}
return FALSE;
}
- (BOOL) isRunningWithResolvers: (NSArray *) resolvers
{
NSArray *activeResolvers = [self getActiveResolvers];
return [activeResolvers isEqualToArray: resolvers];
}
- (BOOL) isRunningWithResolversInResolversList: (NSArray *) resolversList
{
NSArray *activeResolvers = [self getActiveResolvers];
return [self resolversForService: activeResolvers areInResolversList: resolversList];
}
- (BOOL) backupExceptResolversList: (NSArray *) resolversList
{
[self applyToNetworkServices: ^BOOL(SCDynamicStoreRef ds, NSString *service, NSDictionary *properties, NSArray *serverAddresses) {
if ([self resolversForService: serverAddresses areInResolversList: resolversList]) {
return FALSE;
}
NSMutableDictionary *propertiesWithBackup = [NSMutableDictionary dictionaryWithDictionary: properties];
NSDictionary *serverAddressesBackup = [NSDictionary dictionaryWithObject: serverAddresses forKey: @"ServerAddresses"];
[propertiesWithBackup setObject: serverAddressesBackup forKey: @"DNSCryptBackup"];
SCDynamicStoreSetValue(ds, (__bridge CFStringRef) service, (__bridge CFDictionaryRef) propertiesWithBackup);
return TRUE;
}];
return TRUE;
}
@end
@@ -1,53 +0,0 @@
//
// DNSUpdater.h
// dns-updater
//
// Created by OpenDNS, Inc. on 10/26/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import "ProxySpawner.h"
typedef enum {
kDNS_CONFIGURATION_UNKNOWN, kDNS_CONFIGURATION_VANILLA, kDNS_CONFIGURATION_LOCALHOST, kDNS_CONFIGURATION_OPENDNS
} DNSConfigurationState;
#define kRESOLVER_IP_LOCALHOST @"127.0.0.1"
#define kRESOLVER_IP_OPENDNS1 @"208.67.220.220"
#define kRESOLVER_IP_OPENDNS2 @"208.67.222.222"
#define kRESOLVER_IP_DNSCRYPT @"208.67.220.220"
#define kHOST_NAME_FOR_PROBES @"myip.opendns.com"
#define kINTERVAL_BETWEEN_CONFIG_UPDATES 2.5
#define kINTERVAL_BETWEEN_DELAYED_PROBES (60.0 * 15.0)
#define kDELAY_BETWEEN_ASYNC_RESOLUTION_ATTEMPTS 0.5
#define kINTERVAL_BETWEEN_ASYNC_RESOLUTION_RETRIES 1.0
#define kINTERVAL_BEFORE_ASYNC_RESOLUTION 5.0
#define kASYNC_RESOLUTION_TIMEOUT 10.0
#define kASYNC_RESOLUTION_MAX_ATTEMPTS 3U
#define kDNSCRYPT_APPLICATION_SUPPORT_DIR @"DNSCrypt Updater"
#define kDNS_SETTINGS_FILE @"settings-v1.plist"
@interface DNSUpdater : NSObject {
DNSConfigurationState state;
DNSConfigurationState _wantedState;
BOOL _enableFallback;
BOOL enableSaveSettings;
}
@property (assign) DNSConfigurationState state;
@property (assign) BOOL enableSaveSettings;
@property (readwrite) DNSConfigurationState wantedState;
@property (readwrite) BOOL enableFallback;
- (id) initWithProxySpawner: (ProxySpawner *) proxySpawner;
- (void) start;
- (void) periodicallyUpdate;
- (void) update;
- (BOOL) saveDNSSettings;
- (BOOL) loadDNSSettings;
@end
@@ -1,293 +0,0 @@
//
// DNSUpdater.m
// dns-updater
//
// Created by OpenDNS, Inc. on 10/26/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import "DNSGlobalSettings.h"
#import "DNSUpdater.h"
@implementation DNSUpdater
@synthesize state;
@synthesize enableSaveSettings;
ProxySpawner *_proxySpawner;
NSArray *resolversForLocalhost;
NSArray *resolversForOpenDNS;
NSArray *resolversList;
DNSGlobalSettings *configuration;
CFHostRef hostR;
NSTimer *asyncResolutionTimer;
NSUInteger asyncResolutionFailures;
- (DNSConfigurationState) wantedState {
return _wantedState;
}
- (void) setWantedState:(DNSConfigurationState) wantedState {
_wantedState = wantedState;
[self saveDNSSettings];
}
- (BOOL) enableFallback {
return _enableFallback;
}
- (void) setEnableFallback: (BOOL)enableFallback {
_enableFallback = enableFallback;
[self saveDNSSettings];
}
- (id) initWithProxySpawner: (ProxySpawner *) proxySpawner;
{
if (! (self = [super init])) {
return nil;
}
_proxySpawner = proxySpawner;
state = self.wantedState = kDNS_CONFIGURATION_VANILLA;
resolversForLocalhost = [NSArray arrayWithObjects: kRESOLVER_IP_LOCALHOST, nil];
resolversForOpenDNS = [NSArray arrayWithObjects: kRESOLVER_IP_OPENDNS1, kRESOLVER_IP_OPENDNS2, nil];
resolversList = [NSArray arrayWithObjects: resolversForLocalhost, resolversForOpenDNS, nil];
configuration = [[DNSGlobalSettings alloc] init];
hostR = nil;
asyncResolutionTimer = nil;
asyncResolutionFailures = 0U;
self.enableFallback = NO;
enableSaveSettings = YES;
if ([configuration isRunningWithResolvers: resolversForLocalhost]) {
NSLog(@"Current configuration is localhost, not vanilla");
self.wantedState = state = kDNS_CONFIGURATION_LOCALHOST;
} else if ([configuration isRunningWithResolvers: resolversForOpenDNS]) {
NSLog(@"Current configuration is opendns, not vanilla");
self.wantedState = state = kDNS_CONFIGURATION_OPENDNS;
}
return self;
}
- (void) update
{
if ([configuration isRunningWithResolvers: resolversForLocalhost]) {
if (state != kDNS_CONFIGURATION_LOCALHOST) {
NSLog(@"Supposed state was not LOCALHOST but it actually is");
state = kDNS_CONFIGURATION_UNKNOWN;
self.wantedState = kDNS_CONFIGURATION_LOCALHOST;
NSArray *proxyArguments = [NSArray arrayWithObjects: @"--resolver-address=" kRESOLVER_IP_DNSCRYPT, nil];
[_proxySpawner startWithArguments: proxyArguments];
}
} else if ([configuration isRunningWithResolvers: resolversForOpenDNS]) {
if (state != kDNS_CONFIGURATION_OPENDNS) {
NSLog(@"Supposed state was not OPENDNS but it actually is");
state = kDNS_CONFIGURATION_OPENDNS;
}
} else {
if (state == kDNS_CONFIGURATION_LOCALHOST) {
NSLog(@"Settings have been manually changed while not in vanilla mode");
}
state = kDNS_CONFIGURATION_VANILLA;
}
if (state == self.wantedState) {
return;
}
[configuration backupExceptResolversList: resolversList];
if (self.wantedState == kDNS_CONFIGURATION_VANILLA) {
if ([configuration revertResolvers] == TRUE) {
state = self.wantedState;
NSLog(@"Back to a vanilla configuration");
} else {
NSLog(@"* loadSettings failed");
}
} else if (self.wantedState == kDNS_CONFIGURATION_LOCALHOST) {
if ([configuration setResolvers: resolversForLocalhost] == TRUE) {
state = self.wantedState;
NSLog(@"Configuration switched to localhost");
} else {
NSLog(@"* setResolvers failed");
}
} else if (self.wantedState == kDNS_CONFIGURATION_OPENDNS) {
if ([configuration setResolvers: resolversForOpenDNS] == TRUE) {
state = self.wantedState;
NSLog(@"Configuration switched to opendns");
} else {
NSLog(@"* setResolvers failed");
}
}
}
- (void) periodicallyUpdate
{
[self update];
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(periodicallyUpdate) object: nil];
[self performSelector: @selector(periodicallyUpdate) withObject: nil afterDelay: kINTERVAL_BETWEEN_CONFIG_UPDATES];
}
- (void) fallback
{
NSLog(@"Falling back to vanilla configuration");
self.wantedState = kDNS_CONFIGURATION_VANILLA;
}
- (BOOL) asyncResolutionFailed
{
asyncResolutionFailures++;
if (asyncResolutionFailures >= kASYNC_RESOLUTION_MAX_ATTEMPTS) {
[self fallback];
return TRUE;
}
return FALSE;
}
- (void) asyncResolutionSuccess
{
asyncResolutionFailures = 0U;
}
static void asyncResolutionDone(CFHostRef hostReplyR, CFHostInfoType typeInfo, const CFStreamError *error, void *info)
{
DNSUpdater *self = (__bridge DNSUpdater *) info;
[asyncResolutionTimer invalidate];
Boolean hasBeenResolved;
CFArrayRef addresses = CFHostGetAddressing(hostReplyR, &hasBeenResolved);
if (hasBeenResolved == TRUE && addresses != nil) {
NSLog(@"Test query has been resolved");
}
CFHostUnscheduleFromRunLoop(hostReplyR, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
CFHostSetClient(hostReplyR, NULL, NULL);
CFRelease(hostReplyR);
assert(hostReplyR == hostR);
hostR = nil;
[self asyncResolutionSuccess];
[self performSelector: @selector(performAsyncResolution) withObject: self afterDelay: kINTERVAL_BETWEEN_DELAYED_PROBES];
}
- (void) asyncResolutionTimeout
{
NSLog(@"async resolution timeout");
CFHostCancelInfoResolution(hostR, kCFHostAddresses);
CFHostUnscheduleFromRunLoop(hostR, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
CFHostSetClient(hostR, NULL, NULL);
CFRelease(hostR);
hostR = nil;
if ([self asyncResolutionFailed] == FALSE) {
[self performSelector: @selector(performAsyncResolution) withObject: self afterDelay: kDELAY_BETWEEN_ASYNC_RESOLUTION_ATTEMPTS];
NSLog(@"Performing a new resolution attempt");
}
}
- (void) performAsyncResolution
{
if (self.enableFallback == NO) {
return;
}
if (hostR) {
[self performSelector: @selector(performAsyncResolution) withObject: self afterDelay: kINTERVAL_BETWEEN_ASYNC_RESOLUTION_RETRIES];
return;
}
NSLog(@"Starting async resolution");
CFHostClientContext context = { 0, (__bridge void *) self, CFRetain, CFRelease, NULL };
CFStringRef name = (__bridge CFStringRef) kHOST_NAME_FOR_PROBES;
hostR = CFHostCreateWithName(kCFAllocatorDefault, name);
CFHostSetClient(hostR, asyncResolutionDone, &context);
CFHostScheduleWithRunLoop(hostR, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
CFStreamError error;
CFHostStartInfoResolution(hostR, kCFHostAddresses, &error);
asyncResolutionTimer = [NSTimer scheduledTimerWithTimeInterval: kASYNC_RESOLUTION_TIMEOUT target: self selector: @selector(asyncResolutionTimeout) userInfo: nil repeats: NO];
}
- (void) configurationChanged
{
NSLog(@"CONFIGURATION_CHANGED notification received");
if (self.enableFallback == NO) {
return;
}
[self performSelector: @selector(performAsyncResolution) withObject: self afterDelay: kINTERVAL_BEFORE_ASYNC_RESOLUTION];
}
- (void) start
{
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(configurationChanged) name:@"CONFIGURATION_CHANGED" object: nil];
[self periodicallyUpdate];
}
- (NSString *) getSupportDirectory {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSLocalDomainMask, YES);
NSString *path = nil;
NSError *error = nil;
BOOL isDirectory;
for (path in paths) {
if ([[NSFileManager defaultManager] fileExistsAtPath: path isDirectory: &isDirectory] == FALSE || isDirectory == FALSE) {
continue;
}
path = [path stringByAppendingPathComponent: kDNSCRYPT_APPLICATION_SUPPORT_DIR];
if ([[NSFileManager defaultManager] createDirectoryAtPath: path withIntermediateDirectories: TRUE attributes: nil error: &error] == TRUE) {
return path;
}
}
NSLog(@"Error: [%@]", error);
return nil;
}
- (NSString *) getDNSSettingsFile
{
NSString *supportDirectory = [self getSupportDirectory];
if (! supportDirectory) {
return nil;
}
return [supportDirectory stringByAppendingPathComponent: kDNS_SETTINGS_FILE];
}
- (BOOL) saveDNSSettings
{
if (enableSaveSettings == NO) {
return TRUE;
}
NSString *settingsFile = [self getDNSSettingsFile];
if (! settingsFile) {
return FALSE;
}
NSLog(@"Saving DNS settings");
NSArray *proxyArguments = [_proxySpawner arguments];
if (! proxyArguments) {
proxyArguments = [NSArray array];
}
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt: self.wantedState], @"wantedState", [NSNumber numberWithBool: self.enableFallback], @"enableFallback", proxyArguments, @"proxyArguments", nil];
return [settings writeToFile: settingsFile atomically: TRUE];
}
- (BOOL) loadDNSSettings
{
NSString *settingsFile = [self getDNSSettingsFile];
if (! settingsFile) {
return FALSE;
}
NSLog(@"Loading DNS settings");
NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile: settingsFile];
if (!settings) {
return FALSE;
}
NSNumber *wantedStateN = [settings objectForKey: @"wantedState"];
if (wantedStateN) {
self.wantedState = [wantedStateN intValue];
}
NSNumber *enableFallbackN = [settings objectForKey: @"enableFallback"];
if (enableFallbackN) {
self.enableFallback = [enableFallbackN boolValue];
}
NSArray *proxyArguments = [settings objectForKey: @"proxyArguments"];
if (proxyArguments && [proxyArguments count] > 0U) {
NSLog(@"Starting the proxy with previous arguments: [%@]", proxyArguments);
[_proxySpawner stop];
[_proxySpawner startWithArguments: proxyArguments];
}
[[NSNotificationCenter defaultCenter] postNotificationName: @"CONFIGURATION_CHANGED" object: self userInfo: nil];
[self saveDNSSettings];
return wantedStateN || enableFallbackN;
}
@end
@@ -1,25 +0,0 @@
//
// ProxySpawner.h
// dns-updater
//
// Created by OpenDNS, Inc. on 10/27/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#define KLAUNCHCTL_PATH @"/bin/launchctl"
#define kDNSCRYPT_PROXY_USER @"nobody"
#define KDNSCRYPT_PROXY_LABEL @"com.opendns.osx.DNSCryptProxy"
#define kDNSCRYPT_PROXY_PATH @"/usr/local/sbin/dnscrypt-proxy"
@interface ProxySpawner : NSObject {
NSArray *_arguments;
}
@property (strong) NSArray *arguments;
- (BOOL) startWithArguments: (NSArray *) suppliedArguments;
- (BOOL) stop;
@end
@@ -1,105 +0,0 @@
//
// ProxySpawner.m
// dns-updater
//
// Created by OpenDNS, Inc. on 10/27/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import "ProxySpawner.h"
@implementation ProxySpawner
@synthesize arguments = _arguments;
- (id) init {
if (! (self = [super init])) {
return nil;
}
_arguments = nil;
return self;
}
- (BOOL) registerLaunchdLabelWithArguments: (NSArray *) arguments
{
NSArray *launchdBaseArguments = [NSArray arrayWithObjects: @"submit", @"-l", KDNSCRYPT_PROXY_LABEL, @"--", kDNSCRYPT_PROXY_PATH, nil];
NSArray *launchdArguments = [launchdBaseArguments arrayByAddingObjectsFromArray: arguments];
NSTask *task = [[NSTask alloc] init];
task.launchPath = KLAUNCHCTL_PATH;
task.arguments = launchdArguments;
task.standardError = [NSFileHandle fileHandleWithNullDevice];
[task launch];
[task waitUntilExit];
return TRUE;
}
- (BOOL) unregisterLaunchdLabel
{
NSArray *launchdArguments = [NSArray arrayWithObjects: @"remove", KDNSCRYPT_PROXY_LABEL, nil];
NSTask *task = [[NSTask alloc] init];
task.launchPath = KLAUNCHCTL_PATH;
task.arguments = launchdArguments;
task.standardError = [NSFileHandle fileHandleWithNullDevice];
[task launch];
[task waitUntilExit];
return TRUE;
}
- (BOOL) argumentsAreWhiteListed: (NSArray *) arguments {
NSArray *whiteListedPrefixes = [NSArray arrayWithObjects: @"--tcp-port=443", @"--resolver-address=208.67.", nil];
BOOL found;
for (NSString *argument in arguments) {
found = NO;
for (NSString *whiteListedPrefix in whiteListedPrefixes) {
if ([argument hasPrefix: whiteListedPrefix]) {
found = YES;
break;
}
}
if (! found) {
return NO;
}
}
return YES;
}
- (BOOL) startWithArguments: (NSArray *) arguments;
{
if ([self argumentsAreWhiteListed: arguments] == NO) {
return FALSE;
}
NSArray *proxyBaseArguments = [NSArray arrayWithObjects: @"--user", kDNSCRYPT_PROXY_USER, nil];
NSArray *proxyArguments = [proxyBaseArguments arrayByAddingObjectsFromArray: arguments];
[self registerLaunchdLabelWithArguments: proxyArguments];
NSArray *launchdArguments = [NSArray arrayWithObjects: @"start", KDNSCRYPT_PROXY_LABEL, nil];
NSTask *task = [[NSTask alloc] init];
task.launchPath = KLAUNCHCTL_PATH;
task.arguments = launchdArguments;
[task launch];
[task waitUntilExit];
_arguments = arguments;
return TRUE;
}
- (BOOL) stop
{
NSArray *launchdArguments = [NSArray arrayWithObjects: @"stop", KDNSCRYPT_PROXY_LABEL, nil];
NSTask *task = [[NSTask alloc] init];
task.launchPath = KLAUNCHCTL_PATH;
task.arguments = launchdArguments;
task.standardError = [NSFileHandle fileHandleWithNullDevice];
[task launch];
[task waitUntilExit];
_arguments = nil;
[self unregisterLaunchdLabel];
return TRUE;
}
@end
@@ -1,27 +0,0 @@
//
// SocketListener.h
// dns-updater
//
// Created by OpenDNS, Inc. on 10/26/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import "DNSUpdater.h"
#import "ProxySpawner.h"
#define kSOCK_GRAND_PARENT_DIR @"/var/run"
#define kSOCK_PARENT_DIR kSOCK_GRAND_PARENT_DIR @"/com.opendns.osx.DNSCryptConfigUpdater"
#define kSOCK_PATH kSOCK_PARENT_DIR @"/sock"
#define kSOCK_GROUP_NAME "admin"
#define kSOCK_PARENT_DIR_PERMS 0710
#define kSOCK_PERMS 0660
#define kSOCK_REFRESH_RATE 5.0
#define kREF_OWNER_FILE @"/dev/console"
@interface SocketListener : NSObject
- (id) initWithDNSUpdater: (DNSUpdater *) updater andProxySpawner: (ProxySpawner *) proxySpawner;
- (BOOL) createListener;
- (BOOL) updateSocketPerms;
@end
@@ -1,223 +0,0 @@
//
// SocketListener.m
// dns-updater
//
// Created by OpenDNS, Inc. on 10/26/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#include <sys/stat.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <grp.h>
#import "ProxySpawner.h"
#import "SocketListener.h"
@implementation SocketListener
DNSUpdater *_updater;
ProxySpawner *_proxySpawner;
NSMutableData *_commandBuffer;
gid_t gid;
- (id) initWithDNSUpdater: (DNSUpdater *) updater andProxySpawner: (ProxySpawner *)proxySpawner
{
if (! (self = [super init])) {
return nil;
}
_updater = updater;
_proxySpawner = proxySpawner;
_commandBuffer = [[NSMutableData alloc] init];
return self;
}
- (BOOL) commandParseConfig: (NSArray *) commandAsComponents
{
if (commandAsComponents.count != 2U) {
return FALSE;
}
NSString *stateName = [commandAsComponents objectAtIndex: 1U];
NSLog(@"Wanted state name: [%@]", stateName);
if ([stateName isEqualToString: @"VANILLA"]) {
_updater.wantedState = kDNS_CONFIGURATION_VANILLA;
} else if ([stateName isEqualToString: @"LOCALHOST"]) {
_updater.wantedState = kDNS_CONFIGURATION_LOCALHOST;
} else if ([stateName isEqualToString: @"OPENDNS"]) {
_updater.wantedState = kDNS_CONFIGURATION_OPENDNS;
} else {
return FALSE;
}
if (_updater.state != _updater.wantedState) {
[_updater periodicallyUpdate];
}
return TRUE;
}
- (BOOL) commandParseFallback: (NSArray *) commandAsComponents
{
if (commandAsComponents.count < 2U) {
return FALSE;
}
NSString *action = [commandAsComponents objectAtIndex: 1U];
if ([action isEqualToString: @"OFF"]) {
_updater.enableFallback = NO;
} else if ([action isEqualToString: @"ON"]) {
_updater.enableFallback = YES;
[[NSNotificationCenter defaultCenter] postNotificationName: @"CONFIGURATION_CHANGED" object: self userInfo: nil];
}
return FALSE;
}
- (BOOL) commandParseProxy: (NSArray *) commandAsComponents
{
BOOL ret = FALSE;
if (commandAsComponents.count < 2U) {
return FALSE;
}
NSString *action = [commandAsComponents objectAtIndex: 1U];
if ([action isEqualToString: @"STOP"]) {
ret = [_proxySpawner stop];
[_updater saveDNSSettings];
} else if ([action isEqualToString: @"START"]) {
NSArray *suppliedArguments = [commandAsComponents subarrayWithRange: NSMakeRange(2U, commandAsComponents.count - 2U)];
[_proxySpawner stop];
ret = [_proxySpawner startWithArguments: suppliedArguments];
[_updater saveDNSSettings];
}
return ret;
}
- (BOOL) commandParse: (NSString *) command
{
NSArray *commandAsComponents = [command componentsSeparatedByString: @" "];
if (commandAsComponents.count <= 0U) {
return FALSE;
}
NSString *action = [commandAsComponents objectAtIndex: 0U];
if ([action isEqualToString: @"CONFIG"]) {
return [self commandParseConfig: commandAsComponents];
}
if ([action isEqualToString: @"PROXY"]) {
return [self commandParseProxy: commandAsComponents];
}
if ([action isEqualToString: @"FALLBACK"]) {
return [self commandParseFallback: commandAsComponents];
}
return FALSE;
}
- (void) commandRead: (NSNotification *) notification
{
NSFileHandle *fh = (NSFileHandle *) notification.object;
NSData *chunk = [[notification userInfo] objectForKey: @"NSFileHandleNotificationDataItem"];
[_commandBuffer appendData: chunk];
uint32_t commandLen;
for (;;) {
if (_commandBuffer.length <= sizeof commandLen) {
break;
}
memcpy(&commandLen, _commandBuffer.bytes, sizeof commandLen);
if (_commandBuffer.length < commandLen + sizeof commandLen) {
break;
}
NSData *command_ = [_commandBuffer subdataWithRange: NSMakeRange(sizeof commandLen, commandLen)];
NSData *remainingBuffer = [_commandBuffer subdataWithRange: NSMakeRange(commandLen + sizeof commandLen, _commandBuffer.length - commandLen - sizeof commandLen)];
_commandBuffer = [[NSMutableData alloc] initWithData: remainingBuffer];
NSString *command = [[NSString alloc] initWithData: command_ encoding: NSUTF8StringEncoding];
command = [command stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSLog(@"Received command: [%@]", command);
[self commandParse: command];
}
[fh readInBackgroundAndNotify];
}
- (BOOL) updateSocketPerms
{
const char *refOwnerFile = [kREF_OWNER_FILE cStringUsingEncoding: NSUTF8StringEncoding];
struct stat st;
BOOL ret = TRUE;
if (stat(refOwnerFile, &st) != 0) {
return FALSE;
}
const char *sockParentDir = [kSOCK_PARENT_DIR cStringUsingEncoding: NSUTF8StringEncoding];
ret &= ! chown(sockParentDir, st.st_uid, gid);
const char *sockPath = [kSOCK_PATH cStringUsingEncoding: NSUTF8StringEncoding];
ret &= ! chown(sockPath, st.st_uid, gid);
return ret;
}
- (BOOL) createListener
{
mode_t sockParentDirPerms = (mode_t) kSOCK_PARENT_DIR_PERMS;
mode_t sockPerms = (mode_t) kSOCK_PERMS;
const char *sockParentDir = [kSOCK_PARENT_DIR cStringUsingEncoding: NSUTF8StringEncoding];
struct group *group = getgrnam(kSOCK_GROUP_NAME);
if (group == NULL) {
sockParentDirPerms = (mode_t) 0711;
sockPerms = (mode_t) 0666;
}
const mode_t previousMask = umask((mode_t) 0177);
umask((mode_t) 0);
if (mkdir(sockParentDir, sockParentDirPerms) != 0) {
if (errno != EEXIST) {
NSLog(@"mkdir(): [%s]", strerror(errno));
umask(previousMask);
return FALSE;
}
} else {
chmod(sockParentDir, sockParentDirPerms);
}
if (group != NULL) {
gid = group->gr_gid;
} else {
gid = (gid_t) 0;
}
chown(sockParentDir, (uid_t) 0, gid);
const char *sockPath = [kSOCK_PATH cStringUsingEncoding: NSUTF8StringEncoding];
size_t sockPathSize = strlen(sockPath) + (size_t) 1U;
struct sockaddr_un *su;
assert(sockPathSize < sizeof su->sun_path);
socklen_t sun_len = (socklen_t) (sizeof *su) + (socklen_t) sockPathSize;
su = calloc(1U, sun_len);
su->sun_family = AF_UNIX;
memcpy(su->sun_path, sockPath, sockPathSize);
su->sun_len = SUN_LEN(su);
[[NSFileManager defaultManager] removeItemAtPath: kSOCK_PATH error: nil];
CFSocketRef socket = CFSocketCreate(kCFAllocatorDefault, PF_UNIX, SOCK_DGRAM, IPPROTO_IP, 0, NULL, NULL);
CFSocketSetSocketFlags(socket, CFSocketGetSocketFlags(socket) & ~kCFSocketCloseOnInvalidate);
int fd = CFSocketGetNative(socket);
NSData *address = [NSData dataWithBytes: su length: SUN_LEN(su)];
if (CFSocketSetAddress(socket, (__bridge CFDataRef) address) != kCFSocketSuccess) {
free(su);
CFSocketInvalidate(socket);
CFRelease(socket);
NSLog(@"*** Could not bind to address");
umask(previousMask);
[[NSFileManager defaultManager] removeItemAtPath: kSOCK_PATH error: nil];
return FALSE;
}
free(su);
chown(sockPath, (uid_t) 0, gid);
chmod(sockPath, sockPerms);
umask(previousMask);
NSFileHandle *fh = [[NSFileHandle alloc] initWithFileDescriptor: fd closeOnDealloc: TRUE];
CFRelease(socket);
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[fh readInBackgroundAndNotify];
[center addObserver:self
selector:@selector(commandRead:)
name:@"NSFileHandleReadCompletionNotification"
object:nil];
[NSTimer scheduledTimerWithTimeInterval: kSOCK_REFRESH_RATE target: self selector: @selector(updateSocketPerms) userInfo: nil repeats: YES];
return TRUE;
}
@end
@@ -1,7 +0,0 @@
//
// Prefix header for all source files of the 'dns-updater' target in the 'dns-updater' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif
@@ -1,57 +0,0 @@
//
// main.m
// dns-updater
//
// Created by OpenDNS, Inc. on 10/24/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "DNSUpdater.h"
#import "ProxySpawner.h"
#import "SocketListener.h"
static DNSUpdater *dnsUpdater;
static void restoreVanilla(void)
{
dnsUpdater.enableSaveSettings = NO;
if (dnsUpdater) {
NSLog(@"Restoring vanilla configuration");
dnsUpdater.wantedState = kDNS_CONFIGURATION_VANILLA;
[dnsUpdater update];
dnsUpdater = nil;
}
}
static void sigQuitHandler(int sig)
{
(void) sig;
restoreVanilla();
exit(0);
}
int main(void)
{
@autoreleasepool {
nice(10);
ProxySpawner *proxySpawner = [[ProxySpawner alloc] init];
dnsUpdater = [[DNSUpdater alloc] initWithProxySpawner: proxySpawner];
SocketListener *socketListener = [[SocketListener alloc] initWithDNSUpdater: dnsUpdater andProxySpawner: proxySpawner];
[socketListener createListener];
signal(SIGPIPE, SIG_IGN);
signal(SIGALRM, sigQuitHandler);
signal(SIGHUP, sigQuitHandler);
signal(SIGINT, sigQuitHandler);
signal(SIGQUIT, sigQuitHandler);
signal(SIGTERM, sigQuitHandler);
signal(SIGXCPU, sigQuitHandler);
[dnsUpdater start];
[dnsUpdater loadDNSSettings];
[[NSRunLoop currentRunLoop] run];
restoreVanilla();
}
return 0;
}
@@ -13,24 +13,24 @@
0906D83114B4D9AC0093FA7D /* yes-opendns-yes-crypt.png in Resources */ = {isa = PBXBuildFile; fileRef = 0906D82D14B4D9AC0093FA7D /* yes-opendns-yes-crypt.png */; };
09651148147D832D007FEE31 /* dnscrypt.icns in Resources */ = {isa = PBXBuildFile; fileRef = 09651147147D832D007FEE31 /* dnscrypt.icns */; };
096AEEFA1468A11E009F2AA4 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 096AEEF91468A11E009F2AA4 /* dsa_pub.pem */; };
09972870147CCE41004E7017 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0997286F147CCE41004E7017 /* Sparkle.framework */; };
09972871147CCEDC004E7017 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0997286F147CCE41004E7017 /* Sparkle.framework */; };
0970EAAB160A5B1600865D5D /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09F4DDA816019D0D002C4E04 /* Sparkle.framework */; };
09A13AD2145F3B9000B227A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09A13AD1145F3B9000B227A4 /* Cocoa.framework */; };
09A13ADC145F3B9000B227A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 09A13ADA145F3B9000B227A4 /* InfoPlist.strings */; };
09A13ADE145F3B9000B227A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 09A13ADD145F3B9000B227A4 /* main.m */; };
09A13AE2145F3B9000B227A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 09A13AE0145F3B9000B227A4 /* Credits.rtf */; };
09A13AE5145F3B9000B227A4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 09A13AE4145F3B9000B227A4 /* AppDelegate.m */; };
09A13AE8145F3B9000B227A4 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 09A13AE6145F3B9000B227A4 /* MainMenu.xib */; };
09F4DDA916019D0D002C4E04 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09F4DDA816019D0D002C4E04 /* Sparkle.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
096AEEF714689FEB009F2AA4 /* CopyFiles */ = {
0970EAA9160A5B0000865D5D /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
09972871147CCEDC004E7017 /* Sparkle.framework in CopyFiles */,
0970EAAB160A5B1600865D5D /* Sparkle.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -43,7 +43,6 @@
0906D82D14B4D9AC0093FA7D /* yes-opendns-yes-crypt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "yes-opendns-yes-crypt.png"; sourceTree = "<group>"; };
09651147147D832D007FEE31 /* dnscrypt.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = dnscrypt.icns; path = ../dnscrypt.icns; sourceTree = "<group>"; };
096AEEF91468A11E009F2AA4 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = "<group>"; };
0997286F147CCE41004E7017 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
09A13ACD145F3B9000B227A4 /* DNSCrypt-Menubar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DNSCrypt-Menubar.app"; sourceTree = BUILT_PRODUCTS_DIR; };
09A13AD1145F3B9000B227A4 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
09A13AD4145F3B9000B227A4 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -57,6 +56,7 @@
09A13AE3145F3B9000B227A4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
09A13AE4145F3B9000B227A4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
09A13AE7145F3B9000B227A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
09F4DDA816019D0D002C4E04 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -65,7 +65,7 @@
buildActionMask = 2147483647;
files = (
09A13AD2145F3B9000B227A4 /* Cocoa.framework in Frameworks */,
09972870147CCE41004E7017 /* Sparkle.framework in Frameworks */,
09F4DDA916019D0D002C4E04 /* Sparkle.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -92,7 +92,7 @@
09A13AD0145F3B9000B227A4 /* Frameworks */ = {
isa = PBXGroup;
children = (
0997286F147CCE41004E7017 /* Sparkle.framework */,
09F4DDA816019D0D002C4E04 /* Sparkle.framework */,
09A13AD1145F3B9000B227A4 /* Cocoa.framework */,
09A13AD3145F3B9000B227A4 /* Other Frameworks */,
);
@@ -148,7 +148,7 @@
09A13AC9145F3B9000B227A4 /* Sources */,
09A13ACA145F3B9000B227A4 /* Frameworks */,
09A13ACB145F3B9000B227A4 /* Resources */,
096AEEF714689FEB009F2AA4 /* CopyFiles */,
0970EAA9160A5B0000865D5D /* CopyFiles */,
);
buildRules = (
);
@@ -165,7 +165,7 @@
09A13AC4145F3B9000B227A4 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
LastUpgradeCheck = 0450;
};
buildConfigurationList = 09A13AC7145F3B9000B227A4 /* Build configuration list for PBXProject "DNSCrypt-Menubar" */;
compatibilityVersion = "Xcode 3.2";
@@ -248,7 +248,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_ARC = NO;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -275,8 +275,8 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
CLANG_ENABLE_OBJC_ARC = NO;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -293,9 +293,11 @@
09A13AEC145F3B9000B227A4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/../../../../../Library/Developer/Xcode/DerivedData/Sparkle-evkudstnytcsfdeunmxihhpyexor/Build/Products/Release\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "DNSCrypt-Menubar/DNSCrypt-Menubar-Prefix.pch";
@@ -308,9 +310,11 @@
09A13AED145F3B9000B227A4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/../../../../../Library/Developer/Xcode/DerivedData/Sparkle-evkudstnytcsfdeunmxihhpyexor/Build/Products/Release\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "DNSCrypt-Menubar/DNSCrypt-Menubar-Prefix.pch";
@@ -8,12 +8,11 @@
#import <Cocoa/Cocoa.h>
#define kRESOLVER_IP_LOCALHOST @"127.0.0.1"
#define kRESOLVER_IP_OPENDNS1 @"208.67.220.220"
#define kRESOLVER_IP_OPENDNS2 @"208.67.222.222"
#define kDNSCRYPT_RESOLVER @"208.67.220.220"
#define kDNSCRYPT_PREFPANE_APP_PATH @"/Library/PreferencePanes/DNSCrypt.prefPane"
#define kDNSCRYPT_USR_BASE_DIR kDNSCRYPT_PREFPANE_APP_PATH @"/Contents/Resources/usr"
#define kDNSCRIPT_SCRIPTS_BASE_DIR kDNSCRYPT_USR_BASE_DIR @"/scripts"
#define kDNSCRYPT_VAR_BASE_DIR @"/Library/Application Support/DNSCrypt"
#define kDNSCRYPT_CONTROL_DIR kDNSCRYPT_VAR_BASE_DIR @"/control"
@interface AppDelegate : NSObject <NSApplicationDelegate>
@@ -22,13 +21,25 @@
@property (strong) NSStatusItem *statusItem;
@property (strong) IBOutlet NSMenuItem *versionMenuItem;
#define kREFRESH_DELAY 2.0
#define kCHECKBOXES_AFTER_CHANGE_DELAY 8.0
#define kMAX_TRIES_AFTER_CHANGE (30 / kREFRESH_DELAY)
typedef enum {
kDNS_CONFIGURATION_UNKNOWN, kDNS_CONFIGURATION_VANILLA, kDNS_CONFIGURATION_LOCALHOST, kDNS_CONFIGURATION_OPENDNS
} DNSConfigurationState;
@property (strong) IBOutlet NSMenuItem *statusResolversMenuItem;
@property (strong) IBOutlet NSMenuItem *statusConfigurationMenuItem;
@property (strong) IBOutlet NSMenuItem *familyShieldMenuItem;
@property (strong) IBOutlet NSMenuItem *dnscryptMenuItem;
@property (strong) IBOutlet NSMenuItem *fallbackMenuItem;
@property (strong) IBOutlet NSMenuItem *opendnsMenuItem;
- (IBAction)preferencesMenuItemPushed:(NSMenuItem *)sender;
- (IBAction)dnscryptMenuItemPushed:(NSMenuItem *)sender;
- (IBAction)familyShieldMenuItemPushed:(NSMenuItem *)sender;
- (IBAction)fallbackMenuItemPushed:(NSMenuItem *)sender;
- (IBAction)opendnsMenuItemPushed:(NSMenuItem *)sender;
@end
+223 -44
View File
@@ -12,6 +12,10 @@
@implementation AppDelegate
@synthesize statusResolversMenuItem = _statusResolversMenuItem;
@synthesize statusConfigurationMenuItem = _statusConfigurationMenuItem;
@synthesize familyShieldMenuItem = _familyShieldMenuItem;
@synthesize dnscryptMenuItem = _dnscryptMenuItem;
@synthesize fallbackMenuItem = _fallbackMenuItem;
@synthesize opendnsMenuItem = _opendnsMenuItem;
@synthesize window = _window;
@synthesize dnscryptMenu = _dnscryptMenu;
@synthesize statusItem = _statusItem;
@@ -19,6 +23,61 @@
DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
- (void) setCheckBoxesEnabled: (BOOL) enabled
{
[_dnscryptMenuItem setEnabled: enabled];
[_opendnsMenuItem setEnabled: enabled];
[_familyShieldMenuItem setEnabled: enabled];
[_fallbackMenuItem setEnabled: enabled];
}
- (NSString *) fromCommand: (NSString *) launchPath withArguments: (NSArray *) arguments
{
NSPipe *pipe = [NSPipe pipe];
NSTask *task = [[NSTask alloc] init];
NSData *data;
NSString *result;
task.launchPath = launchPath;
task.arguments = arguments;
task.standardOutput = pipe;
[task launch];
data = [[pipe fileHandleForReading] readDataToEndOfFile];
[task waitUntilExit];
[task release];
result = [[[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding] autorelease];
if ([result hasSuffix: @"\n"]) {
result = [result substringToIndex: result.length - 1];
}
return result;
}
- (void) initState
{
NSString *res;
_dnscryptMenuItem.state = 0;
_familyShieldMenuItem.state = 0;
_opendnsMenuItem.state = 0;
_fallbackMenuItem.state = 0;
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-dnscrypt-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_dnscryptMenuItem setState: 1];
}
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-familyshield-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_familyShieldMenuItem setState: 1];
}
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-insecure-opendns-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_opendnsMenuItem setState: 1];
}
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-fallback-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_fallbackMenuItem setState: 1];
}
}
- (BOOL) resolversForService: (NSArray *) resolversForService includeResolvers:(NSArray *) resolvers
{
NSUInteger matches = 0U;
@@ -55,52 +114,37 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
led = [[NSImage alloc] initWithContentsOfFile: [bundle pathForImageResource: @"no-network.png"]];
}
_statusItem.image = led;
[led release];
}
- (BOOL) updateStatusWithCurrentConfig
{
currentState = kDNS_CONFIGURATION_UNKNOWN;
NSArray *resolversForLocalhost = [NSArray arrayWithObjects: kRESOLVER_IP_LOCALHOST, nil];
NSArray *resolversForOpenDNS = [NSArray arrayWithObjects: kRESOLVER_IP_OPENDNS1, kRESOLVER_IP_OPENDNS2, nil];
NSError *err;
NSString *resolvConf = [NSString stringWithContentsOfFile: @"/etc/resolv.conf" encoding: NSISOLatin1StringEncoding error: &err];
NSString *currentStateString = @"";
NSMutableString *resolversString = [[NSMutableString alloc] init];
if (! resolvConf) {
{
NSString *stateDescription = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./get-current-resolvers.sh | ./get-resolvers-description.sh", nil]];
if ([stateDescription isEqualToString: @"FamilyShield"]) {
currentState = kDNS_CONFIGURATION_OPENDNS;
} else if ([stateDescription isEqualToString: @"DNSCrypt"]) {
currentState = kDNS_CONFIGURATION_LOCALHOST;
} else if ([stateDescription isEqualToString: @"OpenDNS"]) {
currentState = kDNS_CONFIGURATION_OPENDNS;
} else if ([stateDescription isEqualToString: @"OpenDNS IPv6"]) {
currentState = kDNS_CONFIGURATION_OPENDNS;
} else if ([stateDescription isEqualToString: @"None"]) {
currentState = kDNS_CONFIGURATION_UNKNOWN;
currentStateString = NSLocalizedString(@"Network unavailable", @"Current state");
[resolversString appendString: NSLocalizedString(@"None", @"No current state")];
} else {
NSMutableArray *resolvers = [[NSMutableArray alloc] init];
NSArray *lines = [resolvConf componentsSeparatedByString: @"\n"];
for (NSString *line_ in lines) {
NSString *line = [line_ stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSArray *entry = [line componentsSeparatedByCharactersInSet: [NSCharacterSet whitespaceCharacterSet]];
if (![[entry objectAtIndex: 0U] isEqualToString: @"nameserver"]) {
continue;
}
NSString *resolver = [entry objectAtIndex: 1U];
[resolvers addObject: resolver];
[resolversString appendFormat: @"%s%@", (resolversString.length > 0 ? ", " : ""), resolver];
}
if ([self resolversForService: resolvers includeResolvers: resolversForLocalhost]) {
currentState = kDNS_CONFIGURATION_LOCALHOST;
currentStateString = NSLocalizedString(@"DNSCrypt", @"Current state");
} else if ([self resolversForService: resolvers includeResolvers: resolversForOpenDNS]) {
currentStateString = NSLocalizedString(@"OpenDNS", @"Current state");
currentState = kDNS_CONFIGURATION_OPENDNS;
} else {
currentStateString = NSLocalizedString(@"Default", @"Current state");
currentState = kDNS_CONFIGURATION_VANILLA;
}
if ([resolversString isEqualToString: kRESOLVER_IP_LOCALHOST]) {
resolversString = [NSString stringWithFormat: NSLocalizedString(@"%@\nusing DNSCrypt", @"Current resolver when DNSCrypt has been enabled"), kDNSCRYPT_RESOLVER];
}
} else if ([stateDescription isEqualToString: @"Updating"]) {
} else if (stateDescription.length > 0) {
currentState = kDNS_CONFIGURATION_VANILLA;
}
[self updateLedStatus];
_statusConfigurationMenuItem.title = currentStateString;
_statusResolversMenuItem.title = resolversString;
NSString *currentResolvers = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./get-current-resolvers.sh | ./get-upstream-resolvers.sh", nil]];
_statusConfigurationMenuItem.title = stateDescription;
_statusResolversMenuItem.title = currentResolvers;
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./gui-pop-conf-change.sh menubar", nil]];
if ([res isEqualToString: @"yes"]) {
[self initState];
}
[self setCheckBoxesEnabled: TRUE];
return TRUE;
}
@@ -108,19 +152,54 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
- (void) periodicallyUpdateStatusWithCurrentConfig {
[self updateStatusWithCurrentConfig];
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(periodicallyUpdateStatusWithCurrentConfig) object: nil];
[self performSelector: @selector(periodicallyUpdateStatusWithCurrentConfig) withObject:nil afterDelay: 2.5];
[self performSelector: @selector(periodicallyUpdateStatusWithCurrentConfig) withObject:nil afterDelay: 5.0];
}
- (void) waitForUpdate {
NSString *res;
static unsigned int tries;
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-tickets-count.sh", nil]];
if (res.length <= 0 || [res isEqualToString: @"0"] || tries > kMAX_TRIES_AFTER_CHANGE) {
tries = 0U;
[self periodicallyUpdateStatusWithCurrentConfig];
return;
}
tries++;
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(waitForUpdate) object: nil];
[self performSelector: @selector(waitForUpdate) withObject: self afterDelay:kREFRESH_DELAY];
}
- (void) showSpinners
{
[self setCheckBoxesEnabled: FALSE];
NSBundle *bundle = [NSBundle mainBundle];
NSImage *led = [[NSImage alloc] initWithContentsOfFile: [bundle pathForImageResource: @"no-network.png"]];
_statusItem.image = led;
[led release];
[self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./gui-push-conf-change.sh prefpane", nil]];
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(periodicallyUpdateStatusWithCurrentConfig) object: nil];
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(waitForUpdate) object: nil];
[self performSelector: @selector(waitForUpdate) withObject: self afterDelay:kREFRESH_DELAY];
}
- (void) awakeFromNib
{
_statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
_statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
[_statusItem retain];
_statusItem.highlightMode = TRUE;
_statusItem.toolTip = @"DNSCrypt";
_statusItem.menu = _dnscryptMenu;
NSString *versionStringFormat = NSLocalizedString(@"Client version: %@", @"Current version in the menu");
NSString *versionStringFormat = NSLocalizedString(@"Client UI version: %@", @"Current UI version as shown in the menu");
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
_versionMenuItem.title = [NSString stringWithFormat: versionStringFormat, version];
[self initState];
[self periodicallyUpdateStatusWithCurrentConfig];
[self updateLedStatus];
}
@@ -142,4 +221,104 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
}
}
- (BOOL) setDNSCryptOn {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-to-dnscrypt.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setDNSCryptOff {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-to-dhcp.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setFamilyShieldOn {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-familyshield-on.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setFamilyShieldOff {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-familyshield-off.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setInsecureOpenDNSOn {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-insecure-opendns-on.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setInsecureOpenDNSOff {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-insecure-opendns-off.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setFallbackOn {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-fallback-on.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setFallbackOff {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-fallback-off.sh", nil]];
(void) res;
return TRUE;
}
- (IBAction)dnscryptMenuItemPushed:(NSMenuItem *)sender
{
if (sender.state == 0) {
sender.state = 1;
[self setDNSCryptOn];
} else {
sender.state = 0;
[self setDNSCryptOff];
}
}
- (IBAction)familyShieldMenuItemPushed:(NSMenuItem *)sender
{
if (sender.state == 0) {
sender.state = 1;
[self setFamilyShieldOn];
} else {
sender.state = 0;
[self setFamilyShieldOff];
}
}
- (IBAction)opendnsMenuItemPushed:(NSMenuItem *)sender
{
if (sender.state == 0) {
sender.state = 1;
[self setInsecureOpenDNSOn];
} else {
sender.state = 0;
[self setInsecureOpenDNSOff];
}
}
- (IBAction)fallbackMenuItemPushed:(NSMenuItem *)sender
{
if (sender.state == 0) {
sender.state = 1;
[self setFallbackOn];
} else {
sender.state = 0;
[self setFallbackOff];
}
}
@end
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9 (beta)</string>
<string>0.19 (beta)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.9</string>
<string>0.19</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
@@ -29,13 +29,13 @@
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2011 OpenDNS, Inc. All rights reserved.</string>
<string>Copyright © 2012 OpenDNS, Inc. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUFeedURL</key>
<string>http://shared.opendns.com/upgrade/osx/dnscrypt-client/updater.xml</string>
<string>http://opendns.github.com/dnscrypt-osx-client/updates/osx/sparkle-updates.xml</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
</dict>
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">11C73</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138.23</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<int key="IBDocument.SystemTarget">1080</int>
<string key="IBDocument.SystemVersion">12A269</string>
<string key="IBDocument.InterfaceBuilderVersion">2818</string>
<string key="IBDocument.AppKitVersion">1187</string>
<string key="IBDocument.HIToolboxVersion">624.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">1938</string>
<string key="NS.object.0">2818</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSCustomObject</string>
<string>NSMenu</string>
<string>NSMenuItem</string>
<string>NSCustomObject</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -40,8 +40,8 @@
<array class="NSMutableArray" key="NSMenuItems">
<object class="NSMenuItem" id="1061864523">
<reference key="NSMenu" ref="705716806"/>
<string key="NSTitle">DNSCrypt Preferences</string>
<string key="NSKeyEquiv">,</string>
<string key="NSTitle">Enable DNSCrypt</string>
<string key="NSKeyEquiv">e</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSOnImage" id="720710128">
@@ -53,6 +53,52 @@
<string key="NSResourceName">NSMenuMixedState</string>
</object>
</object>
<object class="NSMenuItem" id="512564254">
<reference key="NSMenu" ref="705716806"/>
<string key="NSTitle">Fallback to insecure</string>
<string key="NSKeyEquiv">x</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="720710128"/>
<reference key="NSMixedImage" ref="1029721002"/>
</object>
<object class="NSMenuItem" id="947483772">
<reference key="NSMenu" ref="705716806"/>
<string key="NSTitle">Always use FamilyShield</string>
<string key="NSKeyEquiv">f</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="720710128"/>
<reference key="NSMixedImage" ref="1029721002"/>
</object>
<object class="NSMenuItem" id="31983378">
<reference key="NSMenu" ref="705716806"/>
<string key="NSTitle">Always use OpenDNS</string>
<string key="NSKeyEquiv">o</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="720710128"/>
<reference key="NSMixedImage" ref="1029721002"/>
</object>
<object class="NSMenuItem" id="392357407">
<reference key="NSMenu" ref="705716806"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="720710128"/>
<reference key="NSMixedImage" ref="1029721002"/>
</object>
<object class="NSMenuItem" id="721984748">
<reference key="NSMenu" ref="705716806"/>
<string key="NSTitle">DNSCrypt Preferences</string>
<string key="NSKeyEquiv">,</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="720710128"/>
<reference key="NSMixedImage" ref="1029721002"/>
</object>
<object class="NSMenuItem" id="669888296">
<reference key="NSMenu" ref="705716806"/>
<bool key="NSIsDisabled">YES</bool>
@@ -200,14 +246,6 @@
</object>
<int key="connectionID">543</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">preferencesMenuItemPushed:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="1061864523"/>
</object>
<int key="connectionID">548</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">statusConfigurationMenuItem</string>
@@ -232,6 +270,70 @@
</object>
<int key="connectionID">568</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">preferencesMenuItemPushed:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="721984748"/>
</object>
<int key="connectionID">571</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">familyShieldMenuItem</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="947483772"/>
</object>
<int key="connectionID">577</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dnscryptMenuItem</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="1061864523"/>
</object>
<int key="connectionID">578</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">dnscryptMenuItemPushed:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="1061864523"/>
</object>
<int key="connectionID">580</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">familyShieldMenuItemPushed:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="947483772"/>
</object>
<int key="connectionID">581</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">fallbackMenuItemPushed:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="512564254"/>
</object>
<int key="connectionID">584</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">opendnsMenuItem</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="31983378"/>
</object>
<int key="connectionID">587</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">opendnsMenuItemPushed:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="31983378"/>
</object>
<int key="connectionID">588</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">checkForUpdates:</string>
@@ -289,6 +391,11 @@
<reference ref="580228755"/>
<reference ref="472006404"/>
<reference ref="512706455"/>
<reference ref="721984748"/>
<reference ref="947483772"/>
<reference ref="31983378"/>
<reference ref="392357407"/>
<reference ref="512564254"/>
</array>
<reference key="parent" ref="0"/>
</object>
@@ -362,6 +469,31 @@
<reference key="object" ref="512706455"/>
<reference key="parent" ref="705716806"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">570</int>
<reference key="object" ref="721984748"/>
<reference key="parent" ref="705716806"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">572</int>
<reference key="object" ref="947483772"/>
<reference key="parent" ref="705716806"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">574</int>
<reference key="object" ref="31983378"/>
<reference key="parent" ref="705716806"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">576</int>
<reference key="object" ref="392357407"/>
<reference key="parent" ref="705716806"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">583</int>
<reference key="object" ref="512564254"/>
<reference key="parent" ref="705716806"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -384,31 +516,58 @@
<string key="564.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="565.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="566.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="570.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="572.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="576.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="583.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">568</int>
<int key="maxID">588</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">AppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">preferencesMenuItemPushed:</string>
<string key="NS.object.0">NSMenuItem</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">preferencesMenuItemPushed:</string>
<object class="IBActionInfo" key="NS.object.0">
<dictionary class="NSMutableDictionary" key="actions">
<string key="dnscryptMenuItemPushed:">NSMenuItem</string>
<string key="fallbackMenuItemPushed:">NSMenuItem</string>
<string key="familyShieldMenuItemPushed:">NSMenuItem</string>
<string key="opendnsMenuItemPushed:">NSMenuItem</string>
<string key="preferencesMenuItemPushed:">NSMenuItem</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="dnscryptMenuItemPushed:">
<string key="name">dnscryptMenuItemPushed:</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBActionInfo" key="fallbackMenuItemPushed:">
<string key="name">fallbackMenuItemPushed:</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBActionInfo" key="familyShieldMenuItemPushed:">
<string key="name">familyShieldMenuItemPushed:</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBActionInfo" key="opendnsMenuItemPushed:">
<string key="name">opendnsMenuItemPushed:</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBActionInfo" key="preferencesMenuItemPushed:">
<string key="name">preferencesMenuItemPushed:</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="dnscryptMenu">NSMenu</string>
<string key="dnscryptMenuItem">NSMenuItem</string>
<string key="fallbackMenuItem">NSMenuItem</string>
<string key="familyShieldMenuItem">NSMenuItem</string>
<string key="opendnsMenuItem">NSMenuItem</string>
<string key="statusConfigurationMenuItem">NSMenuItem</string>
<string key="statusResolversMenuItem">NSMenuItem</string>
<string key="versionMenuItem">NSMenuItem</string>
@@ -419,6 +578,22 @@
<string key="name">dnscryptMenu</string>
<string key="candidateClassName">NSMenu</string>
</object>
<object class="IBToOneOutletInfo" key="dnscryptMenuItem">
<string key="name">dnscryptMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo" key="fallbackMenuItem">
<string key="name">fallbackMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo" key="familyShieldMenuItem">
<string key="name">familyShieldMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo" key="opendnsMenuItem">
<string key="name">opendnsMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo" key="statusConfigurationMenuItem">
<string key="name">statusConfigurationMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
@@ -478,8 +653,8 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NSMenuCheckmark">{9, 8}</string>
<string key="NSMenuMixedState">{7, 2}</string>
<string key="NSMenuCheckmark">{11, 11}</string>
<string key="NSMenuMixedState">{10, 3}</string>
</dictionary>
</data>
</archive>
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

After

Width:  |  Height:  |  Size: 201 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 297 B

+1
View File
@@ -0,0 +1 @@
Versions/Current/Headers
@@ -1,36 +0,0 @@
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@class SUAppcastItem;
@interface SUAppcast : NSObject
{
@private
NSArray *items;
NSString *userAgentString;
id delegate;
NSString *downloadFilename;
NSURLDownload *download;
}
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)setDelegate:delegate;
- (void)setUserAgentString:(NSString *)userAgentString;
- (NSArray *)items;
@end
@interface NSObject (SUAppcastDelegate)
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
#endif
@@ -1,58 +0,0 @@
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H
@interface SUAppcastItem : NSObject
{
@private
NSString *title;
NSDate *date;
NSString *itemDescription;
NSURL *releaseNotesURL;
NSString *DSASignature;
NSString *minimumSystemVersion;
NSURL *fileURL;
NSString *versionString;
NSString *displayVersionString;
NSDictionary *deltaUpdates;
NSDictionary *propertiesDictionary;
NSURL *infoURL; // UK 2007-08-31
}
// Initializes with data from a dictionary provided by the RSS class.
- initWithDictionary:(NSDictionary *)dict;
- initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error;
- (NSString *)title;
- (NSString *)versionString;
- (NSString *)displayVersionString;
- (NSDate *)date;
- (NSString *)itemDescription;
- (NSURL *)releaseNotesURL;
- (NSURL *)fileURL;
- (NSString *)DSASignature;
- (NSString *)minimumSystemVersion;
- (NSDictionary *)deltaUpdates;
- (BOOL)isDeltaUpdate;
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
- (NSDictionary *)propertiesDictionary;
- (NSURL *)infoURL; // UK 2007-08-31
@end
#endif
@@ -1,161 +0,0 @@
//
// SUUpdater.h
// Sparkle
//
// Created by Andy Matuschak on 1/4/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUUPDATER_H
#define SUUPDATER_H
#import "SUVersionComparisonProtocol.h"
#import "SUVersionDisplayProtocol.h"
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
@interface SUUpdater : NSObject
{
@private
NSTimer *checkTimer;
SUUpdateDriver *driver;
NSString *customUserAgentString;
SUHost *host;
IBOutlet id delegate;
}
+ (SUUpdater *)sharedUpdater;
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
- initForBundle:(NSBundle *)bundle;
- (NSBundle *)hostBundle;
- (void)setDelegate:(id)delegate;
- delegate;
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
- (BOOL)automaticallyChecksForUpdates;
- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
- (NSTimeInterval)updateCheckInterval;
- (void)setFeedURL:(NSURL *)feedURL;
- (NSURL *)feedURL; // *** MUST BE CALLED ON MAIN THREAD ***
- (void)setUserAgentString:(NSString *)userAgent;
- (NSString *)userAgentString;
- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
- (BOOL)sendsSystemProfile;
- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
- (BOOL)automaticallyDownloadsUpdates;
// This IBAction is meant for a main menu item. Hook up any menu item to this action,
// and Sparkle will check for updates and report back its findings verbosely.
- (IBAction)checkForUpdates:(id)sender;
// This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update,
// in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an
// update is found, it will be downloaded and prepped for installation.
- (void)checkForUpdatesInBackground;
// Date of last update check. Returns nil if no check has been performed.
- (NSDate*)lastUpdateCheckDate;
// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
- (void)checkForUpdateInformation;
// Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer.
- (void)resetUpdateCycle;
- (BOOL)updateInProgress;
@end
// -----------------------------------------------------------------------------
// SUUpdater Delegate:
// -----------------------------------------------------------------------------
@interface NSObject (SUUpdaterDelegateInformalProtocol)
// Use this to keep Sparkle from popping up e.g. while your setup assistant is showing:
- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle;
// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
// Override this to dynamically specify the entire URL.
- (NSString*)feedURLStringForUpdater:(SUUpdater*)updater;
// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
// Implement this if you want to do some special handling with the appcast once it finishes loading.
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
// a valid update, if any, in the given appcast.
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
// Sent when a valid update is found by the update driver.
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
// Sent when a valid update is not found.
- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
// Sent immediately before installing the specified update.
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
// This is not called if the user didn't relaunch on the previous update, in that case it will immediately
// restart.
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
// Some apps *can not* be relaunched in certain circumstances. They can use this method
// to prevent a relaunch "hard":
- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater;
// Called immediately before relaunching.
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
// This method allows you to provide a custom version comparator.
// If you don't implement this method or return nil, the standard version comparator will be used.
- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
// This method allows you to provide a custom version comparator.
// If you don't implement this method or return nil, the standard version displayer will be used.
- (id <SUVersionDisplay>)versionDisplayerForUpdater:(SUUpdater *)updater;
// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
// Called before and after, respectively, an updater shows a modal alert window, to give the host
// the opportunity to hide attached windows etc. that may get in the way:
-(void) updaterWillShowModalAlert:(SUUpdater *)updater;
-(void) updaterDidShowModalAlert:(SUUpdater *)updater;
@end
// -----------------------------------------------------------------------------
// Constants:
// -----------------------------------------------------------------------------
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
#if defined(DEBUG) && DEBUG && 0
#define SU_MIN_CHECK_INTERVAL 60
#else
#define SU_MIN_CHECK_INTERVAL 60*60
#endif
#if defined(DEBUG) && DEBUG && 0
#define SU_DEFAULT_CHECK_INTERVAL 60
#else
#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
#endif
#endif
@@ -1,29 +0,0 @@
//
// SUVersionComparisonProtocol.h
// Sparkle
//
// Created by Andy Matuschak on 12/21/07.
// Copyright 2007 Andy Matuschak. All rights reserved.
//
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
#define SUVERSIONCOMPARISONPROTOCOL_H
#import <Cocoa/Cocoa.h>
/*!
@protocol
@abstract Implement this protocol to provide version comparison facilities for Sparkle.
*/
@protocol SUVersionComparison
/*!
@method
@abstract An abstract method to compare two version strings.
@discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
*/
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
@end
#endif
@@ -1,27 +0,0 @@
//
// SUVersionDisplayProtocol.h
// EyeTV
//
// Created by Uli Kusterer on 08.12.09.
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
//
#import <Cocoa/Cocoa.h>
/*!
@protocol
@abstract Implement this protocol to apply special formatting to the two
version numbers.
*/
@protocol SUVersionDisplay
/*!
@method
@abstract An abstract method to format two version strings.
@discussion You get both so you can display important distinguishing
information, but leave out unnecessary/confusing parts.
*/
-(void) formatVersion: (NSString**)inOutVersionA andVersion: (NSString**)inOutVersionB;
@end
@@ -1,21 +0,0 @@
//
// Sparkle.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SPARKLE_H
#define SPARKLE_H
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
// there are name-space collisions) so we can list all of them to start with:
#import <Sparkle/SUUpdater.h>
#import <Sparkle/SUAppcast.h>
#import <Sparkle/SUAppcastItem.h>
#import <Sparkle/SUVersionComparisonProtocol.h>
#endif
+1
View File
@@ -0,0 +1 @@
Versions/Current/Resources
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>11C73</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.Sparkle</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Sparkle</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.5 Beta (git)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>290f64f</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4D199</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>10K549</string>
<key>DTSDKName</key>
<string>macosx10.6</string>
<key>DTXcode</key>
<string>0420</string>
<key>DTXcodeBuild</key>
<string>4D199</string>
</dict>
</plist>
@@ -1,153 +0,0 @@
Copyright (c) 2006 Andy Matuschak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=================
EXTERNAL LICENSES
=================
This project uses software developed by the OpenSSL Project for use in the OpenSSL
Toolkit (http://www.openssl.org). This toolkit is licensed as follows:
/* ====================================================================
* Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modiÞcation, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* ÒThis product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)Ó
*
* 4. The names ÒOpenSSL ToolkitÓ and ÒOpenSSL ProjectÓ must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called ÒOpenSSLÓ
* nor may ÒOpenSSLÓ appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* ÒThis product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)Ó
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS ISÕÕ AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
Original SSLeay License
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric YoungÕs, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modiÞcation, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* ÒThis product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)Ó
* The word ÔcryptographicÕ can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows speciÞc code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* ÒThis product includes software written by Tim Hudson (tjh@cryptsoft.com)Ó
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS ISÕÕ AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
License for bspatch.c and bsdiff.c, from bsdiff 4.3 (<http://www.daemonology.net/bsdiff/>:
/*-
* Copyright 2003-2005 Colin Percival
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -1,182 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17-inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac8,1</key>
<string>iMac (April 2008)</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (January 2008)</string>
<key>MacBookAir2,1</key>
<string>MacBook Air (June 2009)</string>
<key>MacBookAir3,1</key>
<string>MacBook Air (October 2010)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
<key>MacBookPro4,1</key>
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core &quot;Harpertown&quot;)</string>
<key>MacPro4,1</key>
<string>Mac Pro (March 2009)</string>
<key>MacPro5,1</key>
<string>Mac Pro (August 2010)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
</dict>
</plist>
Binary file not shown.
@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>11C73</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>finish_installation</string>
<key>CFBundleIconFile</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.sparkle.finish-installation</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4D199</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>10K549</string>
<key>DTSDKName</key>
<string>macosx10.6</string>
<key>DTXcode</key>
<string>0420</string>
<key>DTXcodeBuild</key>
<string>4D199</string>
<key>LSBackgroundOnly</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

Some files were not shown because too many files have changed in this diff Show More