Add support for advanced parental controls, move the whole thing to 0.17 beta.
This commit is contained in:
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.16 (beta)</string>
|
||||
<string>0.17 (beta)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.16</string>
|
||||
<string>0.17</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
@@ -441,6 +441,200 @@
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_blocking.la</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_blocking.so</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_opendns_deviceid.la</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_opendns_deviceid.so</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_opendns_parental_control.la</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_opendns_parental_control.so</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_opendns_set_client_ip.la</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_ldns_opendns_set_client_ip.so</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_logging.la</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/lib/dnscrypt-proxy/libdcplugin_example_logging.so</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>dnscrypt-proxy</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>lib</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>493</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>2</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
@@ -634,7 +828,7 @@
|
||||
<key>USE_HFS+_COMPRESSION</key>
|
||||
<true/>
|
||||
<key>VERSION</key>
|
||||
<string>1.1.0.2</string>
|
||||
<string>1.1.0.4</string>
|
||||
</dict>
|
||||
<key>UUID</key>
|
||||
<string>7F7D70AB-F7A2-4027-8304-3063C7B9532F</string>
|
||||
@@ -1241,7 +1435,7 @@
|
||||
<key>USE_HFS+_COMPRESSION</key>
|
||||
<true/>
|
||||
<key>VERSION</key>
|
||||
<string>0.16</string>
|
||||
<string>0.17</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
@@ -1734,7 +1928,7 @@
|
||||
<key>USE_HFS+_COMPRESSION</key>
|
||||
<true/>
|
||||
<key>VERSION</key>
|
||||
<string>0.16</string>
|
||||
<string>0.17</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
VERSION='0.16'
|
||||
VERSION='0.17-dev'
|
||||
|
||||
cd build || exit 1
|
||||
(
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.16</string>
|
||||
<string>0.17</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.16</string>
|
||||
<string>0.17</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2011-2012 OpenDNS Inc. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import <PreferencePanes/PreferencePanes.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
|
||||
#define kDNSCRYPT_PACKAGE_VERSION @"0.16"
|
||||
#define kDNSCRYPT_PACKAGE_VERSION @"0.17"
|
||||
|
||||
#define kDNSCRYPT_PREFPANE_APP_PATH @"/Library/PreferencePanes/DNSCrypt.prefPane"
|
||||
#define kDNSCRYPT_USR_BASE_DIR kDNSCRYPT_PREFPANE_APP_PATH @"/Contents/Resources/usr"
|
||||
@@ -50,6 +50,7 @@ typedef enum {
|
||||
@property (nonatomic, retain) IBOutlet WebView *feedbackWebView;
|
||||
@property (nonatomic, retain) IBOutlet WebView *aboutWebView;
|
||||
@property (nonatomic, retain) IBOutlet NSTextFieldCell *staticResolversTextField;
|
||||
@property (nonatomic, retain) IBOutlet NSButton *parentalControlsButton;
|
||||
|
||||
- (void) mainViewDidLoad;
|
||||
|
||||
@@ -61,5 +62,6 @@ typedef enum {
|
||||
- (IBAction)openDNSLinkPushed:(NSButton *)sender;
|
||||
- (IBAction)uninstallPushed:(NSButton *)sender;
|
||||
- (IBAction)staticResolversTextFieldChanged:(NSTextField *)sender;
|
||||
- (IBAction)parentalControlsButtonPressed:(NSButtonCell *)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@synthesize feedbackWebView = _feedbackWebView;
|
||||
@synthesize aboutWebView = _aboutWebView;
|
||||
@synthesize staticResolversTextField = _staticResolversTextField;
|
||||
@synthesize parentalControlsButton = _parentalControlsButton;
|
||||
@synthesize dnscryptButton = _dnscryptButton;
|
||||
@synthesize opendnsButton = _opendnsButton;
|
||||
@synthesize fallbackButton = _fallbackButton;
|
||||
@@ -83,6 +84,10 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
|
||||
}
|
||||
res = [self fromCommand: @"/bin/ksh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-static-resolvers.sh", nil]];
|
||||
[_staticResolversTextField setStringValue: res];
|
||||
res = [self fromCommand: @"/bin/ksh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./get-parental-controls-status.sh", nil]];
|
||||
if ([res isEqualToString: @"yes"]) {
|
||||
[_parentalControlsButton setState: 1];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) updateLedStatus
|
||||
@@ -369,4 +374,26 @@ DNSConfigurationState currentState = kDNS_CONFIGURATION_UNKNOWN;
|
||||
[self fromCommand: @"/bin/ksh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && exec ./set-static-resolvers.sh \"$STATIC_RESOLVERS\"", staticResolvers, nil]];
|
||||
}
|
||||
|
||||
- (BOOL) setParentalControlsOn {
|
||||
[self showSpinners];
|
||||
NSString *res = [self fromCommand: @"/bin/ksh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-parental-controls-on.sh", nil]];
|
||||
(void) res;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- (BOOL) setParentalControlsOff {
|
||||
[self showSpinners];
|
||||
NSString *res = [self fromCommand: @"/bin/ksh" withArguments: [NSArray arrayWithObjects: @"-c", @"cd '" kDNSCRIPT_SCRIPTS_BASE_DIR @"' && ./create-ticket.sh && ./switch-parental-controls-off.sh", nil]];
|
||||
(void) res;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- (IBAction)parentalControlsButtonPressed:(NSButtonCell *)sender {
|
||||
if (sender.state != 0) {
|
||||
[self setParentalControlsOn];
|
||||
} else {
|
||||
[self setParentalControlsOff];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
<string key="NSFrame">{{13, 10}, {563, 359}}</string>
|
||||
<reference key="NSSuperview" ref="1037298196"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="42710935"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:461</string>
|
||||
<array class="NSMutableArray" key="NSTabViewItems">
|
||||
<object class="NSTabViewItem" id="19707695">
|
||||
@@ -842,7 +841,6 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
<string key="NSFrame">{{511, 0}, {25, 25}}</string>
|
||||
<reference key="NSSuperview" ref="42710935"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1598</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="933364045">
|
||||
@@ -1344,6 +1342,22 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
</object>
|
||||
<int key="connectionID">433</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">parentalControlsButton</string>
|
||||
<reference key="source" ref="294453543"/>
|
||||
<reference key="destination" ref="763894061"/>
|
||||
</object>
|
||||
<int key="connectionID">434</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">parentalControlsButtonPressed:</string>
|
||||
<reference key="source" ref="294453543"/>
|
||||
<reference key="destination" ref="931675753"/>
|
||||
</object>
|
||||
<int key="connectionID">436</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
@@ -2063,7 +2077,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">433</int>
|
||||
<int key="maxID">436</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@@ -2076,6 +2090,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
<string key="familyShieldButtonPressed:">NSButton</string>
|
||||
<string key="openDNSLinkPushed:">NSButton</string>
|
||||
<string key="opendnsButtonPressed:">NSButton</string>
|
||||
<string key="parentalControlsButtonPressed:">NSButtonCell</string>
|
||||
<string key="staticResolversTextFieldChanged:">NSTextField</string>
|
||||
<string key="uninstallPushed:">NSButton</string>
|
||||
</dictionary>
|
||||
@@ -2100,6 +2115,10 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
<string key="name">opendnsButtonPressed:</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="parentalControlsButtonPressed:">
|
||||
<string key="name">parentalControlsButtonPressed:</string>
|
||||
<string key="candidateClassName">NSButtonCell</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="staticResolversTextFieldChanged:">
|
||||
<string key="name">staticResolversTextFieldChanged:</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
@@ -2118,6 +2137,7 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
<string key="familyShieldButton">NSButton</string>
|
||||
<string key="feedbackWebView">WebView</string>
|
||||
<string key="opendnsButton">NSButton</string>
|
||||
<string key="parentalControlsButton">NSButton</string>
|
||||
<string key="previewNotesWebView">WebView</string>
|
||||
<string key="releaseNotesTabViewItem">NSTabViewItem</string>
|
||||
<string key="releaseNotesWebView">WebView</string>
|
||||
@@ -2159,6 +2179,10 @@ aW91cy5leGFtcGxlLm5ldA</string>
|
||||
<string key="name">opendnsButton</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="parentalControlsButton">
|
||||
<string key="name">parentalControlsButton</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="previewNotesWebView">
|
||||
<string key="name">previewNotesWebView</string>
|
||||
<string key="candidateClassName">WebView</string>
|
||||
|
||||
@@ -18,6 +18,9 @@ HANDLERS_LOCK_FILE="/var/run/dnscrypt-handlers.lock"
|
||||
DOMAINS_EXCEPTIONS_FILE="${CONTROL_DIR}/domains-exceptions"
|
||||
DNSCRYPT_PROXY_PLUGINS_BASE_FILE="${CONTROL_DIR}/plugin"
|
||||
STATIC_RESOLVERS_FILE="${CONTROL_DIR}/static-resolvers"
|
||||
PLUGINS_ENABLED_FILE="${CONTROL_DIR}/plugins.enabled"
|
||||
PARENTAL_CONTROLS_FILE="${CONTROL_DIR}/plugin-parental-controls.enabled"
|
||||
|
||||
|
||||
INTERFACE_UNBOUND="127.0.0.53"
|
||||
INTERFACE_UNBOUND_MASK="24"
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#! /bin/sh
|
||||
|
||||
. ./common.inc
|
||||
|
||||
if [ -e "$PARENTAL_CONTROLS_FILE" ]; then
|
||||
echo 'yes'
|
||||
else
|
||||
echo 'no'
|
||||
fi
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
. ./common.inc
|
||||
|
||||
rm -f "$PARENTAL_CONTROLS_FILE"
|
||||
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#! /bin/sh
|
||||
|
||||
. ./common.inc
|
||||
|
||||
echo 'libdcplugin_example_ldns_opendns_parental_control.la' > \
|
||||
"$PARENTAL_CONTROLS_FILE"
|
||||
touch "$PLUGINS_ENABLED_FILE"
|
||||
|
||||
Reference in New Issue
Block a user