From 1f13d0822e7b3064c8bf5e49d0b921029b7f7c73 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 18 Nov 2012 00:27:17 -0800 Subject: [PATCH] Add a DISABLE_IPV6 knob to disable IPv6. OpenDNS filtering doesn't work on IPv6, at least for people identified by their IP address, so there should be a simple way, even if it's not directly in the GUI, to use only IPv4. --- .../DNSCrypt/extra/usr/scripts/common.inc | 2 ++ .../DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc index 79cbcf3..c4daa2e 100644 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc @@ -41,6 +41,8 @@ DOMAINS_EXCEPTIONS=' freebox.fr fritz.box intranet lan localdomain nowtv.com private routerlogin.net ' +DISABLE_IPV6='no' + export PATH="${DNSCRYPT_USR_BASE_DIR}/bin:${DNSCRYPT_USR_BASE_DIR}/scripts:$PATH" init_interfaces() { diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh index 341aab1..3e131ad 100755 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh @@ -67,8 +67,10 @@ get_plugin_args() { ./stop-dnscrypt-proxy.sh ipv6_supported="no" -ping6 -c 1 2620:0:ccc::2 > /dev/null 2>&1 -[ $? = 0 ] && ipv6_supported="yes" +if [ x"$DISABLE_IPV6" = "xno" ]; then + ping6 -c 1 2620:0:ccc::2 > /dev/null 2>&1 + [ $? = 0 ] && ipv6_supported="yes" +fi familyshield_wanted="no" [ -r "$FAMILYSHIELD_FILE" ] && familyshield_wanted="yes"