diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.h b/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.h index 454f40e..19b1678 100644 --- a/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.h +++ b/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.h @@ -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 diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.m b/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.m index 629104a..0d55962 100644 --- a/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.m +++ b/DNSCrypt-Preference-Pane/DNSCrypt/DNSCrypt.m @@ -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 diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/en.lproj/DNSCrypt.xib b/DNSCrypt-Preference-Pane/DNSCrypt/en.lproj/DNSCrypt.xib index 466dd6c..c74baf9 100644 --- a/DNSCrypt-Preference-Pane/DNSCrypt/en.lproj/DNSCrypt.xib +++ b/DNSCrypt-Preference-Pane/DNSCrypt/en.lproj/DNSCrypt.xib @@ -575,7 +575,7 @@ {{6, 215}, {455, 18}} - + _NS:9 YES @@ -741,6 +741,7 @@ aW91cy5leGFtcGxlLm5ldA {{365, 26}, {169, 141}} + _NS:9 {250, 750} YES @@ -767,7 +768,7 @@ aW91cy5leGFtcGxlLm5ldA {{6, 170}, {175, 34}} - + _NS:9 {250, 750} YES @@ -840,6 +841,7 @@ aW91cy5leGFtcGxlLm5ldA {{511, 0}, {25, 25}} + _NS:1598 YES @@ -885,7 +887,7 @@ aW91cy5leGFtcGxlLm5ldA {{8, 206}, {526, 5}} - + _NS:9 {0, 0} @@ -904,6 +906,48 @@ aW91cy5leGFtcGxlLm5ldA 0 NO + + + -2147483392 + + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple URL pasteboard type + Apple Web Archive pasteboard type + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + WebURLsWithTitlesPboardType + public.png + public.url + public.url-name + + {{3, 26}, {536, 284}} + + + + _NS:9 + + + + helpWebView + + + + + + + + + + + NO + YES + {{10, 33}, {543, 313}} @@ -955,6 +999,7 @@ aW91cy5leGFtcGxlLm5ldA 268 {{437, -3}, {95, 32}} + _NS:9 YES @@ -979,6 +1024,7 @@ aW91cy5leGFtcGxlLm5ldA 268 {{437, -3}, {95, 32}} + _NS:9 YES @@ -1404,6 +1450,22 @@ aW91cy5leGFtcGxlLm5ldA 448 + + + helpWebView + + + + 450 + + + + helpButtonPressed: + + + + 451 + @@ -1757,6 +1819,7 @@ aW91cy5leGFtcGxlLm5ldA + @@ -1960,6 +2023,11 @@ aW91cy5leGFtcGxlLm5ldA + + 449 + + + @@ -2092,6 +2160,7 @@ aW91cy5leGFtcGxlLm5ldA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin com.apple.InterfaceBuilder.CocoaPlugin InitialTabViewItem @@ -2107,7 +2176,7 @@ aW91cy5leGFtcGxlLm5ldA - 448 + 451 @@ -2120,6 +2189,7 @@ aW91cy5leGFtcGxlLm5ldA NSButton NSButton NSButton + NSButton NSButton NSButton NSButton @@ -2150,6 +2220,10 @@ aW91cy5leGFtcGxlLm5ldA familyShieldButtonPressed: NSButton + + helpButtonPressed: + NSButton + lockinButtonPressed: NSButton @@ -2193,6 +2267,7 @@ aW91cy5leGFtcGxlLm5ldA NSButton NSButton WebView + WebView NSButton NSButton NSButton @@ -2242,6 +2317,10 @@ aW91cy5leGFtcGxlLm5ldA feedbackWebView WebView + + helpWebView + WebView + lockinButton NSButton diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/html/help.haml b/DNSCrypt-Preference-Pane/DNSCrypt/extra/html/help.haml new file mode 100644 index 0000000..81793b5 --- /dev/null +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/html/help.haml @@ -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. diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/html/help.html b/DNSCrypt-Preference-Pane/DNSCrypt/extra/html/help.html new file mode 100644 index 0000000..c2587ff --- /dev/null +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/html/help.html @@ -0,0 +1,159 @@ + + + + + Help (advanced settings) + + + +

Help(advanced settings)

+
+

Static DNS servers

+

+ If you are not using DHCP and want a statically configured set + of default DNS resolvers, enter their IP addresses in this box. +

+

+ Separate them with spaces. +

+
+
+

Advanced parental controls

+

+ When using DNSCrypt, this will block the following list of OpenDNS + categories: lingerie/bikini, adult themes, nudity, + pornography, proxy/anonymizer, sexuality and tasteless. +

+

+ 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. +

+
+
+

Log DNS queries

+

+ 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. +

+

+ 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. +

+

+ Checking the "Log DNS queries" box dumps all DNS queries sent + by your computer to a file named /var/log/dnscrypt-query.log +

+

+ The "View log" button opens it with the log viewer application + so that you can watch it in real time. +

+
+
+

Lock-in the current network settings

+

+ If you have an OpenDNS account, and OpenDNS network settings + defined for your current location, you can make these + persistent. +

+

+ Checking this box will make the user interface remember what + your current network is. +

+

+ If you are roaming, the settings for this network will still be + used, no matter what actual network you are connected to. +

+

+ That way, you can stay protected from botnets, malware, + phishing and block unwanted content, even when using public + Wi-Fi hotspots. +

+

+ 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. +

+
+
+

IP addresses blocking

+

+ A response to a query containing at least one IP address + listed here will be blocked. +

+

+ This make it easy to block spam sources and content providers using a + lot of different domain names for a single service. +

+

+ This can also be useful in order to block DNS rebinding + attacks, even for non-private network spaces. +

+

+ IP addresses can be IPv4 and IPv6 addresses, and must be + separated with spaces. +

+
+
+

Names blocking

+

+ This is a list of domain names to be blocked. +

+

+ It doesn't affect your OpenDNS network settings. This is a + local blacklist, applied in addition to your OpenDNS settings. +

+

+ "example.com" will only match this specific name, not + "www.example.com". +

+

+ But wildcards are also supported. "*.example.com" will match + any name ending with ".example.com" whereas "ads.*" will match + any name beginning with "ads." +

+

+ Wildcards can also perform substring matching. "*xxx*" will + match any name containing the string "xxx". +

+

+ 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. +

+

+ This feature is only enabled when using DNSCrypt. +

+
+
+

Exceptions - bypassing OpenDNS for some specific names

+

+ Some domain names should not be resolved by a third-party DNS + resolver, that may not know about them. +

+

+ 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. +

+

+ Domains listed here will bypass DNSCrypt in order to be sent + to the default resolvers. +

+
+ +