Compare commits

...
17 Commits
Author SHA1 Message Date
Alter Step 9530c272a3 Find config differences to do less reloads
This is not 100% fail proof , because the configuration can change and
come back to the original one during the server restart but at the end
of the day it's a better user experience.
2017-02-09 10:47:34 +01:00
Alter Step 5495b8b885 less ugly 2017-02-09 02:28:37 +01:00
Alter Step 15dcfdbe02 Reduce the fontsize 2017-02-09 02:21:46 +01:00
Alter Step da5f9b9ce8 wildcards at the end of an ip -> ok! 2017-02-09 02:16:17 +01:00
Alter Step 17c48f58c1 Refresh faster 2017-02-09 02:10:54 +01:00
Alter Step 5a42ae621a Dont erase .tmp files, this is the data from the UI 2017-02-09 02:05:18 +01:00
Alter Step 9b6fbab397 useful script 2017-02-09 02:01:42 +01:00
Alter Step 44908fa7de many many changes! 2017-02-09 02:01:13 +01:00
Alter Step e268f23c3d Merge branch 'master' of https://github.com/alterstep/dnscrypt-osx-client
* 'master' of https://github.com/alterstep/dnscrypt-osx-client:
  Add brew cask installation instructions.
  macOS
2017-02-08 02:38:56 +01:00
Alter Step f6aa7c2f8d Goodbye fallback! 2017-02-08 02:38:46 +01:00
Alter Step 217bdfba9a xib 2017-02-08 00:15:22 +01:00
Alter Step 9f4a56f4e8 Merge pull request #124 from sepehr/patch-1
Add brew cask installation instructions
2016-12-22 00:16:46 +01:00
Sepehr Lajevardi ea3b7e6f8e Add brew cask installation instructions. 2016-12-21 21:14:40 +03:30
Alter Step 658e5ed2e6 macOS 2016-08-02 18:38:23 +02:00
Alter Step f3687a2aa0 Screen captures 2016-08-01 23:59:05 +02:00
Alter Step c90946bb04 Screen captures 2016-08-01 23:58:15 +02:00
Alter Step 4f1b2ec86e Works on Sierra 2016-07-31 15:07:10 +02:00
51 changed files with 623 additions and 749 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

