Release 3.8.2.3: cheaper poll I/O, batched macOS sysproxy, no Connect Clone.
Trust corebin cache without Stat; batch networksetup; ActiveProxyURI instead of Config.Clone. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -350,6 +350,20 @@ func (m *Manager) Config() *config.Config {
|
||||
return m.cfg.Clone()
|
||||
}
|
||||
|
||||
// ActiveProxyURI returns the active profile proxy without cloning the whole config.
|
||||
func (m *Manager) ActiveProxyURI() (string, error) {
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
if m.cfg == nil {
|
||||
return "", fmt.Errorf("no config")
|
||||
}
|
||||
p, err := m.cfg.ActiveProfile()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return p.Proxy, nil
|
||||
}
|
||||
|
||||
// UIPoll is a cheap manager snapshot for GUI polling (no JSON deep-clone of all proxies).
|
||||
type UIPoll struct {
|
||||
Status Status
|
||||
|
||||
Reference in New Issue
Block a user