From 0211f24a567eacdf8500a563d8a185c4dbb87e72 Mon Sep 17 00:00:00 2001 From: Jan Saidl Date: Sat, 27 Apr 2024 00:30:57 +0200 Subject: [PATCH] Add darwin zerops search domain --- src/wg/darwin.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wg/darwin.go b/src/wg/darwin.go index ec0add01..03ceb58f 100644 --- a/src/wg/darwin.go +++ b/src/wg/darwin.go @@ -10,9 +10,10 @@ import ( "text/template" "github.com/pkg/errors" + "golang.zx2c4.com/wireguard/wgctrl/wgtypes" + "github.com/zeropsio/zcli/src/i18n" "github.com/zeropsio/zerops-go/dto/output" - "golang.zx2c4.com/wireguard/wgctrl/wgtypes" ) func CheckWgInstallation() error { @@ -46,7 +47,9 @@ var vpnTmpl = ` PrivateKey = {{.PrivateKey}} Address = {{if .AssignedIpv4Address}}{{.AssignedIpv4Address}}/32{{end}}, {{.AssignedIpv6Address}}/128 +PostUp = mkdir -p /etc/resolver PostUp = echo "nameserver {{.Ipv4NetworkGateway}}" > /etc/resolver/zerops +PostUp = echo "domain zerops" >> /etc/resolver/zerops PostDown = rm /etc/resolver/zerops [Peer]