Help for the advanced settings pane.

This commit is contained in:
Frank Denis
2012-09-27 14:44:56 +02:00
parent 22cbc2809b
commit f1b8f2bfa6
5 changed files with 389 additions and 4 deletions
@@ -59,6 +59,7 @@ typedef enum {
@property (nonatomic, retain) IBOutlet NSButton *lockinButton;
@property (nonatomic, retain) IBOutlet NSTextField *blacklistIPsTextField;
@property (nonatomic, retain) IBOutlet NSTextField *blacklistDomainsTextField;
@property (nonatomic, retain) IBOutlet WebView *helpWebView;
- (void) mainViewDidLoad;
@@ -76,5 +77,6 @@ typedef enum {
- (IBAction)lockinButtonPressed:(NSButton *)sender;
- (IBAction)blacklistIPsUpdated:(NSTextField *)sender;
- (IBAction)blacklistDomainsUpdated:(NSTextField *)sender;
- (IBAction)helpButtonPressed:(NSButton *)sender;
@end
@@ -22,6 +22,7 @@
@synthesize lockinButton = _lockinButton;
@synthesize blacklistIPsTextField = _blacklistIPsTextField;
@synthesize blacklistDomainsTextField = _blacklistDomainsTextField;
@synthesize helpWebView = _helpWebView;
@synthesize dnscryptButton = _dnscryptButton;
@synthesize opendnsButton = _opendnsButton;
@synthesize fallbackButton = _fallbackButton;
@@ -368,6 +369,17 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
} else {
[[_aboutWebView mainFrame] loadRequest:[NSURLRequest requestWithURL: aboutURL]];
}
[_helpWebView setDrawsBackground:false];
[_helpWebView setShouldUpdateWhileOffscreen:true];
[_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
@@ -495,4 +507,15 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
[self updateBlacklistDomains];
}
- (IBAction)helpButtonPressed:(NSButton *)sender {
if (_helpWebView.isHidden) {
[_helpWebView setHidden: NO];
[_helpWebView setAlphaValue: 0.0];
[_helpWebView.animator setAlphaValue: 1.0];
[_helpWebView setDrawsBackground: TRUE];
} else {
[_helpWebView setHidden: YES];
}
}
@end
@@ -575,7 +575,7 @@
<string key="NSFrame">{{6, 215}, {455, 18}}</string>
<reference key="NSSuperview" ref="42710935"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="30650809"/>
<reference key="NSNextKeyView" ref="11113535"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="402685960">
@@ -741,6 +741,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="NSFrame">{{365, 26}, {169, 141}}</string>
<reference key="NSSuperview" ref="42710935"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="960794720"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSAntiCompressionPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
@@ -767,7 +768,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="NSFrame">{{6, 170}, {175, 34}}</string>
<reference key="NSSuperview" ref="42710935"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="546014897"/>
<reference key="NSNextKeyView" ref="228385556"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSAntiCompressionPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
@@ -840,6 +841,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="NSFrame">{{511, 0}, {25, 25}}</string>
<reference key="NSSuperview" ref="42710935"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="821865429"/>
<string key="NSReuseIdentifierKey">_NS:1598</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="933364045">
@@ -885,7 +887,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="NSFrame">{{8, 206}, {526, 5}}</string>
<reference key="NSSuperview" ref="42710935"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="11113535"/>
<reference key="NSNextKeyView" ref="546014897"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -904,6 +906,48 @@ aW91cy5leGFtcGxlLm5ldA</string>
<int key="NSTitlePosition">0</int>
<bool key="NSTransparent">NO</bool>
</object>
<object class="WebView" id="228385556">
<reference key="NSNextResponder" ref="42710935"/>
<int key="NSvFlags">-2147483392</int>
<set class="NSMutableSet" key="NSDragTypes">
<string>Apple HTML pasteboard type</string>
<string>Apple PDF pasteboard type</string>
<string>Apple PICT pasteboard type</string>
<string>Apple URL pasteboard type</string>
<string>Apple Web Archive pasteboard type</string>
<string>NSColor pasteboard type</string>
<string>NSFilenamesPboardType</string>
<string>NSStringPboardType</string>
<string>NeXT RTFD pasteboard type</string>
<string>NeXT Rich Text Format v1.0 pasteboard type</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
<string>WebURLsWithTitlesPboardType</string>
<string>public.png</string>
<string>public.url</string>
<string>public.url-name</string>
</set>
<string key="NSFrame">{{3, 26}, {536, 284}}</string>
<reference key="NSSuperview" ref="42710935"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="FrameName"/>
<string key="GroupName"/>
<object class="WebPreferences" key="Preferences">
<string key="Identifier">helpWebView</string>
<dictionary class="NSMutableDictionary" key="Values">
<boolean value="NO" key="helpWebViewWebKitAllowAnimatedImageLoopingPreferenceKey"/>
<boolean value="NO" key="helpWebViewWebKitAllowAnimatedImagesPreferenceKey"/>
<boolean value="NO" key="helpWebViewWebKitDisplayImagesKey"/>
<boolean value="NO" key="helpWebViewWebKitJavaEnabled"/>
<boolean value="NO" key="helpWebViewWebKitJavaScriptCanOpenWindowsAutomatically"/>
<boolean value="NO" key="helpWebViewWebKitJavaScriptEnabled"/>
<boolean value="NO" key="helpWebViewWebKitPluginsEnabled"/>
</dictionary>
</object>
<bool key="UseBackForwardList">NO</bool>
<bool key="AllowsUndo">YES</bool>
</object>
</array>
<string key="NSFrame">{{10, 33}, {543, 313}}</string>
<reference key="NSSuperview" ref="821865429"/>
@@ -955,6 +999,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{437, -3}, {95, 32}}</string>
<reference key="NSSuperview" ref="521420514"/>
<reference key="NSNextKeyView" ref="253280516"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="132642450">
@@ -979,6 +1024,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{437, -3}, {95, 32}}</string>
<reference key="NSSuperview" ref="521420514"/>
<reference key="NSNextKeyView" ref="821865429"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="957162704">
@@ -1404,6 +1450,22 @@ aW91cy5leGFtcGxlLm5ldA</string>
</object>
<int key="connectionID">448</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">helpWebView</string>
<reference key="source" ref="294453543"/>
<reference key="destination" ref="228385556"/>
</object>
<int key="connectionID">450</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">helpButtonPressed:</string>
<reference key="source" ref="294453543"/>
<reference key="destination" ref="988915282"/>
</object>
<int key="connectionID">451</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -1757,6 +1819,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<reference ref="902108600"/>
<reference ref="583617410"/>
<reference ref="985341605"/>
<reference ref="228385556"/>
</array>
<reference key="parent" ref="359976024"/>
</object>
@@ -1960,6 +2023,11 @@ aW91cy5leGFtcGxlLm5ldA</string>
<reference key="object" ref="30650809"/>
<reference key="parent" ref="42710935"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">449</int>
<reference key="object" ref="228385556"/>
<reference key="parent" ref="42710935"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -2092,6 +2160,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="425.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="449.IBPluginDependency">com.apple.WebKitIBPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary" key="99.IBAttributePlaceholdersKey">
<string key="NS.key.0">InitialTabViewItem</string>
@@ -2107,7 +2176,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">448</int>
<int key="maxID">451</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2120,6 +2189,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="dnscryptButtonPressed:">NSButton</string>
<string key="fallbackButtonPressed:">NSButton</string>
<string key="familyShieldButtonPressed:">NSButton</string>
<string key="helpButtonPressed:">NSButton</string>
<string key="lockinButtonPressed:">NSButton</string>
<string key="openDNSLinkPushed:">NSButton</string>
<string key="opendnsButtonPressed:">NSButton</string>
@@ -2150,6 +2220,10 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="name">familyShieldButtonPressed:</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBActionInfo" key="helpButtonPressed:">
<string key="name">helpButtonPressed:</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBActionInfo" key="lockinButtonPressed:">
<string key="name">lockinButtonPressed:</string>
<string key="candidateClassName">NSButton</string>
@@ -2193,6 +2267,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="fallbackButton">NSButton</string>
<string key="familyShieldButton">NSButton</string>
<string key="feedbackWebView">WebView</string>
<string key="helpWebView">WebView</string>
<string key="lockinButton">NSButton</string>
<string key="opendnsButton">NSButton</string>
<string key="parentalControlsButton">NSButton</string>
@@ -2242,6 +2317,10 @@ aW91cy5leGFtcGxlLm5ldA</string>
<string key="name">feedbackWebView</string>
<string key="candidateClassName">WebView</string>
</object>
<object class="IBToOneOutletInfo" key="helpWebView">
<string key="name">helpWebView</string>
<string key="candidateClassName">WebView</string>
</object>
<object class="IBToOneOutletInfo" key="lockinButton">
<string key="name">lockinButton</string>
<string key="candidateClassName">NSButton</string>
@@ -0,0 +1,122 @@
!!! 5
%html{lang: "en"}
%head
%meta{charset: "utf-8"}
%title Help (advanced settings)
%style{type: "text/css"}
:sass
body
font:
family: arial, helvetica, sans-serif
margin: 1em
background: white
h1
margin: 0
%body
%h1 Help(advanced settings)
%section
%h2 Static DNS servers
%p
If you are not using DHCP and want a statically configured set
of default DNS resolvers, enter their IP addresses in this box.
%p
Separate them with spaces.
%section
%h2 Advanced parental controls
%p
When using DNSCrypt, this will block the following list of OpenDNS
categories: lingerie/bikini, adult themes, nudity,
pornography, proxy/anonymizer, sexuality and tasteless.
%p
If you have an OpenDNS account and network settings defined
for your current location, the network settings will override the
advanced parental controls. Having an OpenDNS account allows
finer granularity access controls, building reports and more.
%section
%h2 Log DNS queries
%p
As a tool designed to protect your privacy, the DNSCrypt proxy does
not log anything about your DNS queries. Nothing about them will be
saved to disk ever, and log messages are intentionally kept as generic
as possible.
%p
However, you still may want to look at the DNS queries sent by
your system. This can be useful in order to spot suspicious
activity and to refine your domain blacklists and whitelists.
%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
The "View log" button opens it with the log viewer application
so that you can watch it in real time.
%section
%h2 Lock-in the current network settings
%p
If you have an OpenDNS account, and OpenDNS network settings
defined for your current location, you can make these
persistent.
%p
Checking this box will make the user interface remember what
your current network is.
%p
If you are roaming, the settings for this network will still be
used, no matter what actual network you are connected to.
%p
That way, you can stay protected from botnets, malware,
phishing and block unwanted content, even when using public
Wi-Fi hotspots.
%p
This feature is currently not compatible with the OpenDNS IP
updater. If your ISP assigns dynamic IP addresses, use either
the OpenDNS IP updater or the DNSCrypt lock-in feature, but not both.
%section
%h2 IP addresses blocking
%p
A response to a query containing at least one IP address
listed here will be blocked.
%p
This make it easy to block spam sources and content providers using a
lot of different domain names for a single service.
%p
This can also be useful in order to block DNS rebinding
attacks, even for non-private network spaces.
%p
IP addresses can be IPv4 and IPv6 addresses, and must be
separated with spaces.
%section
%h2 Names blocking
%p
This is a list of domain names to be blocked.
%p
It doesn't affect your OpenDNS network settings. This is a
local blacklist, applied in addition to your OpenDNS settings.
%p
"example.com" will only match this specific name, not
"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."
%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.
%p
This feature is only enabled when using DNSCrypt.
%section
%h2 Exceptions - bypassing OpenDNS for some specific names
%p
Some domain names should not be resolved by a third-party DNS
resolver, that may not know about them.
%p
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
internal domains used in corporate networks.
%p
Domains listed here will bypass DNSCrypt in order to be sent
to the default resolvers.
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>Help (advanced settings)</title>
<style type='text/css'>
body {
font-family: arial, helvetica, sans-serif;
margin: 1em;
background: white; }
h1 {
margin: 0; }
</style>
</head>
<body>
<h1>Help(advanced settings)</h1>
<section>
<h2>Static DNS servers</h2>
<p>
If you are not using DHCP and want a statically configured set
of default DNS resolvers, enter their IP addresses in this box.
</p>
<p>
Separate them with spaces.
</p>
</section>
<section>
<h2>Advanced parental controls</h2>
<p>
When using DNSCrypt, this will block the following list of OpenDNS
categories: lingerie/bikini, adult themes, nudity,
pornography, proxy/anonymizer, sexuality and tasteless.
</p>
<p>
If you have an OpenDNS account and network settings defined
for your current location, the network settings will override the
advanced parental controls. Having an OpenDNS account allows
finer granularity access controls, building reports and more.
</p>
</section>
<section>
<h2>Log DNS queries</h2>
<p>
As a tool designed to protect your privacy, the DNSCrypt proxy does
not log anything about your DNS queries. Nothing about them will be
saved to disk ever, and log messages are intentionally kept as generic
as possible.
</p>
<p>
However, you still may want to look at the DNS queries sent by
your system. This can be useful in order to spot suspicious
activity and to refine your domain blacklists and whitelists.
</p>
<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>
<p>
The "View log" button opens it with the log viewer application
so that you can watch it in real time.
</p>
</section>
<section>
<h2>Lock-in the current network settings</h2>
<p>
If you have an OpenDNS account, and OpenDNS network settings
defined for your current location, you can make these
persistent.
</p>
<p>
Checking this box will make the user interface remember what
your current network is.
</p>
<p>
If you are roaming, the settings for this network will still be
used, no matter what actual network you are connected to.
</p>
<p>
That way, you can stay protected from botnets, malware,
phishing and block unwanted content, even when using public
Wi-Fi hotspots.
</p>
<p>
This feature is currently not compatible with the OpenDNS IP
updater. If your ISP assigns dynamic IP addresses, use either
the OpenDNS IP updater or the DNSCrypt lock-in feature, but not both.
</p>
</section>
<section>
<h2>IP addresses blocking</h2>
<p>
A response to a query containing at least one IP address
listed here will be blocked.
</p>
<p>
This make it easy to block spam sources and content providers using a
lot of different domain names for a single service.
</p>
<p>
This can also be useful in order to block DNS rebinding
attacks, even for non-private network spaces.
</p>
<p>
IP addresses can be IPv4 and IPv6 addresses, and must be
separated with spaces.
</p>
</section>
<section>
<h2>Names blocking</h2>
<p>
This is a list of domain names to be blocked.
</p>
<p>
It doesn't affect your OpenDNS network settings. This is a
local blacklist, applied in addition to your OpenDNS settings.
</p>
<p>
"example.com" will only match this specific name, not
"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."
</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.
</p>
<p>
This feature is only enabled when using DNSCrypt.
</p>
</section>
<section>
<h2>Exceptions - bypassing OpenDNS for some specific names</h2>
<p>
Some domain names should not be resolved by a third-party DNS
resolver, that may not know about them.
</p>
<p>
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
internal domains used in corporate networks.
</p>
<p>
Domains listed here will bypass DNSCrypt in order to be sent
to the default resolvers.
</p>
</section>
</body>
</html>