mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
Avoid tailscale.com/tsd dependency
Since it brings gvisor.dev/gvisor to the dependency graph, causing the binary size bloating on *nix (except darwin).
This commit is contained in:
committed by
Cuong Manh Le
parent
5b9ccc5065
commit
84e06c363c
@@ -7,16 +7,16 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"tailscale.com/tsd"
|
||||
|
||||
"github.com/kardianos/service"
|
||||
"tailscale.com/control/controlknobs"
|
||||
"tailscale.com/health"
|
||||
|
||||
"github.com/Control-D-Inc/ctrld/internal/dns"
|
||||
)
|
||||
|
||||
func init() {
|
||||
sys := new(tsd.System)
|
||||
if r, err := dns.NewOSConfigurator(func(format string, args ...any) {}, sys.HealthTracker(), sys.ControlKnobs(), "lo"); err == nil {
|
||||
if r, err := dns.NewOSConfigurator(func(format string, args ...any) {}, &health.Tracker{}, &controlknobs.Knobs{}, "lo"); err == nil {
|
||||
useSystemdResolved = r.Mode() == "systemd-resolved"
|
||||
}
|
||||
// Disable quic-go's ECN support by default, see https://github.com/quic-go/quic-go/issues/3911
|
||||
|
||||
Reference in New Issue
Block a user