-16
View File
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2011-2014 OpenDNS, Inc.
* Copyright (c) 2014 AlterStep
*
* 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.
*/
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.12</string>
<string>1.0.13</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.12</string>
<string>1.0.13</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
@@ -539,7 +539,7 @@
<key>USE_HFS+_COMPRESSION</key>
<true/>
<key>VERSION</key>
<string>1.0.12</string>
<string>1.0.13</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
@@ -1032,7 +1032,7 @@
<key>USE_HFS+_COMPRESSION</key>
<true/>
<key>VERSION</key>
<string>1.0.12</string>
<string>1.0.13</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
VERSION='1.0.12'
VERSION='1.0.13'
echo '*** Do not forget to increase CURRENT_VERSION in common.inc'
sleep 10
-21
View File
@@ -1,21 +0,0 @@
/*
* Copyright (c) 2011-2014 OpenDNS, Inc.
* Copyright (c) 2014-2015 AlterStep
*
* 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.
*/
The get-dhcp-resolvers.sh and check-network-change.sh scripts use code
snippets from the dnssec-trigger project, by Wouter Wijngaards, NLnet
Labs. (great and similar project, check it out:
http://www.nlnetlabs.nl/projects/dnssec-trigger/)
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
0932D7F61E4B324A00E8F3FC /* NSPlaceHolderTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0932D7F51E4B324A00E8F3FC /* NSPlaceHolderTextView.m */; };
0946B0C613F47F53008277C6 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0946B0C513F47F53008277C6 /* Cocoa.framework */; };
0946B0C813F47F53008277C6 /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0946B0C713F47F53008277C6 /* PreferencePanes.framework */; };
0946B0D213F47F53008277C6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0946B0D013F47F53008277C6 /* InfoPlist.strings */; };
@@ -29,6 +30,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0932D7F51E4B324A00E8F3FC /* NSPlaceHolderTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSPlaceHolderTextView.m; sourceTree = "<group>"; };
0932D7F71E4B327D00E8F3FC /* NSPlaceHolderTextView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSPlaceHolderTextView.h; sourceTree = "<group>"; };
0946B0C213F47F53008277C6 /* DNSCrypt.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DNSCrypt.prefPane; sourceTree = BUILT_PRODUCTS_DIR; };
0946B0C513F47F53008277C6 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
0946B0C713F47F53008277C6 /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = System/Library/Frameworks/PreferencePanes.framework; sourceTree = SDKROOT; };
@@ -124,6 +127,7 @@
09AD019F15D2483500638DCE /* html */,
09FB094315C9DE6400B8AAB6 /* usr */,
0946B0CE13F47F53008277C6 /* Supporting Files */,
096AF93A1E4B565A003C3D67 /* UI Additions */,
);
path = DNSCrypt;
sourceTree = "<group>";
@@ -139,6 +143,15 @@
name = "Supporting Files";
sourceTree = "<group>";
};
096AF93A1E4B565A003C3D67 /* UI Additions */ = {
isa = PBXGroup;
children = (
0932D7F51E4B324A00E8F3FC /* NSPlaceHolderTextView.m */,
0932D7F71E4B327D00E8F3FC /* NSPlaceHolderTextView.h */,
);
name = "UI Additions";
sourceTree = "<group>";
};
09B1686F1906062E003FDBCC /* CHCSVParser */ = {
isa = PBXGroup;
children = (
@@ -258,6 +271,7 @@
buildActionMask = 2147483647;
files = (
09B168731906062E003FDBCC /* CHCSVParser.m in Sources */,
0932D7F61E4B324A00E8F3FC /* NSPlaceHolderTextView.m in Sources */,
0946B0D613F47F53008277C6 /* DNSCrypt.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.12</string>
<string>1.0.13</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.12</string>
<string>1.0.13</string>
<key>NSHumanReadableCopyright</key>
<string>BSD</string>
<key>NSMainNibFile</key>
+22 -20
View File
@@ -2,8 +2,11 @@
#import <PreferencePanes/PreferencePanes.h>
#import <WebKit/WebKit.h>
#import "CHCSVParser/CHCSVParser.h"
#import "NSPlaceHolderTextView.h"
#define kDNSCRYPT_PACKAGE_VERSION @"1.0.12"
#define kDNSCRYPT_PACKAGE_VERSION @"1.0.13"
#define kDNSCRYPT_PROJECT_URL @"https://dnscrypt.org/osxclient"
#define kDNSCRYPT_PREFPANE_APP_PATH @"/Library/PreferencePanes/DNSCrypt.prefPane"
#define kDNSCRYPT_USR_BASE_DIR kDNSCRYPT_PREFPANE_APP_PATH @"/Contents/Resources/usr"
@@ -14,6 +17,8 @@
#define kDNSCRYPT_CONTROL_DIR kDNSCRYPT_VAR_BASE_DIR @"/control"
#define kDNSCRYPT_QUERY_LOG_FILE @"/var/log/dnscrypt-query.log"
#define kDNSCRYPT_BLOCKED_QUERY_LOG_FILE @"/var/log/dnscrypt-blocked-query.log"
#define kDNSCRYPT_BLACKLIST_IPS_TMP_FILE kDNSCRYPT_CONTROL_DIR @"/blacklist-ips.tmp"
#define kDNSCRYPT_BLACKLIST_DOMAINS_TMP_FILE kDNSCRYPT_CONTROL_DIR @"/blacklist-domains.tmp"
#define kDNSCRYPT_EXCEPTIONS_TMP_FILE kDNSCRYPT_CONTROL_DIR @"/exceptions.tmp"
@@ -22,15 +27,14 @@
#define kRESOLVERS_LIST_FILE kDNSCRYPT_SHARE_BASE_DIR @"/dnscrypt-proxy/dnscrypt-resolvers.csv"
#define kREFRESH_DELAY 2.0
#define kCHECKBOXES_AFTER_CHANGE_DELAY 8.0
#define kREFRESH_DELAY 1.0
#define kMAX_TRIES_AFTER_CHANGE (30 / kREFRESH_DELAY)
typedef enum {
kDNS_CONFIGURATION_UNKNOWN, kDNS_CONFIGURATION_VANILLA, kDNS_CONFIGURATION_LOCALHOST
} DNSConfigurationState;
@interface DNSCrypt : NSPreferencePane {
@interface DNSCrypt : NSPreferencePane<NSTextViewDelegate, WebUIDelegate> {
AuthorizationRef auth;
NSTabView *_tabView;
@@ -38,7 +42,6 @@ typedef enum {
NSTabViewItem *_releaseNotesTabViewItem;
NSButton *_dnscryptButton;
NSButton *_fallbackButton;
NSButton *_disableIPv6Button;
NSTextField *_currentResolverTextField;
@@ -47,20 +50,21 @@ typedef enum {
WebView *_releaseNotesWebView;
WebView *_aboutWebView;
NSTextFieldCell *_staticResolversTextField;
NSTextField *_blacklistIPsTextField;
NSTextField *_blacklistDomainsTextField;
NSTextField *_exceptionsTextField;
WebView *_helpWebView;
NSPlaceHolderTextView *_blacklistIPsTextView;
NSPlaceHolderTextView *_blacklistDomainsTextView;
NSPlaceHolderTextView *_exceptionsTextView;
NSButton *_viewLogButton;
NSButton *_queryLoggingButton;
NSButton *_viewBlockedLogButton;
NSButton *_blockedQueryLoggingButton;
NSPopUpButton *_resolverNamesButton;
NSButton *_saveAndApplyChangesButton;
}
@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 *fallbackButton;
@property (nonatomic, strong) IBOutlet NSButton *disableIPv6Button;
@property (nonatomic, strong) IBOutlet NSTextField *currentResolverTextField;
@@ -69,12 +73,12 @@ typedef enum {
@property (nonatomic, strong) IBOutlet WebView *releaseNotesWebView;
@property (nonatomic, strong) IBOutlet WebView *aboutWebView;
@property (nonatomic, strong) IBOutlet NSTextFieldCell *staticResolversTextField;
@property (nonatomic, strong) IBOutlet NSTextField *blacklistIPsTextField;
@property (nonatomic, strong) IBOutlet NSTextField *blacklistDomainsTextField;
@property (nonatomic, strong) IBOutlet NSTextField *exceptionsTextField;
@property (nonatomic, strong) IBOutlet WebView *helpWebView;
@property (nonatomic, strong) IBOutlet NSPlaceHolderTextView *blacklistIPsTextView;
@property (nonatomic, strong) IBOutlet NSPlaceHolderTextView *blacklistDomainsTextView;
@property (nonatomic, strong) IBOutlet NSPlaceHolderTextView *exceptionsTextView;
@property (nonatomic, strong) IBOutlet NSButton *viewLogButton;
@property (nonatomic, strong) IBOutlet NSButton *queryLoggingButton;
@property (nonatomic, strong) IBOutlet NSButton *blockedQueryLoggingButton;
@property (nonatomic, strong) IBOutlet NSPopUpButton *resolverNamesButton;
@property (nonatomic, strong) IBOutlet NSTextField *locationText;
@@ -86,18 +90,16 @@ typedef enum {
- (void) mainViewDidLoad;
- (IBAction)dnscryptButtonPressed:(NSButton *)sender;
- (IBAction)fallbackButtonPressed:(NSButton *)sender;
- (IBAction)disableIPv6ButtonPressed:(NSButton *)sender;
- (IBAction)providerLinkPushed:(NSButton *)sender;
- (IBAction)uninstallPushed:(NSButton *)sender;
- (IBAction)staticResolversTextFieldChanged:(NSTextField *)sender;
- (IBAction)queryLoggingButtonPressed:(NSButtonCell *)sender;
- (IBAction)viewLogButtonPushed:(NSButton *)sender;
- (IBAction)blacklistIPsUpdated:(NSTextField *)sender;
- (IBAction)blacklistDomainsUpdated:(NSTextField *)sender;
- (IBAction)exceptionsUpdated:(NSTextField *)sender;
- (IBAction)helpButtonPressed:(NSButton *)sender;
- (IBAction)blockedQueryLoggingButtonPressed:(NSButtonCell *)sender;
- (IBAction)viewBlockedLogButtonPushed:(NSButton *)sender;
- (IBAction)resolversNamesPopupButtonPressed:(NSPopUpButton *)sender;
- (IBAction)saveAndApplyChangesButtonPressed:(NSButton *)sender;
- (IBAction)helpButtonPressed:(NSButton *)sender;
@end
+80 -67
View File
@@ -8,14 +8,13 @@
@synthesize releaseNotesWebView = _releaseNotesWebView;
@synthesize aboutWebView = _aboutWebView;
@synthesize staticResolversTextField = _staticResolversTextField;
@synthesize blacklistIPsTextField = _blacklistIPsTextField;
@synthesize blacklistDomainsTextField = _blacklistDomainsTextField;
@synthesize helpWebView = _helpWebView;
@synthesize blacklistIPsTextView = _blacklistIPsTextView;
@synthesize blacklistDomainsTextView = _blacklistDomainsTextView;
@synthesize exceptionsTextView = _exceptionsTextView;
@synthesize viewLogButton = _viewLogButton;
@synthesize queryLoggingButton = _queryLoggingButton;
@synthesize exceptionsTextField = _exceptionsTextField;
@synthesize blockedQueryLoggingButton = _blockedQueryLoggingButton;
@synthesize dnscryptButton = _dnscryptButton;
@synthesize fallbackButton = _fallbackButton;
@synthesize disableIPv6Button = _disableIPv6Button;
@synthesize statusImageView = _statusImageView;
@synthesize statusText = _statusText;
@@ -24,11 +23,14 @@
DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
NSArray *resolversList;
BOOL blacklistDomainsUpdated = FALSE;
BOOL blacklistIPsUpdated = FALSE;
BOOL exceptionsUpdated = FALSE;
- (void) setCheckBoxesEnabled: (BOOL) enabled
{
[_dnscryptButton setEnabled: enabled];
[_fallbackButton setEnabled: enabled];
[_disableIPv6Button setEnabled: enabled];
[_resolverNamesButton setEnabled: enabled];
}
@@ -57,17 +59,16 @@ NSArray *resolversList;
NSString *res;
_dnscryptButton.state = 0;
_fallbackButton.state = 0;
_disableIPv6Button.state = 0;
[_blacklistIPsTextView setPlaceHolderText: @"IP addresses to block.\n\nExamples:\n\n203.0.113.7\n198.51.100.*"];
[_blacklistDomainsTextView setPlaceHolderText: @"Domains and patterns to block.\n\nExamples:\n\nexample.com\nads.*\n*sex*"];
[_exceptionsTextView setPlaceHolderText: @"Domains bypassing DNSCrypt.\n\nExamples:\n\nlocal\nlocaldomain\nlan"];
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && exec ./get-dnscrypt-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_dnscryptButton setState: 1];
}
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && exec ./get-fallback-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_fallbackButton setState: 1];
}
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && exec ./get-aaaa-blocking-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_disableIPv6Button setState: 1];
@@ -78,18 +79,22 @@ NSArray *resolversList;
if ([res isEqualToString: @"yes"]) {
[_queryLoggingButton setState: 1];
}
res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && exec ./get-blocked-query-logging-status.sh", nil]];
if ([res isEqualToString: @"yes"]) {
[_blockedQueryLoggingButton setState: 1];
}
NSString *fileContent;
fileContent = [NSString stringWithContentsOfFile: kDNSCRYPT_BLACKLIST_IPS_TMP_FILE encoding:NSUTF8StringEncoding error: nil];
if (fileContent != nil) {
[_blacklistIPsTextField setStringValue: fileContent];
[_blacklistIPsTextView setString: fileContent];
}
fileContent = [NSString stringWithContentsOfFile: kDNSCRYPT_BLACKLIST_DOMAINS_TMP_FILE encoding:NSUTF8StringEncoding error: nil];
if (fileContent != nil) {
[_blacklistDomainsTextField setStringValue: fileContent];
[_blacklistDomainsTextView setString: fileContent];
}
fileContent = [NSString stringWithContentsOfFile: kDNSCRYPT_EXCEPTIONS_TMP_FILE encoding:NSUTF8StringEncoding error: nil];
if (fileContent != nil) {
[_exceptionsTextField setStringValue: fileContent];
[_exceptionsTextView setString: fileContent];
}
[_resolverNamesButton removeAllItems];
@@ -196,20 +201,6 @@ NSArray *resolversList;
return TRUE;
}
- (BOOL) setFallbackOn {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_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: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-fallback-off.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setDisableIPv6On {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-aaaa-blocking-on.sh", nil]];
@@ -233,15 +224,6 @@ NSArray *resolversList;
}
}
- (IBAction)fallbackButtonPressed:(NSButton *)sender
{
if (sender.state != 0) {
[self setFallbackOn];
} else {
[self setFallbackOff];
}
}
- (IBAction)disableIPv6ButtonPressed:(NSButton *)sender
{
if (sender.state != 0) {
@@ -324,17 +306,6 @@ NSArray *resolversList;
} else {
[[_aboutWebView mainFrame] loadRequest:[NSURLRequest requestWithURL: aboutURL]];
}
[_helpWebView setDrawsBackground:false];
[_helpWebView setShouldUpdateWhileOffscreen:false];
[_helpWebView setUIDelegate:self];
NSURL *helpURL;
NSString *helpURLPath = [[NSBundle bundleForClass: [self class]] pathForResource: @"help" ofType: @"html" inDirectory: @"html"];
if (! helpURLPath || ! (helpURL = [NSURL fileURLWithPath: helpURLPath])) {
assert(0);
} else {
[[_helpWebView mainFrame] loadRequest:[NSURLRequest requestWithURL: helpURL]];
}
}
- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element
@@ -376,6 +347,20 @@ NSArray *resolversList;
return TRUE;
}
- (BOOL) setBlockedQueryLoggingOn {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-blocked-query-logging-on.sh", nil]];
(void) res;
return TRUE;
}
- (BOOL) setBlockedQueryLoggingOff {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-blocked-query-logging-off.sh", nil]];
(void) res;
return TRUE;
}
- (IBAction)queryLoggingButtonPressed:(NSButtonCell *)sender {
if (sender.state != 0) {
[self setQueryLoggingOn];
@@ -384,10 +369,23 @@ NSArray *resolversList;
}
}
- (IBAction)blockedQueryLoggingButtonPressed:(NSButtonCell *)sender {
if (sender.state != 0) {
[self setBlockedQueryLoggingOn];
} else {
[self setBlockedQueryLoggingOff];
}
}
- (IBAction)viewLogButtonPushed:(NSButton *)sender {
[self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"open /Applications/Utilities/Console.app " kDNSCRYPT_QUERY_LOG_FILE " || open " kDNSCRYPT_QUERY_LOG_FILE, nil]];
}
- (IBAction)viewBlockedLogButtonPushed:(NSButton *)sender {
[self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"open /Applications/Utilities/Console.app " kDNSCRYPT_BLOCKED_QUERY_LOG_FILE " || open " kDNSCRYPT_BLOCKED_QUERY_LOG_FILE, nil]];
}
- (BOOL) updateBlacklistIPs {
[self showSpinners];
NSString *res = [self fromCommand: @"/bin/csh" withArguments: [NSArray arrayWithObjects: @"-f", @"-c", @"cd '" kDNSCRYPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./update-blacklist-ips.sh", nil]];
@@ -395,8 +393,8 @@ NSArray *resolversList;
return TRUE;
}
- (IBAction)blacklistIPsUpdated:(NSTextField *)sender {
NSString *content = sender.stringValue;
- (IBAction)blacklistIPsUpdate:(NSPlaceHolderTextView *)sender {
NSString *content = sender.string;
if ([content writeToFile: kDNSCRYPT_BLACKLIST_IPS_TMP_FILE atomically: YES encoding: NSUTF8StringEncoding error: nil] != YES) {
return;
}
@@ -410,8 +408,8 @@ NSArray *resolversList;
return TRUE;
}
- (IBAction)blacklistDomainsUpdated:(NSTextField *)sender {
NSString *content = sender.stringValue;
- (IBAction)blacklistDomainsUpdate:(NSPlaceHolderTextView *)sender {
NSString *content = sender.string;
if ([content writeToFile: kDNSCRYPT_BLACKLIST_DOMAINS_TMP_FILE atomically: YES encoding: NSUTF8StringEncoding error: nil] != YES) {
return;
}
@@ -425,28 +423,43 @@ NSArray *resolversList;
return TRUE;
}
- (IBAction)exceptionsUpdated:(NSTextField *)sender {
NSString *content = sender.stringValue;
- (IBAction)exceptionsUpdate:(NSPlaceHolderTextView *)sender {
NSString *content = sender.string;
if ([content writeToFile: kDNSCRYPT_EXCEPTIONS_TMP_FILE atomically: YES encoding: NSUTF8StringEncoding error: nil] != YES) {
return;
}
[self updateExceptions];
}
- (IBAction)helpButtonPressed:(NSButton *)sender {
if (_helpWebView.isHidden) {
[_helpWebView.window makeFirstResponder: nil];
[_helpWebView setHidden: NO];
[_helpWebView setAlphaValue: 0.0F];
[_helpWebView.animator setAlphaValue: 1.0F];
[_helpWebView setDrawsBackground: TRUE];
[_viewLogButton setHidden: YES];
[_queryLoggingButton setHidden: YES];
} else {
[_helpWebView.window makeFirstResponder: nil];
[_helpWebView setHidden: YES];
[_queryLoggingButton setHidden: NO];
- (IBAction)saveAndApplyChangesButtonPressed:(NSButton *)sender {
[self showSpinners];
if (blacklistDomainsUpdated) {
[self blacklistDomainsUpdate: _blacklistDomainsTextView];
}
if (blacklistIPsUpdated) {
[self blacklistIPsUpdate: _blacklistIPsTextView];
}
if (exceptionsUpdated) {
[self exceptionsUpdate: _exceptionsTextView];
}
blacklistDomainsUpdated = FALSE;
blacklistIPsUpdated = FALSE;
exceptionsUpdated = FALSE;
}
-(void)textDidChange:(NSNotification *)notification {
if (notification.object == _blacklistDomainsTextView) {
blacklistDomainsUpdated = TRUE;
} else if (notification.object == _blacklistIPsTextView) {
blacklistIPsUpdated = TRUE;
} else if (notification.object == _exceptionsTextView) {
exceptionsUpdated = TRUE;
}
}
-(void)helpButtonPressed:(NSButton *)sender {
(void) sender;
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString: kDNSCRYPT_PROJECT_URL]];
}
@end
@@ -0,0 +1,15 @@
#ifndef NSPlaceHolderTextView_h
#define NSPlaceHolderTextView_h
#import <Foundation/Foundation.h>
IB_DESIGNABLE
@interface NSPlaceHolderTextView : NSTextView
@property (nonatomic, retain) IBInspectable NSAttributedString *placeHolder;
- (void)setPlaceHolderText:(NSString *)txt;
@end
#endif /* NSPlaceHolderTextView_h */
@@ -0,0 +1,33 @@
#import "NSPlaceHolderTextView.h"
@implementation NSPlaceHolderTextView
@synthesize placeHolder = _placeHolder;
- (void)setPlaceHolderText:(NSString *)txt {
NSColor *txtColor = [NSColor grayColor];
NSDictionary *txtDict = [NSDictionary dictionaryWithObjectsAndKeys:txtColor, NSForegroundColorAttributeName, nil];
_placeHolder = [[NSAttributedString alloc] initWithString:txt attributes:txtDict];
}
- (BOOL)becomeFirstResponder
{
[self setNeedsDisplay:YES];
return [super becomeFirstResponder];
}
- (void)drawRect:(NSRect)rect
{
[super drawRect:rect];
if ([[self string] isEqualToString:@""] && self != [[self window] firstResponder])
[_placeHolder drawAtPoint:NSMakePoint(0,0)];
}
- (BOOL)resignFirstResponder
{
[self setNeedsDisplay:YES];
return [super resignFirstResponder];
}
@end
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="15B17c" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11542" systemVersion="16E144f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1070" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
<plugIn identifier="com.apple.WebKitIBPlugin" version="8191"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
<plugIn identifier="com.apple.WebKitIBPlugin" version="11542"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="DNSCrypt">
@@ -11,15 +12,14 @@
<outlet property="_window" destination="12" id="26"/>
<outlet property="aboutTabViewItem" destination="356" id="376"/>
<outlet property="aboutWebView" destination="358" id="359"/>
<outlet property="blacklistDomainsTextField" destination="404" id="446"/>
<outlet property="blacklistIPsTextField" destination="402" id="444"/>
<outlet property="currentResolverTextField" destination="174" id="296"/>
<outlet property="blacklistDomainsTextView" destination="gRF-Cw-rp9" id="4B2-cK-eTz"/>
<outlet property="blacklistIPsTextView" destination="Jos-8C-r8h" id="RN8-Gu-oPA"/>
<outlet property="blockedQueryLoggingButton" destination="J2W-Uj-YcC" id="6K0-xb-DKk"/>
<outlet property="currentResolverTextField" destination="Laq-Rf-7ph" id="IoP-Tf-apC"/>
<outlet property="descriptionText" destination="2aF-7O-SkX" id="nM9-H2-22g"/>
<outlet property="disableIPv6Button" destination="ESJ-Kf-yNj" id="xFL-L3-vLp"/>
<outlet property="dnscryptButton" destination="179" id="363"/>
<outlet property="exceptionsTextField" destination="406" id="452"/>
<outlet property="fallbackButton" destination="281" id="365"/>
<outlet property="helpWebView" destination="449" id="450"/>
<outlet property="exceptionsTextView" destination="YvE-Lo-YVl" id="9u8-Sn-Poo"/>
<outlet property="locationText" destination="e9H-pq-zb6" id="Elc-qh-Z8b"/>
<outlet property="providerLink" destination="323" id="Riq-Cc-CLa"/>
<outlet property="queryLoggingButton" destination="398" id="458"/>
@@ -48,7 +48,6 @@
<tabView initialItem="100" id="99">
<rect key="frame" x="13" y="10" width="563" height="359"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<font key="font" metaFont="system"/>
<tabViewItems>
<tabViewItem label="General" identifier="1" id="100">
@@ -56,10 +55,9 @@
<rect key="frame" x="10" y="33" width="543" height="313"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button toolTip="Use OpenDNS resolvers with the DNSCrypt protocol" id="179">
<button toolTip="Use the DNSCrypt protocol" id="179">
<rect key="frame" x="15" y="234" width="204" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="check" title="Enable DNSCrypt" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="180">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="systemBold" size="14"/>
@@ -69,54 +67,18 @@
<action selector="dnscryptButtonPressed:" target="-2" id="368"/>
</connections>
</button>
<button id="281">
<rect key="frame" x="15" y="164" width="239" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<string key="toolTip">Only check this box if you often have to connect to public WiFi hotspots and you don't want to manually disable DNSCrypt in order to pass a captive portal.</string>
<animations/>
<buttonCell key="cell" type="check" title="Automatically disable if blocked" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="282">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system" size="14"/>
</buttonCell>
<accessibility description="Fallback to insecure DNS"/>
<connections>
<action selector="fallbackButtonPressed:" target="-2" id="372"/>
</connections>
</button>
<textField verticalHuggingPriority="750" id="162">
<rect key="frame" x="14" y="96" width="173" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Current DNS settings:" id="163">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="Wkj-kT-maK">
<rect key="frame" x="278" y="208" width="70" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Location:" id="GO7-P1-scE">
<font key="font" metaFont="titleBar"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="174">
<rect key="frame" x="14" y="-3" width="240" height="83"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="..." placeholderString="" id="175">
<font key="font" size="14" name="Monaco"/>
<color key="textColor" white="0.2046370968" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="rnd-WE-K61">
<rect key="frame" x="278" y="46" width="261" height="122"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="2aF-7O-SkX">
<font key="font" size="14" name="Monaco"/>
<color key="textColor" white="0.2046370968" alpha="1" colorSpace="calibratedWhite"/>
@@ -126,7 +88,6 @@
<textField verticalHuggingPriority="750" id="274">
<rect key="frame" x="55" y="283" width="219" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="..." placeholderString="" id="275">
<font key="font" size="16" name="Monaco"/>
<color key="textColor" white="0.2046370968" alpha="1" colorSpace="calibratedWhite"/>
@@ -136,22 +97,16 @@
<imageView id="270">
<rect key="frame" x="17" y="277" width="32" height="32"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageAlignment="topLeft" imageScaling="proportionallyDown" image="ajax-loader" id="271"/>
</imageView>
<box horizontalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="276">
<box horizontalHuggingPriority="750" boxType="separator" id="276">
<rect key="frame" x="270" y="2" width="4" height="300"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
</box>
<button verticalHuggingPriority="750" id="323">
<rect key="frame" x="274" y="10" width="269" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="push" title="http://www.dnscrypt.org" alternateTitle="Browse the OpenDNS web site" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="324">
<buttonCell key="cell" type="push" title="http://www.dnscrypt.org" alternateTitle="Browse the provider website" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="324">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
@@ -159,18 +114,13 @@
<action selector="providerLinkPushed:" target="-2" id="HYc-qW-k00"/>
</connections>
</button>
<box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="345">
<box verticalHuggingPriority="750" boxType="separator" id="345">
<rect key="frame" x="17" y="193" width="240" height="5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
</box>
<textField verticalHuggingPriority="750" id="UQr-Gd-nzd">
<rect key="frame" x="324" y="268" width="183" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="DNSCrypt name server:" id="ctO-Mw-4JZ">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -180,7 +130,6 @@
<popUpButton toolTip="Select the resolver to use" verticalHuggingPriority="750" id="yY6-5S-StG">
<rect key="frame" x="286" y="232" width="260" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<popUpButtonCell key="cell" type="push" title="None selected" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="zMy-SG-d4L" id="LPZ-wM-tAR">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -197,10 +146,18 @@
<action selector="resolversNamesPopupButtonPressed:" target="-2" id="fEP-TP-PCO"/>
</connections>
</popUpButton>
<button toolTip="Do not try to resolve IPv6 records" id="ESJ-Kf-yNj">
<rect key="frame" x="15" y="133" width="252" height="18"/>
<textField verticalHuggingPriority="750" id="e9H-pq-zb6">
<rect key="frame" x="278" y="182" width="267" height="27"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" placeholderString="-" id="q83-P7-DNW">
<font key="font" size="12" name="Monaco"/>
<color key="textColor" white="0.2046370968" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button toolTip="Do not try to resolve IPv6 records" misplaced="YES" id="ESJ-Kf-yNj">
<rect key="frame" x="15" y="155" width="252" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="check" title="Disable IPv6 to reduce IPv4 latency" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="cCj-X4-U6n">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system" size="14"/>
@@ -210,18 +167,26 @@
<action selector="disableIPv6ButtonPressed:" target="-2" id="s7R-gl-0Fy"/>
</connections>
</button>
<textField verticalHuggingPriority="750" id="e9H-pq-zb6">
<rect key="frame" x="278" y="182" width="267" height="27"/>
<textField verticalHuggingPriority="750" misplaced="YES" id="162">
<rect key="frame" x="15" y="93" width="173" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" placeholderString="-" id="q83-P7-DNW">
<font key="font" size="12" name="Monaco"/>
<color key="textColor" white="0.2046370968" alpha="1" colorSpace="calibratedWhite"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Current DNS settings:" id="163">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField identifier="currentResolver" verticalHuggingPriority="750" misplaced="YES" id="Laq-Rf-7ph">
<rect key="frame" x="7" y="17" width="261" height="68"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="EEK-vb-MH8">
<font key="font" size="14" name="Monaco"/>
<color key="textColor" white="0.2046370968" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<accessibility description="Current resolver IP addresses"/>
</textField>
</subviews>
<animations/>
</view>
</tabViewItem>
<tabViewItem label="Advanced" identifier="2" id="388">
@@ -229,20 +194,18 @@
<rect key="frame" x="10" y="33" width="543" height="313"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" id="390">
<rect key="frame" x="5" y="236" width="406" height="17"/>
<textField verticalHuggingPriority="750" misplaced="YES" id="390">
<rect key="frame" x="5" y="256" width="406" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="When not using DNSCrypt, use the following static DNS servers:" id="391">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="392">
<rect key="frame" x="8" y="206" width="526" height="22"/>
<textField verticalHuggingPriority="750" misplaced="YES" id="392">
<rect key="frame" x="8" y="226" width="526" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" toolTip="Leave empty to use DHCP-provided servers" placeholderString="Space-separated list of IP addresses or leave blank for DHCP" drawsBackground="YES" usesSingleLineMode="YES" id="393">
<font key="font" size="13" name="Courier"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
@@ -256,10 +219,9 @@
<action selector="staticResolversTextFieldChanged:" target="-2" id="432"/>
</connections>
</textField>
<button id="398">
<rect key="frame" x="7" y="281" width="126" height="18"/>
<button misplaced="YES" id="398">
<rect key="frame" x="7" y="290" width="126" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="check" title="Log DNS queries" bezelStyle="regularSquare" imagePosition="left" inset="2" id="399">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -269,11 +231,10 @@
</buttonCell>
<accessibility description="Log DNS queries"/>
</button>
<button verticalHuggingPriority="750" id="400">
<rect key="frame" x="161" y="273" width="94" height="32"/>
<button verticalHuggingPriority="750" misplaced="YES" id="400">
<rect key="frame" x="127" y="282" width="94" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="push" title="View log" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="401">
<buttonCell key="cell" type="push" title="View query log" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="401">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
@@ -282,94 +243,36 @@
<action selector="viewLogButtonPushed:" target="-2" id="441"/>
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="402">
<rect key="frame" x="10" y="7" width="169" height="141"/>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" setsMaxLayoutWidthAtFirstLayout="YES" id="408">
<rect key="frame" x="7" y="180" width="175" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="403">
<font key="font" size="11" name="Courier"/>
<string key="placeholderString">IP addresses (IPv4/IPv6) to block.

208.67.0.255
192.0.43.10
::1</string>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
</textFieldCell>
<connections>
<action selector="blacklistIPsUpdated:" target="-2" id="445"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="404">
<rect key="frame" x="188" y="7" width="169" height="141"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="405">
<font key="font" size="11" name="Courier"/>
<string key="placeholderString">Domain names to block.

*sex*
ads.*
*.example.com
suspicious.example.net</string>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
</textFieldCell>
<connections>
<action selector="blacklistDomainsUpdated:" target="-2" id="447"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="406">
<rect key="frame" x="366" y="7" width="169" height="141"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="Domain names to resolve through the default resolvers instead of DNSCrypt.

localdomain
mycompany.example.net" drawsBackground="YES" id="407">
<font key="font" size="11" name="Courier"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
</textFieldCell>
<connections>
<action selector="exceptionsUpdated:" target="-2" id="453"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" id="408">
<rect key="frame" x="7" y="156" width="175" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Block replies containing any of these IP addresses:" id="409">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" id="410">
<rect key="frame" x="186" y="156" width="175" height="34"/>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" setsMaxLayoutWidthAtFirstLayout="YES" id="410">
<rect key="frame" x="186" y="180" width="175" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Block queries for the following domain names:" id="411">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" id="412">
<rect key="frame" x="363" y="156" width="175" height="34"/>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" setsMaxLayoutWidthAtFirstLayout="YES" id="412">
<rect key="frame" x="363" y="180" width="175" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Bypass DNSCrypt to resolve these domains:" id="413">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button horizontalHuggingPriority="750" verticalHuggingPriority="750" id="416">
<rect key="frame" x="503" y="277" width="25" height="25"/>
<button horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" id="416">
<rect key="frame" x="511" y="286" width="25" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="help" bezelStyle="helpButton" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="417">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -378,33 +281,145 @@ ads.*
<action selector="helpButtonPressed:" target="-2" id="451"/>
</connections>
</button>
<textField verticalHuggingPriority="750" id="423">
<rect key="frame" x="467" y="284" width="33" height="17"/>
<box verticalHuggingPriority="750" misplaced="YES" boxType="separator" id="425">
<rect key="frame" x="9" y="279" width="526" height="5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Help" id="424">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="425">
<rect key="frame" x="9" y="265" width="526" height="5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
</box>
<webView hidden="YES" maintainsBackForwardList="NO" id="449">
<rect key="frame" x="3" y="-3" width="536" height="278"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<webPreferences key="preferences" identifier="helpWebView" defaultFontSize="12" defaultFixedFontSize="12" minimumFontSize="2" plugInsEnabled="NO" javaEnabled="NO" javaScriptEnabled="NO" javaScriptCanOpenWindowsAutomatically="NO" loadsImagesAutomatically="NO" allowsAnimatedImages="NO" allowsAnimatedImageLooping="NO"/>
<accessibility description="Static DNS resolvers"/>
</webView>
<scrollView misplaced="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="jMK-cV-G1F">
<rect key="frame" x="7" y="31" width="173" height="141"/>
<autoresizingMask key="autoresizingMask" heightSizable="YES"/>
<clipView key="contentView" id="xbZ-5I-JUV">
<rect key="frame" x="1" y="1" width="171" height="139"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" richText="NO" usesFontPanel="YES" selectionGranularity="word" findStyle="panel" incrementalSearchingEnabled="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" smartInsertDelete="YES" id="Jos-8C-r8h" customClass="NSPlaceHolderTextView">
<rect key="frame" x="0.0" y="0.0" width="171" height="139"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="171" height="139"/>
<size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
<connections>
<outlet property="delegate" destination="-2" id="OZf-fp-jLv"/>
</connections>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="aEl-Zj-fOn">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="TLo-RQ-0Ze">
<rect key="frame" x="156" y="1" width="16" height="139"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<scrollView misplaced="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="Qko-q8-g0Z">
<rect key="frame" x="186" y="31" width="173" height="141"/>
<autoresizingMask key="autoresizingMask" heightSizable="YES"/>
<clipView key="contentView" id="BQE-BC-kgC">
<rect key="frame" x="1" y="1" width="171" height="139"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" richText="NO" usesFontPanel="YES" findStyle="panel" incrementalSearchingEnabled="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" spellingCorrection="YES" smartInsertDelete="YES" id="gRF-Cw-rp9" customClass="NSPlaceHolderTextView">
<rect key="frame" x="0.0" y="0.0" width="171" height="139"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="171" height="139"/>
<size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
<connections>
<outlet property="delegate" destination="-2" id="bRg-GP-ktD"/>
</connections>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="F7U-rs-cjI">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="I9u-BD-eBC">
<rect key="frame" x="156" y="1" width="16" height="139"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<scrollView misplaced="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="sD4-mi-6fB">
<rect key="frame" x="365" y="31" width="173" height="141"/>
<autoresizingMask key="autoresizingMask" heightSizable="YES"/>
<clipView key="contentView" id="UK5-2c-eqe">
<rect key="frame" x="1" y="1" width="171" height="139"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" richText="NO" usesFontPanel="YES" findStyle="panel" incrementalSearchingEnabled="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" spellingCorrection="YES" smartInsertDelete="YES" id="YvE-Lo-YVl" customClass="NSPlaceHolderTextView">
<rect key="frame" x="0.0" y="0.0" width="171" height="139"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="171" height="139"/>
<size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
<connections>
<outlet property="delegate" destination="-2" id="hUC-03-vFm"/>
</connections>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="Wuj-rd-fFa">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="WdU-Ib-n7D">
<rect key="frame" x="156" y="1" width="16" height="139"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<button verticalHuggingPriority="750" misplaced="YES" id="Ed0-Kd-FAT">
<rect key="frame" x="179" y="-4" width="187" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Save and apply changes" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="JSd-1Q-unh">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="saveAndApplyChangesButtonPressed:" target="-2" id="541-Cq-wgy"/>
</connections>
</button>
<button misplaced="YES" id="J2W-Uj-YcC">
<rect key="frame" x="246" y="290" width="145" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Log blocked queries" bezelStyle="regularSquare" imagePosition="left" inset="2" id="wk0-j2-TT6">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
<connections>
<action selector="blockedQueryLoggingButtonPressed:" target="-2" id="dEx-Cf-vKu"/>
</connections>
</buttonCell>
<accessibility description="Log blocked DNS queries"/>
</button>
<button verticalHuggingPriority="750" misplaced="YES" id="aHY-xb-fdb">
<rect key="frame" x="388" y="282" width="108" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="View blocked" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ScZ-t3-c3e">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<accessibility description="View the DNS query log"/>
<connections>
<action selector="viewBlockedLogButtonPushed:" target="-2" id="PNq-Sc-lOb"/>
</connections>
</button>
</subviews>
<animations/>
</view>
</tabViewItem>
<tabViewItem label="About" identifier="3" id="356">
@@ -415,7 +430,6 @@ ads.*
<webView maintainsBackForwardList="NO" id="358">
<rect key="frame" x="17" y="31" width="509" height="279"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" plugInsEnabled="NO" javaEnabled="NO" javaScriptCanOpenWindowsAutomatically="NO" loadsImagesAutomatically="NO" allowsAnimatedImages="NO" allowsAnimatedImageLooping="NO">
<nil key="identifier"/>
</webPreferences>
@@ -423,7 +437,6 @@ ads.*
<button verticalHuggingPriority="750" id="385">
<rect key="frame" x="437" y="-5" width="95" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="push" title="Uninstall" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="386">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -433,7 +446,6 @@ ads.*
</connections>
</button>
</subviews>
<animations/>
</view>
</tabViewItem>
<tabViewItem label="Release Notes" identifier="4" id="349">
@@ -444,20 +456,18 @@ ads.*
<webView maintainsBackForwardList="NO" id="354">
<rect key="frame" x="17" y="17" width="509" height="293"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" plugInsEnabled="NO" javaEnabled="NO" javaScriptCanOpenWindowsAutomatically="NO" loadsImagesAutomatically="NO" allowsAnimatedImages="NO" allowsAnimatedImageLooping="NO">
<nil key="identifier"/>
</webPreferences>
</webView>
</subviews>
<animations/>
</view>
</tabViewItem>
</tabViewItems>
</tabView>
</subviews>
<animations/>
</view>
<point key="canvasLocation" x="620.5" y="104.5"/>
</window>
<customObject id="263"/>
</objects>
@@ -7,6 +7,7 @@
body
font:
family: arial, helvetica, sans-serif
size: 14px
margin: 0
h1
margin: 0
@@ -19,22 +20,13 @@
Tips:
%ul
%li
If you have a firewall, open TCP and UDP ports 53, 54, 443
and 1053. These are the most common ports used for DNSCrypt.
If you have a firewall, open TCP and UDP ports 53 and 443.
These are the most common ports used for DNSCrypt.
%li
The "Automatically disable if blocked" feature automatically disables
DNSCrypt when DNS queries are not able to reach the DNSCrypt
resolver. This can
happen on public WiFi networks that require going through a captive
portal before you can access external networks.
This function is only provided for conveniency.
When enabled, the protocol can be easily downgraded by
third-parties. In other words, when the "Automatically
disable if blocked" feature is enabled, this software doesn't
provide any security at all against active attackers, but it can
still be useful against passive attackers and in order to bypass
DNS censorship. Don't enable it unless you are frequently
roaming and you don't want to manually disable/enable DNSCrypt.
WiFi captive portals dont work if they can't intercept DNS queries
and often block DNSCrypt.
So on public WiFi network, disable DNSCrypt, log in, then you can
enable it again.
%li
Using Little Snitch? There are a few rules you need to establish,
which Little Snitch should prompt for when trying to
@@ -43,6 +35,5 @@
%li Allow any outgoing connection for system processes (dnscrypt-proxy)
%li Allow any incoming connection for system process (dnscrypt-proxy)
%li Allow any outgoing connection for system processes (dig)
%li Allow outgoing TCP connections to port 80 (http) of www.apple.com for system process (curl)
%li For automatic updates, allow outgoing TCP connections to port 80 (http) of updates.dnscrypt.org and download.dnscrypt.org, as well as to port 443 (https) of github.com and download.dnscrypt.org for system process (curl)
(Thanks to @cavemandaveman and @TraderStf)
@@ -6,6 +6,7 @@
<style>
body {
font-family: arial, helvetica, sans-serif;
font-size: 14px;
margin: 0; }
h1 {
@@ -22,23 +23,14 @@
Tips:
<ul>
<li>
If you have a firewall, open TCP and UDP ports 53, 54, 443
and 1053. These are the most common ports used for DNSCrypt.
If you have a firewall, open TCP and UDP ports 53 and 443.
These are the most common ports used for DNSCrypt.
</li>
<li>
The "Automatically disable if blocked" feature automatically disables
DNSCrypt when DNS queries are not able to reach the DNSCrypt
resolver. This can
happen on public WiFi networks that require going through a captive
portal before you can access external networks.
This function is only provided for conveniency.
When enabled, the protocol can be easily downgraded by
third-parties. In other words, when the "Automatically
disable if blocked" feature is enabled, this software doesn't
provide any security at all against active attackers, but it can
still be useful against passive attackers and in order to bypass
DNS censorship. Don't enable it unless you are frequently
roaming and you don't want to manually disable/enable DNSCrypt.
WiFi captive portals dont work if they can't intercept DNS queries
and often block DNSCrypt.
So on public WiFi network, disable DNSCrypt, log in, then you can
enable it again.
</li>
<li>
Using Little Snitch? There are a few rules you need to establish,
@@ -48,7 +40,6 @@
<li>Allow any outgoing connection for system processes (dnscrypt-proxy)</li>
<li>Allow any incoming connection for system process (dnscrypt-proxy)</li>
<li>Allow any outgoing connection for system processes (dig)</li>
<li>Allow outgoing TCP connections to port 80 (http) of www.apple.com for system process (curl)</li>
<li>For automatic updates, allow outgoing TCP connections to port 80 (http) of updates.dnscrypt.org and download.dnscrypt.org, as well as to port 443 (https) of github.com and download.dnscrypt.org for system process (curl)</li>
</ol>
(Thanks to @cavemandaveman and @TraderStf)
@@ -4,11 +4,10 @@
%meta{charset: "utf-8"}
%title Help (advanced settings)
:sass
html
background: #e4e4e4
body
font:
family: arial, helvetica, sans-serif
size: 14px
margin: 1em
h1
margin: 0
@@ -35,9 +34,13 @@
%p
Checking the "Log DNS queries" box dumps all DNS queries sent
by your computer to a file named /var/log/dnscrypt-query.log
%p
Blocked queries can also go to a log file. The file is named
/var/log/dnscrypt-blocked-query.log
%p
The "View log" button opens it with the log viewer application
so that you can watch it in real time.
so that you can watch it in real time. The other button shows
the blocked queries.
%section
%h2 IP addresses blocking
%p
@@ -57,19 +60,16 @@
%p
This is a list of domain names to be blocked.
%p
"example.com" will only match this specific name, not
"www.example.com".
"example.com" will match "example.com" and "www.example.com".
%p
But wildcards are also supported. "*.example.com" will match
any name ending with ".example.com" whereas "ads.*" will match
any name beginning with "ads."
But wildcards are also supported. "ads.*" will match any name
beginning with "ads."
%p
Wildcards can also perform substring matching. "*xxx*" will
match any name containing the string "xxx".
%p
Patterns to be blocked should be separated with spaces, and
the blocking takes effect immediately after you hit the Return
key. Flushing your DNS cache is not required.
Patterns to be blocked should be separated with spaces or new
lines. Flushing your DNS cache is not required.
%p
This feature is only enabled when using DNSCrypt.
%section
@@ -81,7 +81,7 @@
This includes local domain names provided by home routers
(like "routerlogin.net"), local domain names provided by
operating systems and applications (like ".local" or ".lan"),
local domain names served by appliances like st-top boxes, and
local domain names served by appliances like set-top boxes, and
internal domains used in corporate networks.
%p
Domains listed here will bypass DNSCrypt in order to be sent
@@ -4,11 +4,9 @@
<meta charset='utf-8'>
<title>Help (advanced settings)</title>
<style>
html {
background: #e4e4e4; }
body {
font-family: arial, helvetica, sans-serif;
font-size: 14px;
margin: 1em; }
h1 {
@@ -44,9 +42,14 @@
Checking the "Log DNS queries" box dumps all DNS queries sent
by your computer to a file named /var/log/dnscrypt-query.log
</p>
<p>
Blocked queries can also go to a log file. The file is named
<!-- var/log/dnscrypt-blocked-query.log -->
</p>
<p>
The "View log" button opens it with the log viewer application
so that you can watch it in real time.
so that you can watch it in real time. The other button shows
the blocked queries.
</p>
</section>
<section>
@@ -74,22 +77,19 @@
This is a list of domain names to be blocked.
</p>
<p>
"example.com" will only match this specific name, not
"www.example.com".
"example.com" will match "example.com" and "www.example.com".
</p>
<p>
But wildcards are also supported. "*.example.com" will match
any name ending with ".example.com" whereas "ads.*" will match
any name beginning with "ads."
But wildcards are also supported. "ads.*" will match any name
beginning with "ads."
</p>
<p>
Wildcards can also perform substring matching. "*xxx*" will
match any name containing the string "xxx".
</p>
<p>
Patterns to be blocked should be separated with spaces, and
the blocking takes effect immediately after you hit the Return
key. Flushing your DNS cache is not required.
Patterns to be blocked should be separated with spaces or new
lines. Flushing your DNS cache is not required.
</p>
<p>
This feature is only enabled when using DNSCrypt.
@@ -105,7 +105,7 @@
This includes local domain names provided by home routers
(like "routerlogin.net"), local domain names provided by
operating systems and applications (like ".local" or ".lan"),
local domain names served by appliances like st-top boxes, and
local domain names served by appliances like set-top boxes, and
internal domains used in corporate networks.
</p>
<p>
@@ -2,26 +2,41 @@
%html{lang: "en"}
%head
%meta{charset: "utf-8"}
%title Release notes for DNSCrypt-OSXClient by AlterStep
%title Release notes
:sass
body
font:
family: arial, helvetica, sans-serif
size: 14px
margin: 0
h1, h2
margin: 0
h1
border-bottom: 1px solid grey
article
padding-left: 1em
time
font:
style: italic
%body
%h1 Release Notes for DNSCrypt-OSXclient by AlterStep
%article
%h2 Version 1.0.13
%time Thu, Feb 09 2017
%p
No more "automatic fallback". We trust users to know when they
must disable DNSCrypt.
%p
DNS caching for improved speed.
%p
New buttons to log and view blocked queries.
%p
New system to bypass DNSCrypt using dnscrypt-proxy forwarding
module.
%p
Many bug fixes because old code was removed.
%p
dnscrypt-proxy 1.9.0 with support for the new ChaCha20 encryption.
%p
libsodium 1.0.11.
%article
%h2 Version 1.0.12 by AlterStep
%h2 Version 1.0.12
%time Sun, Jul 31 2016
%p
Compatibility with OSX 10.12
@@ -33,7 +48,7 @@
Fixed a regression in the automatic updater for the resolvers list
%article
%h2 Version 1.0.11 by AlterStep
%h2 Version 1.0.11
%time Thu, Mar 3 2016
%p
Compatibility with OSX 10.11
@@ -43,7 +58,7 @@
libsodium 1.0.8
%article
%h2 Version 1.0.10 by AlterStep
%h2 Version 1.0.10
%time Tue, 23 Jul 2015
%p
Compatibility with OSX 10.11 beta 4
@@ -51,25 +66,25 @@
dnscrypt-proxy 1.6.0
%article
%h2 Version 1.0.9 by AlterStep
%h2 Version 1.0.9
%time Tue, 12 Jul 2015
%p
Fixed an issue with libsodium not being found by minisign-verify
%article
%h2 Version 1.0.8 by AlterStep
%h2 Version 1.0.8
%time Tue, 12 Jul 2015
%p
New versions are automatically downloaded
%article
%h2 Version 1.0.7 by AlterStep
%h2 Version 1.0.7
%time Tue, 1 Jul 2015
%p
Fixed a bug in the automatic updater for the resolvers list
%article
%h2 Version 1.0.6 by AlterStep
%h2 Version 1.0.6
%time Tue, 10 Jun 2015
%p
Updated DNSCrypt proxy to version 1.5.0
@@ -84,67 +99,9 @@
is randomly chosen after each reboot
%article
%h2 Version 1.0.5 by AlterStep
%h2 Version 1.0.5
%time Tue, 06 Jan 2015
%p
Updated DNSCrypt proxy to version 1.4.3
%p
Updated libsodium to 1.0.1-minimal
%article
%h2 Version 1.0.4 by AlterStep
%time Thu, 19 Sep 2014
%p
Updated DNSCrypt proxy to version 1.4.1
%p
Updated libsodium to 0.7.0-minimal
%article
%h2 Version 1.0.3 by AlterStep
%time Thu, 18 Jun 2014
%p
Runs on OSX 10.8 (Mountain Lion), 10.9 (Mavericks) and 10.10 (Yosemite)
%p
New set of icons, contributed by Aaron VonderHaar
%article
%h2 Version 1.0.2 by AlterStep
%time Thu, 05 Jun 2014
%p
Improved installation scripts
%p
LDNS has been downgraded in order to work on systems without
Homebrew.
%article
%h2 Version 1.0.1 by AlterStep
%time Mon, 28 Apr 2014
%p
Include the release version of dnscrypt-proxy 1.4, with a new
OpenNIC resolver.
%p
Wait after dnscrypt-proxy has been turned on before sending a
query. This actually makes state changes faster.
%p
Debug log, turned off by default and deleted after every
reboot. In order to enable it, create an empty file named
%code debug.enabled
in
%code /Library/Application Support/DNSCrypt/control
and the debug log file itself is
%code /var/log/dnscrypt-osxclient-debug.log
%p
Thanks a lot for your feedback on the first version!
%article
%h2 Version 1.0.0 by AlterStep
%time Thu, 21 Apr 2014
%p
This is my first release, based on the source code of the beta
version written by OpenDNS.
%p
It has only been tested on OSX 10.9.
%p
It includes dnscrypt-proxy 1.4.0, libsodium 0.4.5, libldns 1.6.17.
%p
Contact me on Github: https://github.com/alterstep/dnscrypt-osx-client
@@ -2,29 +2,50 @@
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Release notes for DNSCrypt-OSXClient by AlterStep</title>
<title>Release notes</title>
<style>
body {
font-family: arial, helvetica, sans-serif;
font-size: 14px;
margin: 0; }
h1, h2 {
margin: 0; }
h1 {
border-bottom: 1px solid grey; }
article {
padding-left: 1em; }
time {
font-style: italic; }
</style>
</head>
<body>
<h1>Release Notes for DNSCrypt-OSXclient by AlterStep</h1>
<article>
<h2>Version 1.0.12 by AlterStep</h2>
<h2>Version 1.0.13</h2>
<time>Thu, Feb 09 2017</time>
<p>
No more "automatic fallback". We trust users to know when they
must disable DNSCrypt.
</p>
<p>
DNS caching for improved speed.
</p>
<p>
New buttons to log and view blocked queries.
</p>
<p>
New system to bypass DNSCrypt using dnscrypt-proxy forwarding
module.
</p>
<p>
Many bug fixes because old code was removed.
</p>
<p>
dnscrypt-proxy 1.9.0 with support for the new ChaCha20 encryption.
</p>
<p>
libsodium 1.0.11.
</p>
</article>
<article>
<h2>Version 1.0.12</h2>
<time>Sun, Jul 31 2016</time>
<p>
Compatibility with OSX 10.12
@@ -40,7 +61,7 @@
</p>
</article>
<article>
<h2>Version 1.0.11 by AlterStep</h2>
<h2>Version 1.0.11</h2>
<time>Thu, Mar 3 2016</time>
<p>
Compatibility with OSX 10.11
@@ -53,7 +74,7 @@
</p>
</article>
<article>
<h2>Version 1.0.10 by AlterStep</h2>
<h2>Version 1.0.10</h2>
<time>Tue, 23 Jul 2015</time>
<p>
Compatibility with OSX 10.11 beta 4
@@ -63,28 +84,28 @@
</p>
</article>
<article>
<h2>Version 1.0.9 by AlterStep</h2>
<h2>Version 1.0.9</h2>
<time>Tue, 12 Jul 2015</time>
<p>
Fixed an issue with libsodium not being found by minisign-verify
</p>
</article>
<article>
<h2>Version 1.0.8 by AlterStep</h2>
<h2>Version 1.0.8</h2>
<time>Tue, 12 Jul 2015</time>
<p>
New versions are automatically downloaded
</p>
</article>
<article>
<h2>Version 1.0.7 by AlterStep</h2>
<h2>Version 1.0.7</h2>
<time>Tue, 1 Jul 2015</time>
<p>
Fixed a bug in the automatic updater for the resolvers list
</p>
</article>
<article>
<h2>Version 1.0.6 by AlterStep</h2>
<h2>Version 1.0.6</h2>
<time>Tue, 10 Jun 2015</time>
<p>
Updated DNSCrypt proxy to version 1.5.0
@@ -104,7 +125,7 @@
</p>
</article>
<article>
<h2>Version 1.0.5 by AlterStep</h2>
<h2>Version 1.0.5</h2>
<time>Tue, 06 Jan 2015</time>
<p>
Updated DNSCrypt proxy to version 1.4.3
@@ -113,77 +134,5 @@
Updated libsodium to 1.0.1-minimal
</p>
</article>
<article>
<h2>Version 1.0.4 by AlterStep</h2>
<time>Thu, 19 Sep 2014</time>
<p>
Updated DNSCrypt proxy to version 1.4.1
</p>
<p>
Updated libsodium to 0.7.0-minimal
</p>
</article>
<article>
<h2>Version 1.0.3 by AlterStep</h2>
<time>Thu, 18 Jun 2014</time>
<p>
Runs on OSX 10.8 (Mountain Lion), 10.9 (Mavericks) and 10.10 (Yosemite)
</p>
<p>
New set of icons, contributed by Aaron VonderHaar
</p>
</article>
<article>
<h2>Version 1.0.2 by AlterStep</h2>
<time>Thu, 05 Jun 2014</time>
<p>
Improved installation scripts
</p>
<p>
LDNS has been downgraded in order to work on systems without
Homebrew.
</p>
</article>
<article>
<h2>Version 1.0.1 by AlterStep</h2>
<time>Mon, 28 Apr 2014</time>
<p>
Include the release version of dnscrypt-proxy 1.4, with a new
OpenNIC resolver.
</p>
<p>
Wait after dnscrypt-proxy has been turned on before sending a
query. This actually makes state changes faster.
</p>
<p>
Debug log, turned off by default and deleted after every
reboot. In order to enable it, create an empty file named
<code>debug.enabled</code>
in
<code>/Library/Application Support/DNSCrypt/control</code>
and the debug log file itself is
<code>/var/log/dnscrypt-osxclient-debug.log</code>
</p>
<p>
Thanks a lot for your feedback on the first version!
</p>
</article>
<article>
<h2>Version 1.0.0 by AlterStep</h2>
<time>Thu, 21 Apr 2014</time>
<p>
This is my first release, based on the source code of the beta
version written by OpenDNS.
</p>
<p>
It has only been tested on OSX 10.9.
</p>
<p>
It includes dnscrypt-proxy 1.4.0, libsodium 0.4.5, libldns 1.6.17.
</p>
<p>
Contact me on Github: https://github.com/alterstep/dnscrypt-osx-client
</p>
</article>
</body>
</html>
+7
View File
@@ -0,0 +1,7 @@
#! /bin/sh
for f_in in *.haml; do
echo "$f_in"
f_out=$(echo "$f_in" | sed -e 's/.haml/.html/')
haml < "$f_in" > "$f_out"
done
@@ -2,6 +2,7 @@
. ./common.inc
rm -f "$BLOCKED_QUERY_LOG_FILE"
rm -f "$QUERY_LOG_FILE"
rm -f "$DEBUG_LOG_FILE"
find -x "$RESOLVERS_LIST_STATE" -type f -mtime +1 -exec rm -f {} \; 2>/dev/null
@@ -1,35 +0,0 @@
#! /bin/sh
. ./common.inc
try_resolution() {
exec alarmer 5 dig +tries=2 +time=3 +short google-public-dns-a.google.com \
| egrep '^8[.]8[.]8[.]8' > /dev/null 2>&1
}
try_http_query() {
exec alarmer 5 curl -L --max-redirs 5 -4 -m 5 --connect-timeout 5 -s \
http://www.apple.com 2>/dev/null | \
fgrep -c Apple > /dev/null 2>&1
}
try_everything() {
try_resolution &
resolution_pid=$!
try_http_query &
http_query_pid=$!
wait $resolution_pid
resolution_ret=$?
if [ $resolution_ret != 0 ]; then
return 1
fi
wait $http_query_pid
http_query_ret=$?
[ $resolution_ret = 0 -a $http_query_ret = 0 ]
}
try_everything_with_retries() {
try_everything || try_everything
}
try_everything_with_retries
@@ -1,10 +0,0 @@
#! /bin/sh
. ./common.inc
try_local_resolution() {
exec dig +tries=2 +time=3 +short google-public-dns-a.google.com @$INTERFACE_PROXY \
| egrep '^8[.]8[.]8[.]8' > /dev/null 2>&1
}
try_local_resolution
@@ -1,5 +1,5 @@
CURRENT_VERSION=5
CURRENT_VERSION=6
DNSCRYPT_USR_BASE_DIR='/Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr'
DNSCRYPT_VAR_BASE_DIR='/Library/Application Support/DNSCrypt'
@@ -16,18 +16,21 @@ STATES_DIR="${DNSCRYPT_VAR_BASE_DIR}/states"
DNSCRYPT_RESOLVER_NAME_FILE="${CONTROL_DIR}/dnscrypt-resolver-name"
DNSCRYPT_FILE="${CONTROL_DIR}/dnscrypt"
FALLBACK_FILE="${CONTROL_DIR}/fallback"
HANDLERS_LOCK_FILE="${DNSCRYPT_VAR_RUN_BASE_DIR}/dnscrypt-handlers.lock"
DNSCRYPT_PROXY_PLUGINS_BASE_FILE="${CONTROL_DIR}/plugin"
STATIC_RESOLVERS_FILE="${CONTROL_DIR}/static-resolvers"
BLOCKED_QUERY_LOGGING_FILE="${CONTROL_DIR}/blocked-query-logging"
DEBUG_ENABLED_FILE="${CONTROL_DIR}/debug.enabled"
PLUGINS_ENABLED_FILE="${CONTROL_DIR}/plugins.enabled"
CACHE_FILE="${CONTROL_DIR}/plugin-cache.enabled"
QUERY_LOGGING_FILE="${CONTROL_DIR}/plugin-query-logging.enabled"
BLOCKING_FILE="${CONTROL_DIR}/plugin-blocking.enabled"
AAAA_BLOCKING_FILE="${CONTROL_DIR}/plugin-aaaa-blocking.enabled"
FORWARDING_FILE="${CONTROL_DIR}/plugin-forwarding.enabled"
BLOCKED_QUERY_LOG_FILE="${DNSCRYPT_LOG_BASE_DIR}/dnscrypt-blocked-query.log"
QUERY_LOG_FILE="${DNSCRYPT_LOG_BASE_DIR}/dnscrypt-query.log"
DEBUG_LOG_FILE="${DNSCRYPT_LOG_BASE_DIR}/dnscrypt-osxclient-debug.log"
DEBUG_LOG_FILE_LOCK="${DEBUG_LOG_FILE}.lock"
@@ -49,23 +52,13 @@ RESOLVERS_LIST_BASE_DIR="${DNSCRYPT_USR_BASE_DIR}/share/dnscrypt-proxy"
RESOLVERS_LIST_PUBLIC_KEY="RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"
RESOLVERS_LIST_STATE="${STATES_DIR}/resolvers-updated"
INTERFACE_UNBOUND="127.0.0.53"
INTERFACE_UNBOUND_MASK="24"
INTERFACE_PROXY="127.0.0.54"
INTERFACE_PROXY_MASK="24"
INTERFACE_PROBES="127.0.0.55"
INTERFACE_PROBES_MASK="24"
DOMAINS_EXCEPTIONS='
belkin corp domain example home host invalid lan local localdomain test freebox.fr fritz.box nowtv.com routerlogin.net l onion
'
export PATH="${DNSCRYPT_USR_BASE_DIR}/sbin:${DNSCRYPT_USR_BASE_DIR}/bin:${DNSCRYPT_USR_BASE_DIR}/scripts:$PATH"
init_interfaces() {
/sbin/ifconfig lo0 alias ${INTERFACE_UNBOUND}/${INTERFACE_UNBOUND_MASK}
/sbin/ifconfig lo0 alias ${INTERFACE_PROXY}/${INTERFACE_PROXY_MASK}
/sbin/ifconfig lo0 alias ${INTERFACE_PROBES}/${INTERFACE_PROBES_MASK}
}
logger_debug() {
@@ -1,63 +0,0 @@
#! /bin/sh
RESOLVER_DIR='/etc/resolver'
. ./common.inc
[ -r "$EXCEPTIONS_FILE" ] &&
DOMAINS_EXCEPTIONS="$(cat "$EXCEPTIONS_FILE") $DOMAINS_EXCEPTIONS"
get_gw() {
route -n get default | while read line; do
case "$line" in
gateway:\ *)
echo "$line" | sed 's/ *gateway: *//'
return
;;
esac
done
}
get_dhcp_dns() {
cat "${STATES_DIR}/dhcp-dns" 2> /dev/null
}
remove_old_exceptions() {
local found
find -x "$RESOLVER_DIR" -type f -print | {
while read file; do
found='no'
for domain in $DOMAINS_EXCEPTIONS; do
[ "$file" = "${RESOLVER_DIR}/${domain}" ] && found='yes' && break
done
[ "$found" = 'no' ] || continue
fgrep -ci 'automatically generated by the dnscrypt user interface' \
$file > /dev/null 2>&1 || continue
rm -f "$file"
done
}
}
name_servers=$(./get-static-resolvers.sh || get_dhcp_dns || get_gw)
[ x"$name_servers" = 'x' ] && exit 0
default_domain=$(./get-current-default-domain.sh)
mkdir -p "$RESOLVER_DIR" || exit 1
remove_old_exceptions
name_server="$gw"
for domain in $DOMAINS_EXCEPTIONS; do
if [ x"$default_domain" != 'x' ]; then
echo "$domain" | grep -c ".*${default_domain}" > /dev/null
[ $? = 0 ] && continue
fi
echo '# automatically generated by the dnscrypt user interface' \
> "${RESOLVER_DIR}/${domain}"
for name_server in $name_servers; do
echo "nameserver ${name_server}" >> "${RESOLVER_DIR}/${domain}"
done
done
exit 0
@@ -1,13 +0,0 @@
#! /bin/sh
RESOLVER_DIR='/etc/resolver'
. ./common.inc
[ -r "$EXCEPTIONS_FILE" ] &&
DOMAINS_EXCEPTIONS="$(cat "$EXCEPTIONS_FILE") $DOMAINS_EXCEPTIONS"
for domain in $DOMAINS_EXCEPTIONS; do
rm -f "${RESOLVER_DIR}/${domain}"
done
exit 0
@@ -2,7 +2,7 @@
. ./common.inc
if [ -e "$FALLBACK_FILE" ]; then
if [ -e "$BLOCKED_QUERY_LOGGING_FILE" ]; then
echo 'yes'
else
echo 'no'
@@ -2,9 +2,22 @@
. ./common.inc
ifs=$(ifconfig -a | \
awk '/^[^ :]*:/ { sub(/:.*$/,empty); iface=$0 } /status: active/ { print iface }')
ifs=$(echo $ifs)
get_ifs() {
ifs_save="$IFS"
IFS=''
ifconfig -a | while read line; do
nif=$(echo "$line" | egrep -i '^[^ ]+:\s+flags' | sed 's/:.*$//')
isact=$(echo "$line" | egrep -i 'status:\s*active')
if [ -n "$nif" ]; then
cif="$nif"
elif [ -n "$isact" -a -n "$cif" ]; then
echo $cif
fi
done
IFS="$ifs_save"
}
ifs=$(get_ifs)
typeset -A found
ips=""
@@ -19,7 +19,7 @@ done
if [ "$dnscrypt_proxy_used" = 'yes' \
-a -r "${STATES_DIR}/dnscrypt-proxy-description" ]; then
cat "${STATES_DIR}/dnscrypt-proxy-description" && exit 0
cat "${STATES_DIR}/dnscrypt-proxy-description" && exit 0
fi
echo "$upstream_resolvers"
exit 0
@@ -28,3 +28,5 @@ fi
[ x"$current_uid" != x"$wanted_uid" ] && \
chown -R "${wanted_uid}:0" "$CONTROL_DIR"
exec sleep 1
@@ -4,6 +4,8 @@
PROCESSED_TICKETS_FILE="${STATES_DIR}/processed-tickets"
logger_debug handle_control_change
update() {
lockfile -1 -r 30 "$HANDLERS_LOCK_FILE" || exit 1
@@ -19,15 +21,21 @@ update() {
touch "${STATES_DIR}/updating"
logger_debug "DNSCrypt-OSXClient configuration changed"
updated='no'
while :; do
find "$TICKETS_DIR" -type f -name 'ticket-*' > "$PROCESSED_TICKETS_FILE"
if [ ! -s "$PROCESSED_TICKETS_FILE" -a "$updated" = 'yes' ]; then
break
fi
update
logger_debug "New tickets found"
find "$CONTROL_DIR" -type f -name '[a-zA-Z0-9]*' \! -name '*.tmp' \
-exec md5 {} \; > "${STATES_DIR}/controls.cksum.new"
if cmp -s "${STATES_DIR}/controls.cksum.new" "${STATES_DIR}/controls.cksum"; then
logger_debug "Content of the controls dir actually didn't change"
else
update
mv -f "${STATES_DIR}/controls.cksum.new" "${STATES_DIR}/controls.cksum"
fi
updated='yes'
while read ticket_file; do
rm -f "$ticket_file"
@@ -6,13 +6,11 @@ tickets_count=$(./get-tickets-count.sh)
[ "$tickets_count" != '0' ] && exit 0
if [ x"$1" != 'x--boot' ]; then
[ ! -e "$FALLBACK_FILE" ] && exit 0
./check-network-change.sh || exit 0
fi
logger_debug "Network configuration changed"
lockfile -1 -r 30 "$HANDLERS_LOCK_FILE" || exit 1
./set-dns-to-dhcp.sh
if [ ! -e "$DNSCRYPT_FILE" ]; then
@@ -15,3 +15,5 @@ if [ "$servers" = "" ]; then
else
echo "$servers" | sed 's/^ *//;s/ *$//' > "$STATIC_RESOLVERS_FILE"
fi
exec ./switch-exceptions-on.sh
@@ -2,6 +2,8 @@
. ./common.inc
CERTIFICATE_MIN_VALIDITY=60
DNSCRYPT_LIB_BASE_DIR="${DNSCRYPT_USR_BASE_DIR}/lib"
export DYLD_LIBRARY_PATH="${DNSCRYPT_LIB_BASE_DIR}:${DYLD_LIBRARY_PATH}"
@@ -34,32 +36,15 @@ try_resolver() {
logger_debug "Running a test dnscrypt proxy for [$description]"
rm -f "${RES_DIR}/${priority}"
exec alarmer 3 dnscrypt-proxy --pid="$pid_file" \
alarmer 3 dnscrypt-proxy --pid="$pid_file" \
--resolver-name="$RESOLVER_NAME" \
--local-address="${INTERFACE_PROBES}:${priority}" $args 2>&1 | \
while read line; do
case "$line" in
*Proxying\ from\ *)
logger_debug "Proxy for [$description] is up"
# This doesn't send anything to Apple, and any reliable domain name can be used --
# The following line sends a common query to the chosen DNSCrypt resolver to
# check that it responds and can be used instead of leaving the mac without
# a working DNS configuration.
answers=$(exec dig +time=1 +short +tries=2 -p $priority \
@"$INTERFACE_PROBES" www.apple.com. 2> /dev/null | \
egrep -ic '^[0-9.:]+$')
[ -r "$pid_file" ] && kill $(cat -- "$pid_file")
if [ $answers -gt 0 ]; then
logger_debug "Proxy for [$description] can be used"
echo "$args" > "${RES_DIR}/${priority}"
echo "$description" > "${DESCRIPTIONS_DIR}/${priority}"
fi
;;
*) ;;
esac
done
--test="$CERTIFICATE_MIN_VALIDITY" $args
if [ $? = 0 ]; then
logger_debug "Certificate for [$description] received"
echo "$args" > "${RES_DIR}/${priority}"
echo "$description" > "${DESCRIPTIONS_DIR}/${priority}"
fi
rm -f "$pid_file"
}
get_plugin_args() {
@@ -82,11 +67,11 @@ logger_debug "dnscrypt-proxy should be (re)started, stopping previous instance i
wait_pids=""
try_resolver 5004 "${RESOLVER_NAME} using DNSCrypt over UDP" \
try_resolver 1 "${RESOLVER_NAME} using DNSCrypt over UDP" \
"--resolver-name=$RESOLVER_NAME" &
wait_pids="$wait_pids $!"
try_resolver 5005 "${RESOLVER_NAME} using DNSCrypt over TCP" \
try_resolver 2 "${RESOLVER_NAME} using DNSCrypt over TCP" \
"--resolver-name=$RESOLVER_NAME --tcp-only" &
wait_pids="$wait_pids $!"
@@ -105,6 +90,8 @@ if [ x"$best_file" = "x" ]; then
exit 1
fi
./switch-cache-on.sh
plugins_args=''
if [ -r "${DNSCRYPT_PROXY_PLUGINS_BASE_FILE}s.enabled" ]; then
plugin_args=$(get_plugin_args)
@@ -133,23 +120,6 @@ if [ $? != 0 ]; then
logger_debug "dnscrypt-proxy $best_args worked after a retry"
fi
sleep 1
logger_debug "Checking if the current configuration hijacks all DNS queries"
i=0
while [ $i -lt 30 ]; do
./check-local-dns.sh && break
sleep 0.1
i=$((i + 1))
done
if [ $i -ge 30 ]; then
logger_debug "Current configuration hijacks all DNS queries, disabling DNSCrypt"
./switch-to-dhcp.sh
exit 1
fi
logger_debug "Current configuration doesn't seem to hijack all DNS queries"
mv "${DESCRIPTIONS_DIR}/${best_file}" \
"${STATES_DIR}/dnscrypt-proxy-description" 2>/dev/null || exit 0
@@ -3,4 +3,3 @@
. ./common.inc
rm -f "$AAAA_BLOCKING_FILE"
@@ -10,8 +10,11 @@ plugin_args=''
[ -s "$BLACKLIST_DOMAINS_FILE" ] && \
plugin_args="${plugin_args},--domains='${BLACKLIST_DOMAINS_FILE}'"
[ -e "$BLOCKED_QUERY_LOGGING_FILE" ] && \
plugin_args="${plugin_args},--logfile='${BLOCKED_QUERY_LOG_FILE}'"
[ -z "$plugin_args" ] && exec ./switch-blacklists-off.sh
echo "libdcplugin_example_ldns_blocking.la${plugin_args}" > \
"$BLOCKING_FILE"
touch "$PLUGINS_ENABLED_FILE"
touch "$PLUGINS_ENABLED_FILE"
@@ -0,0 +1,9 @@
#! /bin/sh
. ./common.inc
rm -f "$BLOCKED_QUERY_LOGGING_FILE"
exec ./switch-blacklists-on.sh
@@ -0,0 +1,7 @@
#! /bin/sh
. ./common.inc
touch "$BLOCKED_QUERY_LOGGING_FILE"
exec ./switch-blacklists-on.sh
@@ -2,4 +2,5 @@
. ./common.inc
rm -f "$FALLBACK_FILE"
rm -f "$CACHE_FILE"
@@ -0,0 +1,8 @@
#! /bin/sh
. ./common.inc
echo "libdcplugin_example_cache.la" > \
"$CACHE_FILE"
touch "$PLUGINS_ENABLED_FILE"
@@ -2,4 +2,4 @@
. ./common.inc
touch "$FALLBACK_FILE"
rm -f "$FORWARDING_FILE"
@@ -0,0 +1,39 @@
#! /bin/sh
. ./common.inc
get_gw() {
route -n get default | while read line; do
case "$line" in
gateway:\ *)
echo "$line" | sed 's/ *gateway: *//'
return
;;
esac
done
}
get_dhcp_dns() {
cat "$DHCP_DNS_FILE" 2> /dev/null | egrep -i '^[0-9a-f:.]+$'
}
[ -s "$EXCEPTIONS_FILE" ] || exec ./switch-exceptions-off.sh
domains=''
while read domain; do
domains="${domain} ${domains}"
done < "$EXCEPTIONS_FILE"
[ -z "$domains" ] && exec ./switch-exceptions-off.sh
resolvers=$(./get-static-resolvers.sh || get_dhcp_dns || get_gw)
[ -z "$resolvers" ] && exec ./switch-exceptions-off.sh
plugin_args=''
plugin_args="${plugin_args},--domains='${domains}'"
plugin_args="${plugin_args},--resolvers='${resolvers}'"
echo "libdcplugin_example_ldns_forwarding.la${plugin_args}" > \
"$FORWARDING_FILE"
touch "$PLUGINS_ENABLED_FILE"
@@ -10,8 +10,6 @@ PAUSE_INCREMENT=1
logger_debug "DNSCrypt has been requested"
./set-dns-to-dhcp.sh
pause=0
while [ -e "$DNSCRYPT_FILE" ]; do
logger_debug "Switching to dnscrypt if required (pause=$pause)"
@@ -22,41 +20,26 @@ while [ -e "$DNSCRYPT_FILE" ]; do
./switch-to-dhcp.sh
fi
fi
[ $pause -lt $PAUSE_MAX ] && pause=$((pause + 1))
pause_counter=0
while [ -e "$DNSCRYPT_FILE" -a $pause_counter -lt $pause ]; do
sleep $PAUSE_UNIT
pause_counter=$((pause_counter + 1))
done
[ $pause -lt $PAUSE_MAX ] && pause=$((pause + 1))
[ ! -e "$DNSCRYPT_FILE" ] && break
if [ -e "$FALLBACK_FILE" ]; then
logger_debug "Checking if the router hijacks HTTP queries"
if ./check-hijacking.sh; then
logger_debug "The router doesn't hijack HTTP queries"
else
logger_debug "The router hijacks HTTP queries - DNSCrypt is likely to be blocked"
continue
fi
fi
./start-dnscrypt-proxy.sh || continue
./check-local-dns.sh || continue
./set-dns.sh "$INTERFACE_PROXY"
if [ $? != 0 ]; then
logger_debug "Setting the DNS to [$INTERFACE_PROXY] didn't work"
./set-dns-to-dhcp.sh
continue
fi
./check-hijacking.sh
if [ $? != 0 ]; then
logger_debug "Current configuration seems to be hijacking HTTP queries. Reverting to default resolvers."
./set-dns-to-dhcp.sh
continue
fi
break
done
if [ ! -e "$DNSCRYPT_FILE" ]; then
touch "$CONTROL_DIR"
exit 0
fi
exec ./exceptions-add.sh
@@ -8,7 +8,7 @@ if [ ! -s "$BLACKLIST_DOMAINS_TMP_FILE" ]; then
fi
tr -s '[:blank:]' '\n' < "$BLACKLIST_DOMAINS_TMP_FILE" | \
egrep -vi '^(apple[.]com)$' > \
egrep -i '^[*]?[.]?[^.][a-z0-9_.-]+[*]?$' > \
"${BLACKLIST_DOMAINS_TMP_FILE}~" &&
mv "${BLACKLIST_DOMAINS_TMP_FILE}~" "$BLACKLIST_DOMAINS_FILE"
@@ -7,8 +7,9 @@ if [ ! -s "$BLACKLIST_IPS_TMP_FILE" ]; then
exec ./switch-blacklists-on.sh
fi
tr -s '[:blank:]' '\n' \
< "$BLACKLIST_IPS_TMP_FILE" > "${BLACKLIST_IPS_TMP_FILE}~" &&
tr -s '[:blank:]' '\n' < "$BLACKLIST_IPS_TMP_FILE" | \
egrep -i '^[0-9a-fA-F:.]+([.][*])?$' > \
"${BLACKLIST_IPS_TMP_FILE}~" &&
mv "${BLACKLIST_IPS_TMP_FILE}~" "$BLACKLIST_IPS_FILE"
exec ./switch-blacklists-on.sh
@@ -4,9 +4,12 @@
if [ ! -s "$EXCEPTIONS_TMP_FILE" ]; then
rm -f "$EXCEPTIONS_FILE" "$EXCEPTIONS_TMP_FILE"
exit 0
exec ./switch-exceptions-off.sh
fi
tr -s '[:blank:]' '\n' < "$EXCEPTIONS_TMP_FILE" | \
sed -e 's/^ *[*]*[.]*//' -e 's/ *$//' | \
egrep -i '^\s*[0-9a-z_.-]+\s*$' > "${EXCEPTIONS_TMP_FILE}~" &&
mv "${EXCEPTIONS_TMP_FILE}~" "$EXCEPTIONS_FILE"
exec ./switch-exceptions-on.sh
+3 -2
View File
@@ -7,7 +7,7 @@ cp /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/bin/hostip
mkdir -p extra/usr/sbin
cp /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/sbin/dnscrypt-proxy \
extra/usr/sbin/
mkdir -p extra/usr/lib
cp /opt/ldns/lib/libldns.1.dylib \
@@ -19,6 +19,7 @@ cp /opt/ldns/lib/libldns.1.dylib \
if [ -f /usr/local/lib/libsodium.18.dylib ]; then
echo '*** /usr/local/lib/libsodium.{dylib,la} found'
echo '*** Compile dnscrypt-proxy without them to get a static build'
echo '*** Then reinstall them'
sleep 10
fi
@@ -37,6 +38,6 @@ mkdir -p extra/usr/share/dnscrypt-proxy
cp /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv \
extra/usr/share/dnscrypt-proxy/
cp /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/share/dnscrypt-proxy/minisign.pub \
extra/usr/share/dnscrypt-proxy/
Binary file not shown.
+10 -1
View File
@@ -4,10 +4,19 @@ OSX client for managing the DNSCrypt Proxy
The purpose of this application is to allow the user to have a better experience controlling the DNSCrypt Proxy on OSX.
[Download dnscrypt-osxclient.dmg](https://github.com/alterstep/dnscrypt-osxclient/releases/latest)
for OSX 10.8 (Mountain Lion), OSX 10.9 (Mavericks), OSX 10.10 (Yosemite) and OSX 10.11 (El Capitan).
for OSX 10.8 (Mountain Lion), OSX 10.9 (Mavericks), OSX 10.10 (Yosemite), OSX 10.11 (El Capitan) and macOS 10.12 (Sierra).
Compatible with all the DNS servers with DNSCrypt enabled.
Packages are signed with [Minisign](https://jedisct1.github.io/minisign/) and can be verified with:
minisign -V -P RWRvw8aArS/yEI3In0/zQSb9+qfWonLxjjEYG17cXt6zct6GLKtEvUfk -m dnscrypt-osxclient-*.dmg
You can also install this application using Homebrew Cask:
```
brew cask install dnscrypt
```
![Foto 1](https://raw.githubusercontent.com/alterstep/dnscrypt-osxclient/master/1.png)
![Foto 2](https://raw.githubusercontent.com/alterstep/dnscrypt-osxclient/master/2.png)