Unable to start dnscyrpt as a service on MacOS Sonoma #2557
ravensorrow
started this conversation in
Potential issues
Replies: 2 comments
-
The default config file path is |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'll come back to this this weekend and test. My MacOS setup is at my girlfriend's house. Mine is Windows (and that works as expected/intended). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings!
I installed dnscrypt-proxy via Homebrew as it's version matched the latest available from dnscrypt-proxy binaries
If I run
/usr/local/sbin/dnscrypt-proxy -config /usr/local/etc/dnscrypt-proxy.toml
as my $USER, it just exits, if I run it as $ROOT it remains resident.Now the real issue comes when I try to install and start dnscrypt as a service.
This got me into investigating, and while I have not found a viable solution/workaround yet, I did notice that
/Library/LaunchDaemons/dnscrypt-proxy.plist
shows the config w/o a hard-coded path. Homebrew follows basic MacOS/*BSD conventions by putting the binary in/usr/local/sbin
and the config file in/usr/local/etc/
. If the binary doesn't know to look in/usr/local/etc
, then the plist needs to tell it to.Original plist
Corrected plist
The above correct does not solve the issue of starting dnscrypt as a service.
So the Launchd property list file is technically formatted correctly. At this point is when I ran out of steam and fresh ideas and hit google again. My first hit was my AHA! moment! I was sent to an Apple: StackExchange link and the answer clued me in. dv5e is talking about how
start/load
are depreciated in lieu ofenable/kickstart
. This made my think, what if I just unloaded the plist and tried to start the daemon as instructed?The vim cmd is where I implemented my correction to hard code the path to the config file. As you can see from my 'ps aux | grep dns
, it **is** running. But it's not responding. This also doesn't address that when
-service installis invoked, it's also loading the
dnscrypt-proxy.plistwhich appears to be a problem. Further reading from the A:SE page suggests
kickstart -kp`-k
will kill running processes based on the plist-p
will print the new PID (potentially useful)So, I only have 1 matching process running and the PID matches what launchctl said it spawned. It IS working, but
-resolve
I'm willing to wager is looking at a relative local path and not the hard-coded path.P.S. I chose yahoo.co.uk as my test just because it's not a URL I go to, so I didn't want to risk the result being cached anywhere.
Beta Was this translation helpful? Give feedback.
All reactions