1) Add a stubby-setdns script (for MAC OS X only at the moment) to support Homebrew formula

2) Remove the OARC server from the default config. So now only include the servers that commit to not logging user data. Can make this clearer once we have a yaml config file.
3) Update makefile to include stubby.conf and stubby-setdns in dist tarball
This commit is contained in:
Sara Dickinson 2017-06-01 15:43:09 +01:00
parent a9464993dd
commit 305a6f6b6a
3 changed files with 68 additions and 12 deletions

View File

@ -243,6 +243,7 @@ $(distdir):
cp $(srcdir)/src/tools/Makefile.in $(distdir)/src/tools cp $(srcdir)/src/tools/Makefile.in $(distdir)/src/tools
cp $(srcdir)/src/tools/*.[ch] $(distdir)/src/tools cp $(srcdir)/src/tools/*.[ch] $(distdir)/src/tools
cp $(srcdir)/src/tools/stubby.conf $(distdir)/src/tools cp $(srcdir)/src/tools/stubby.conf $(distdir)/src/tools
cp $(srcdir)/src/tools/stubby-setdns.sh $(distdir)/src/tools
cp $(srcdir)/src/jsmn/*.[ch] $(distdir)/src/jsmn cp $(srcdir)/src/jsmn/*.[ch] $(distdir)/src/jsmn
cp $(srcdir)/src/jsmn/LICENSE $(distdir)/src/jsmn cp $(srcdir)/src/jsmn/LICENSE $(distdir)/src/jsmn
cp $(srcdir)/src/jsmn/README.md $(distdir)/src/jsmn cp $(srcdir)/src/jsmn/README.md $(distdir)/src/jsmn

67
src/tools/stubby-setdns.sh Executable file
View File

@ -0,0 +1,67 @@
#!/bin/bash
# Stubby helper file to set DNS servers on OSX.
# Must run as root.
usage () {
echo
echo "Update the system DNS resolvers so that Stubby is used for all DNS"
echo "queries. (Stubby must already be running)"
echo "This must be run as root, and is currently only supported on MAC OS X."
echo
echo "Usage: $0 options"
echo
echo "Supported options:"
echo " -r Reset DNS resolvers to the default ones (e.g. from DHCP)"
echo " -l List the current DNS settings for all interfaces"
echo " -h Show this help."
}
RESET=0
LIST=0
SERVERS="127.0.0.1 ::1"
OS_X=`uname -a | grep -c 'Darwin'`
while getopts ":rlh" opt; do
case $opt in
r ) RESET=1 ;;
l ) LIST=1 ;;
h ) usage
exit 1 ;;
\? ) usage
exit 1 ;;
esac
done
if [[ $OS_X -eq 0 ]]; then
echo "Sorry - This script is currenlty only supported on MAC OS X."
exit 1
fi
if [[ $LIST -eq 1 ]]; then
echo "** Current DNS settings **"
networksetup -listallnetworkservices 2>/dev/null | grep -v '*' | while read x ; do
RESULT=`networksetup -getdnsservers "$x"`
RESULT=`echo $RESULT`
printf '%-30s %s\n' "$x:" "$RESULT"
done
exit 1
fi
if [ "$USER" != "root" ]; then
echo "Must be root to update system resolvers. Retry using 'sudo stubby-setdns'"
exit 1
fi
if [[ $RESET -eq 1 ]]; then
SERVERS="empty"
echo "Setting DNS servers to '"$SERVERS"' - the system will use default DNS service."
else
echo "Setting DNS servers to '"$SERVERS"' - the system will use Stubby if it is running."
fi
### Set the DNS settings via networksetup ###
networksetup -listallnetworkservices 2>/dev/null | grep -v '*' | while read x ; do
networksetup -setdnsservers "$x" $SERVERS
done

View File

@ -49,18 +49,6 @@
, value: foxZRnIh9gZpWnl+zEiKa0EJ2rdCGroMWm02gaxSc9Q= , value: foxZRnIh9gZpWnl+zEiKa0EJ2rdCGroMWm02gaxSc9Q=
} ] } ]
}, },
{ address_data: 184.105.193.78
, tls_pubkey_pinset:
[ { digest: "sha256"
, value: pOXrpUt9kgPgbWxBFFcBTbRH2heo2wHwXp1fd4AEVXI=
} ]
},
{ address_data: 2620:ff:c000:0:1::64:25
, tls_pubkey_pinset:
[ { digest: "sha256"
, value: pOXrpUt9kgPgbWxBFFcBTbRH2heo2wHwXp1fd4AEVXI=
} ]
},
{ address_data: 89.233.43.71 { address_data: 89.233.43.71
, tls_auth_name: "unicast.censurfridns.dk" , tls_auth_name: "unicast.censurfridns.dk"
}, },