Support all resolvers

This commit is contained in:
Alter Step
2014-04-21 21:59:39 -07:00
parent bdb6ba3cfe
commit 417f80be83
205 changed files with 1384 additions and 2255 deletions
+15 -20
View File
@@ -1,15 +1,9 @@
//
// DNSCrypt.h
// DNSCrypt
//
// Created by OpenDNS, Inc. on 8/11/11.
// Copyright (c) 2011 OpenDNS, Inc. All rights reserved.
//
#import <PreferencePanes/PreferencePanes.h>
#import <WebKit/WebKit.h>
#import "CHCSVParser/CHCSVParser.h"
#define kDNSCRYPT_PACKAGE_VERSION @"0.21"
#define kDNSCRYPT_PACKAGE_VERSION @"1.0"
#define kDNSCRYPT_PREFPANE_APP_PATH @"/Library/PreferencePanes/DNSCrypt.prefPane"
#define kDNSCRYPT_USR_BASE_DIR kDNSCRYPT_PREFPANE_APP_PATH @"/Contents/Resources/usr"
@@ -23,16 +17,16 @@
#define kDNSCRYPT_BLACKLIST_DOMAINS_TMP_FILE kDNSCRYPT_CONTROL_DIR @"/blacklist-domains.tmp"
#define kDNSCRYPT_EXCEPTIONS_TMP_FILE kDNSCRYPT_CONTROL_DIR @"/exceptions.tmp"
#define kOPENDNS_URL @"https://www.opendns.com/welcome/"
#define kBUNDLE_IDENTIFIER @"com.github.dnscrypt-osxclient.DNSCrypt"
#define kBUNDLE_IDENTIFIER @"com.opendns.osx.DNSCrypt"
#define kRESOLVERS_LIST_FILE @"/usr/local/share/dnscrypt-proxy/dnscrypt-resolvers.csv"
#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
kDNS_CONFIGURATION_UNKNOWN, kDNS_CONFIGURATION_VANILLA, kDNS_CONFIGURATION_LOCALHOST
} DNSConfigurationState;
@interface DNSCrypt : NSPreferencePane {
@@ -43,14 +37,11 @@ typedef enum {
NSTabViewItem *_releaseNotesTabViewItem;
NSButton *_dnscryptButton;
NSButton *_opendnsButton;
NSButton *_familyShieldButton;
NSButton *_fallbackButton;
NSTextField *_currentResolverTextField;
NSImageView *_statusImageView;
NSTextField *_statusText;
WebView *_previewNotesWebView;
WebView *_releaseNotesWebView;
WebView *_aboutWebView;
NSTextFieldCell *_staticResolversTextField;
@@ -60,20 +51,18 @@ typedef enum {
WebView *_helpWebView;
NSButton *_viewLogButton;
NSButton *_queryLoggingButton;
NSPopUpButton *_resolverNamesButton;
}
@property (nonatomic, strong) IBOutlet NSTabView *tabView;
@property (nonatomic, strong) IBOutlet NSTabViewItem *aboutTabViewItem;
@property (nonatomic, strong) IBOutlet NSTabViewItem *releaseNotesTabViewItem;
@property (nonatomic, strong) IBOutlet NSButton *dnscryptButton;
@property (nonatomic, strong) IBOutlet NSButton *opendnsButton;
@property (nonatomic, strong) IBOutlet NSButton *familyShieldButton;
@property (nonatomic, strong) IBOutlet NSButton *fallbackButton;
@property (nonatomic, strong) IBOutlet NSTextField *currentResolverTextField;
@property (nonatomic, strong) IBOutlet NSImageView *statusImageView;
@property (nonatomic, strong) IBOutlet NSTextField *statusText;
@property (nonatomic, strong) IBOutlet WebView *previewNotesWebView;
@property (nonatomic, strong) IBOutlet WebView *releaseNotesWebView;
@property (nonatomic, strong) IBOutlet WebView *aboutWebView;
@property (nonatomic, strong) IBOutlet NSTextFieldCell *staticResolversTextField;
@@ -84,14 +73,19 @@ typedef enum {
@property (nonatomic, strong) IBOutlet NSButton *viewLogButton;
@property (nonatomic, strong) IBOutlet NSButton *queryLoggingButton;
@property (nonatomic, strong) IBOutlet NSPopUpButton *resolverNamesButton;
@property (nonatomic, strong) IBOutlet NSTextField *locationText;
@property (nonatomic, strong) IBOutlet NSButton *providerLink;
@property (nonatomic, strong) IBOutlet NSTextFieldCell *descriptionText;
- (void) mainViewDidLoad;
- (IBAction)dnscryptButtonPressed:(NSButton *)sender;
- (IBAction)opendnsButtonPressed:(NSButton *)sender;
- (IBAction)familyShieldButtonPressed:(NSButton *)sender;
- (IBAction)fallbackButtonPressed:(NSButton *)sender;
- (IBAction)openDNSLinkPushed:(NSButton *)sender;
- (IBAction)providerLinkPushed:(NSButton *)sender;
- (IBAction)uninstallPushed:(NSButton *)sender;
- (IBAction)staticResolversTextFieldChanged:(NSTextField *)sender;
- (IBAction)queryLoggingButtonPressed:(NSButtonCell *)sender;
@@ -100,5 +94,6 @@ typedef enum {
- (IBAction)blacklistDomainsUpdated:(NSTextField *)sender;
- (IBAction)exceptionsUpdated:(NSTextField *)sender;
- (IBAction)helpButtonPressed:(NSButton *)sender;
- (IBAction)resolversNamesPopupButtonPressed:(NSPopUpButton *)sender;
@end