Files
Ethan e738ff5299 ci: remove dylib build pipeline (#22592)
## Summary

The macOS `.dylib` is only used by Coder Desktop macOS v0.7.2 or older.
v0.7.2 was released in August 2025. v0.8.0 of Coder Desktop macOS, also
released in August 2025, uses a signed Coder slim binary from the
deployment instead.

It's unlikely customers will be using Coder Desktop macOS v0.7.2 and the
next release of Coder simultaneously, so I think we can safely remove
this process, given it slows down CI & release processes.

## Changes

- **Makefile**: Remove `DYLIB_ARCHES`, `CODER_DYLIBS` variables and
`build/coder-dylib` target
- **scripts/build_go.sh**: Remove `--dylib` flag and all dylib-specific
logic (c-shared buildmode, CGO, plist embedding, vpn/dylib entrypoint)
- **scripts/sign_darwin.sh**: Remove dylib-specific comment
- **CI (ci.yaml)**: Remove `build-dylib` job, artifact download/insert
steps, and `build-dylib` dependency from `build` job
- **Release (release.yaml)**: Remove `build-dylib` job, artifact
download/insert steps, and `build-dylib` dependency from `release` job
- **vpn/dylib/**: Delete entire directory (`lib.go` + `info.plist.tmpl`)
- **vpn/router.go, vpn/dns.go**: Clean up comments referencing dylib

The slim and fat binary builds are completely unaffected — the dylib was
an independent build target with its own CI job.

_Generated by mux but reviewed by a human_
2026-03-05 01:50:50 +11:00

59 lines
1.7 KiB
Go

package vpn
import "tailscale.com/net/dns"
func NewDNSConfigurator(t *Tunnel) dns.OSConfigurator {
return &dnsManager{tunnel: t}
}
type dnsManager struct {
tunnel *Tunnel
}
func (v *dnsManager) SetDNS(cfg dns.OSConfig) error {
settings := convertDNSConfig(cfg)
return v.tunnel.ApplyNetworkSettings(v.tunnel.ctx, &NetworkSettingsRequest{
DnsSettings: settings,
})
}
func (*dnsManager) GetBaseConfig() (dns.OSConfig, error) {
// Tailscale calls this function to blend the OS's DNS configuration with
// it's own, so this is only called if `SupportsSplitDNS` returns false.
return dns.OSConfig{}, dns.ErrGetBaseConfigNotSupported
}
func (*dnsManager) SupportsSplitDNS() bool {
// macOS & Windows 10+ support split DNS, so we'll assume all CoderVPN
// clients do too.
return true
}
// Close implements dns.OSConfigurator.
func (*dnsManager) Close() error {
// There's no cleanup that we need to initiate from within the tunnel.
return nil
}
func convertDNSConfig(cfg dns.OSConfig) *NetworkSettingsRequest_DNSSettings {
servers := make([]string, 0, len(cfg.Nameservers))
for _, ns := range cfg.Nameservers {
servers = append(servers, ns.String())
}
searchDomains := make([]string, 0, len(cfg.SearchDomains))
for _, domain := range cfg.SearchDomains {
searchDomains = append(searchDomains, domain.WithoutTrailingDot())
}
matchDomains := make([]string, 0, len(cfg.MatchDomains))
for _, domain := range cfg.MatchDomains {
matchDomains = append(matchDomains, domain.WithoutTrailingDot())
}
return &NetworkSettingsRequest_DNSSettings{
Servers: servers,
SearchDomains: searchDomains,
DomainName: "coder",
MatchDomains: matchDomains,
MatchDomainsNoSearch: false,
}
}