From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Tim Sedlmeyer <sedlmeyer@gmail.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [ANNOUNCE] Alpha Snapshots of WireGuard for Android and macOS
Date: Wed, 16 May 2018 02:24:36 +0200 [thread overview]
Message-ID: <CAHmME9pEPYymEf_BOOGBffkQgCC0O7W5Ofqu9BFJQXvw1PNmuQ@mail.gmail.com> (raw)
In-Reply-To: <CAK_h9uFnazi0x+Ky_bUn1ZZfaDHas-X-bdLR8x-G=oS-POL5Zg@mail.gmail.com>
On Wed, May 16, 2018 at 1:09 AM, Tim Sedlmeyer <sedlmeyer@gmail.com> wrote:
> MacOS users should be aware that if you have manually assigned DNS servers
> the current wg-quick implementation will remove them and not restore them.
Wow, that was fast. Indeed, from the source [1], see comment:
set_dns() {
# TODO: this should use scutil and be slightly more clever. But for now
# we simply overwrite any _manually set_ DNS servers for all network
# services. This means we get into trouble if the user doesn't actually
# want DNS via DHCP when setting this back to "empty". Because macOS is
# so horrible to deal with here, we'll simply wait for irate users to
# provide a patch themselves.
local service response
{ read -r _; while read -r service; do
[[ $service == "*"* ]] && service="${service:1}"
while read -r response; do
[[ $response == *Error* ]] && echo "$response" >&2
done < <(cmd networksetup -setdnsservers "$service" "${DNS[@]}")
done; } < <(networksetup -listallnetworkservices)
}
del_dns() {
local service response
{ read -r _; while read -r service; do
[[ $service == "*"* ]] && service="${service:1}"
while read -r response; do
[[ $response == *Error* ]] && echo "$response" >&2
done < <(cmd networksetup -setdnsservers "$service" Empty)
done; } < <(networksetup -listallnetworkservices)
}
If you'd like to contribute a patch to do this properly, please don't hesitate.
[1] https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/darwin.bash
next prev parent reply other threads:[~2018-05-16 0:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 22:54 [ANNOUNCE] Alpha Snapshots of WireGuard for Android and macOS Jason A. Donenfeld
2018-05-15 23:09 ` Tim Sedlmeyer
2018-05-16 0:24 ` Jason A. Donenfeld [this message]
2018-05-16 1:13 ` Jason A. Donenfeld
2018-05-16 7:10 ` Stefan Tatschner
2018-05-16 7:13 ` Matthias Urlichs
2018-05-16 7:39 ` Stefan Tatschner
2018-05-16 18:11 ` Tommy Bowditch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHmME9pEPYymEf_BOOGBffkQgCC0O7W5Ofqu9BFJQXvw1PNmuQ@mail.gmail.com \
--to=jason@zx2c4.com \
--cc=sedlmeyer@gmail.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).