mv /usr/local/etc/rc.d/dnscrypt-proxy /usr/local/etc/rc.d/dnscrypt-proxy.originalnano /usr/local/etc/rc.d/dnscrypt-proxy
#!/bin/sh## $FreeBSD: head/dns/dnscrypt-proxy/files/dnscrypt-proxy.in 373758 2014-12-02 09:21:49Z xmj $## PROVIDE: dnscrypt_proxy# REQUIRE: SERVERS cleanvar# BEFORE: named local_unbound unbound# KEYWORD: shutdown## Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:## dnscrypt_proxy_instances (str): Set to "dnscrypt_proxy" by default.# List of dnscrypt_proxy instance id's,# e.g. "dnscrypt_proxy_1 dnscrypt_proxy_2", etc.# {instance_id}_enable (bool): Set to NO by default.# Set to YES to enable dnscrypt-proxy.# {instance_id}_uid (str): Set to "_dnscrypt-proxy" by default.# User to switch to after starting.# {instance_id}_resolver (str): Set to "opendns" by default.# Choose a different upstream resolver.# {instance_id}_pidfile (str): default: "/var/run/dnscrypt-proxy.pid"# Location of pid file.# {instance_id}_logfile (str): default: "/var/log/dnscrypt-proxy.log"# Location of log file.## To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2# and add the following to rc.conf:# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"# dnscrypt_proxy_flags='-a 127.0.0.2'. /etc/rc.subrname=dnscrypt_proxyload_rc_config ${name}: ${dnscrypt_proxy_instances="${name}"}: ${dnscrypt_proxy_enable:=NO}dnscrypt_proxy_enable_tmp=${dnscrypt_proxy_enable}command=/usr/local/sbin/dnscrypt-proxyprocname=/usr/local/sbin/dnscrypt-proxyfor i in $dnscrypt_proxy_instances; do name=${i} eval ${name}_enable=${dnscrypt_proxy_enable_tmp} rcvar=${name}_enable load_rc_config ${i} eval dnscrypt_proxy_uid_tmp=\${${i}_uid} eval dnscrypt_proxy_resolver_tmp=\${${i}_resolver} eval dnscrypt_proxy_pidfile_tmp=\${${i}_pidfile} eval dnscrypt_proxy_logfile_tmp=\${${i}_logfile}: ${dnscrypt_proxy_uid_tmp:=_dnscrypt-proxy} # User to run daemon as: ${dnscrypt_proxy_resolver_tmp:=opendns} # resolver to use: ${dnscrypt_proxy_pidfile_tmp:=/var/run/${i}.pid} # Path to pid file: ${dnscrypt_proxy_logfile_tmp:=/var/log/${i}.log} # Path to log file command_args="-d -p ${dnscrypt_proxy_pidfile_tmp} -l ${dnscrypt_proxy_logfile_tmp} -u ${dnscrypt_proxy_uid_tmp} -R ${dnscrypt_proxy_resolver_tmp}" pidfile=${dnscrypt_proxy_pidfile_tmp} _rc_restart_done=false # workaround for: service dnscrypt-proxy restart run_rc_command "$1"done
chmod a+x /usr/local/etc/rc.d/dnscrypt-proxy
wget -O /usr/local/share/dnscrypt-proxy/dnscrypt-resolvers.csv https://github.com/dyne/dnscrypt-proxy/raw/master/dnscrypt-resolvers.csv
nano /etc/rc.conf
ddclient_enable="YES"dnscrypt_proxy_enable="YES"dnscrypt_proxy_instances="dnscrypt_proxy_1 dnscrypt_proxy_2 dnscrypt_proxy_3"dnscrypt_proxy_1_resolver="ipredator"dnscrypt_proxy_1_flags="-a 127.0.0.2:53 -l /var/log/"dnscrypt_proxy_2_resolver="soltysiak"dnscrypt_proxy_2_flags="-a 127.0.0.3:53 -l /var/log/"dnscrypt_proxy_3_resolver="dnscrypt.eu-dk"dnscrypt_proxy_3_flags="-a 127.0.0.4:53 -l /var/log/"
service dnscrypt-proxy restart
It seems that dnscrypt is abandoned: https://www.reddit.com/r/privacy/comments/7oyw0h/dnscrypt_is_now_abandoned/
I noticed I did something wrong because dnscrypt-proxy does not start after reboot. I must type in "service dnscrypt-proxy start" in the shell. Not sure what I did wrong. lol /etc/rc.conf is root:wheel and not executable (I think that is correct) If anybody else knows let me know :-) I may just use a cron job @reboot because my skills are poor.
Quote from: cake on February 01, 2018, 12:08:08 amI noticed I did something wrong because dnscrypt-proxy does not start after reboot. I must type in "service dnscrypt-proxy start" in the shell. Not sure what I did wrong. lol /etc/rc.conf is root:wheel and not executable (I think that is correct) If anybody else knows let me know :-) I may just use a cron job @reboot because my skills are poor.Cake, did you read this post?
+1 for the plugin
Hi cake,Thanks, maybe we want to finally put this into a plugin?Michael, do you read this? Cheers,Franco
I'd need 1 or better 2-3 productive sample configs