Skip to content

Commit c18ac9f

Browse files
committed
fix: dns resolver for vpn on darwin
1 parent 7970ab3 commit c18ac9f

File tree

5 files changed

+44
-12
lines changed

5 files changed

+44
-12
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
8+
## [v1.0.42] - 2025-04-10
9+
10+
### Fixed
11+
- DNS resolver configuration for VPN on Darwin OS (no longer need for .zerops suffix)
12+
713
## [v1.0.41] - 2025-03-29
814

915
### Fixed

Makefile

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
## help show this help
21
.PHONY: help
32

43
define helpMessage
5-
possible values:
6-
test
7-
lint
8-
windows-amd
9-
linux-amd
10-
darwin-arm
4+
possible targets:
5+
- test
6+
- lint
7+
- all
8+
- windows-amd
9+
- linux-amd
10+
- dawrin-amd
11+
- darwin-arm
12+
- showcase
1113
endef
1214
export helpMessage
1315

@@ -22,11 +24,27 @@ lint:
2224
GOOS=linux GOARCH=amd64 gomodrun golangci-lint run ./cmd/... ./src/... --verbose
2325
GOOS=windows GOARCH=amd64 gomodrun golangci-lint run ./cmd/... ./src/... --verbose
2426

27+
#########
28+
# BUILD #
29+
#########
30+
all: windows-amd linux-amd darwin-amd darwin-arm
31+
2532
windows-amd:
26-
GOOS=windows GOARCH=amd64 go build -o bin/zcli.exe cmd/zcli/main.go
33+
GOOS=windows GOARCH=amd64 tools/build.sh zcli.exe
2734

2835
linux-amd:
29-
GOOS=linux GOARCH=amd64 go build -o bin/zcli.linux cmd/zcli/main.go
36+
GOOS=linux GOARCH=amd64 tools/build.sh zcli.linux
37+
38+
darwin-amd:
39+
GOOS=darwin GOARCH=amd64 tools/build.sh zcli.darwin.amd64
3040

3141
darwin-arm:
32-
GOOS=darwin GOARCH=arm64 go build -o bin/zcli.darwin cmd/zcli/main.go
42+
GOOS=darwin GOARCH=arm64 tools/build.sh zcli.darwin.arm64
43+
44+
#########
45+
# OTHER #
46+
#########
47+
48+
# showcase of ui elements
49+
showcase:
50+
go run src/uxBlock/showcase/main.go

src/uxBlock/showcase/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func createBlocks(contextCancelFunc func()) uxBlock.UxBlocks {
161161
}
162162

163163
debugFileLogger := logger.NewDebugFileLogger(logger.DebugFileConfig{
164-
FilePath: "zerops.log",
164+
FilePath: "/tmp/zerops-showcase.log",
165165
})
166166

167167
blocks := uxBlock.NewBlocks(outputLogger, debugFileLogger, isTerminal, width, height, contextCancelFunc)

src/wg/darwin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ MTU = {{.Mtu}}
5151
Address = {{if .AssignedIpv4Address}}{{.AssignedIpv4Address}}/32{{end}}, {{.AssignedIpv6Address}}/128
5252
PostUp = mkdir -p /etc/resolver
5353
PostUp = echo "nameserver {{.Ipv4NetworkGateway}}" > /etc/resolver/zerops
54-
PostUp = echo "domain zerops" >> /etc/resolver/zerops
54+
PostUp = echo "domain zerops" >> /etc/resolver/zerops
55+
PostUp = echo "search zerops" >> /etc/resolver/zerops
5556
PostDown = rm /etc/resolver/zerops
5657
5758
[Peer]

tools/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
export VERSION="$(git rev-parse --abbrev-ref HEAD):$(git describe --tags)-($(git config --get user.name):<$(git config --get user.email)>)"
4+
go build -o bin/$1 \
5+
-gcflags="all=-l -N" \
6+
-ldflags="all=\"-X=github.com/zeropsio/zcli/src/cmd.version=${VERSION}\"" \
7+
cmd/zcli/main.go

0 commit comments

Comments
 (0)