feat(cli): add opt-in macOS unprivileged log-send socket

This commit is contained in:
Dev Scribe authored and Cuong Manh Le committed 2026-10-07 14:18:22 +07:00
1 parent cee5bbe7ae
commit bfc46ef265
19 files changed
+1686 -7

No files matched your search

+6 -1
View File
@@ -149,7 +149,10 @@ type prog struct {
internalJournalWriter *logWriter
querySampler errorSampler
lastNetworkState atomic.Pointer[netmon.State]
internalLogSent time.Time
logUpload logUploadGate
logSendMu sync.Mutex
logSendStopped bool
logSend *logSendServer
runningIface string
requiredMultiNICsConfig bool
@@ -1033,6 +1036,7 @@ func (p *prog) run(reload bool, reloadCh chan struct{}) {
}
p.Debug().Msgf("Control server started: %s", p.cs.addr)
}
p.startLogSendServer()
}
p.onStartedDone = make(chan struct{})
p.loop = make(map[string]bool)
@@ -1378,6 +1382,7 @@ func (p *prog) startOSState(f func()) bool {
// resolver that is already gone. Safe to call multiple times.
func (p *prog) restoreOSState() error {
p.restoreOnce.Do(func() {
p.stopLogSendServer()
p.osStateMu.Lock()
p.osStateRestored = true
p.osStateMu.Unlock()