Restore orphaned system proxy after crash, require update SHA-256, add macOS /api auth token, fix UDP ping false positives, HTTPS-only subscriptions, and keep the UI responsive during connect. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
603 B
Go
22 lines
603 B
Go
package sysproxy
|
|
|
|
import "fmt"
|
|
|
|
// Controller manages OS-level proxy settings.
|
|
type Controller interface {
|
|
Enable(httpHostPort string) error
|
|
Disable() error
|
|
Enabled() bool
|
|
// ForceDisable turns off proxy settings even if this process did not Enable them
|
|
// (used to recover after crash/kill when a sentinel file remains).
|
|
ForceDisable() error
|
|
}
|
|
|
|
// New returns a platform-specific controller.
|
|
func New() Controller {
|
|
return newPlatform()
|
|
}
|
|
|
|
// ErrUnsupported is returned on platforms without system proxy support.
|
|
var ErrUnsupported = fmt.Errorf("system proxy is not supported on this platform")
|